Getting the “Thank You Button” count from anywhere on you blog

I’ve been working on rebuilding my website, that is my portfolio and blog, and wanted to try out something like a “Thank You” button. I’ve managed to find this neat plugin that does just that. It’s nice that it’s customizable for the average user and for those of us for which that’s just not enough, well… we can always meddle around the plugin’s PHP files. I’ve customized my button nice and well, but didn’t find a way to access the “Thank You” count for a certain post from anywhere on my website. Vladimir Garagulya from Shine PHP was kind enough to show me the query for doing just that and fter wrapping it in a function I came up with this:

function getThankYouCount($postID){
global $wpdb;
$thankYouCount= $wpdb->get_row("select quant from wp_thanks_counters where post_id=$postID");
if( $thankYouCount){
return $thankYouCount->quant;
}
else{
return 0;
}
}

Just place it in your functions.php file and you will, of course, have to replace the WP part from the wp_thanks_counters table with your own table prefix. If anyone has better solutions for this issue, feel free to share. Cheers!

Posted in Coding | Leave a comment

Free DVD case template

While looking for a mockup for some DVD cases to use for my new website design (have to rearrange some contetnt for better showcasing) I found this guy on deviantART who made a truly awesome job on a free DVD case template. You cand download the file here in a *.3ds format (for 3D Studio Max) and do whatever you need with it. Just to say it again: congratulations Pavel for the great job and for publishing your work free of charge. It’s well appreciated!

Free DVD Case template

Posted in Design | Leave a comment

The Noun Project

Found out about a really nice project created by the husband-and-wife team of Edward Boatman and Sofya Polyakov, along with designer Scott Thomas. The thing I’m talking about goes by the name of The Noun Project and is a really awesome database of free and downloadable symbols for designers and artists to use in their creations. The article where I came accross this is from The 99 percent: The Noun Project: From Sketchbook To Startup. Have a nice read and be greatful for the simple yet great idea these people had!

(The icons above are from TheNounProject.com)

Posted in Design | Leave a comment

Styling custom social network buttons

For awhile now I’ve been building the social bars at the end of articles/news by using the default buttons provided by your well known social networks (Google+, Facebook, Twitter etc.). This changed a few days ago – late enough, I admit – when I came accross an article (link) on creating your custom buttons by using the services URL. To be honest I had no clue about this but then again, I haven’t really looked into it that much.

All was nice and sweal until I wanted to add the button for Google’s oh-so-loved +1 service, which I have to admit I also use and love. Google Plus is the only network that doesn’t provide such an URL and from a designer’s point of view is really a kick in the… well, design let’s say. :) The only button available is the one they provide and resizing it and hiding this and that is just not enough (Configuring the +1 button). I would definitely want to have the possibility to create my own button which integrates perfectly in the whole design of a web page.

The best solution I found, though still far from perfect, is to place another div on top of the button and hide the one underneath. You can check it out on Stack Overflow here.

If anyone found a solution to this issue or if I was too angry and missed something that would help with everything then feel free to share it.

Posted in Coding | Leave a comment

Adding a pause button to jCarousel

If you ever came across content that had to be displayed as a slideshow/carousel than you most likely came to find Jan Sorgalla’s carousel library based on jQuery: jCarousel. I used this library in different projects such as Lucian Poenari’s website where I had to create the catalog display case. Long story short, in a recent project I needed to implement a play/pause button because I wanted the slides to move at 5 seconds appart but I was also interested in the visitor having time to read the text blocks I had inserted. The vertical slide did the trick and when it came to the play/pause bit I found this great code by Jeremy Mikola:

$(document).ready(function(){
  $('#jcarousel').jcarousel({
    vertical: true,
    scroll: 1,
    auto: 5,
    initCallback: function(jc, state) {
      if (state == 'init') {
        // Insert a play/pause button between the prev/next buttons
        $('div.jcarousel-prev-vertical').after('
                <div class="jcarousel-toggle-vertical" style="display:block;"></ div>
        ');
        jc.startAutoOrig = jc.startAuto;
        jc.startAuto = function() {
          if (!jc.paused) {
            jc.startAutoOrig();
          }
        }
        jc.pause = function() {
          $('div.jcarousel-toggle-vertical')
            .removeClass('jcarousel-play-vertical')
            .addClass('jcarousel-pause-vertical');
          jc.paused = true;
          jc.stopAuto();
        }; 

        jc.play = function() {
          $('div.jcarousel-toggle-vertical')
            .removeClass('jcarousel-pause-vertical')
            .addClass('jcarousel-play-vertical');
          jc.paused = false;
          jc.startAuto();
        }; 

        $('div.jcarousel-toggle-vertical').click(function(){
          if (this.timer === null) {
            jc.play();
          } else {
            jc.pause();
          }
        });
      }
      jc.play();
    }
  });
});

However the if (this.timer === null) part didn’t work for me so I used this code posted by another person interested in Jeremy’s code:

jQuery('div.jcarousel-toggle').click(function(){
if (jc.paused) {
jc.play();
} else {
jc.pause();
}
});

Hope you find this post useful. To read the original post just click this link.

Posted in Coding | Leave a comment

My artwork at Papergirl Brasov 2011

This August I found out about the Papergirl project and of the fact that it also takes place locally here in Brasov. You can read about it on “Papergirl Brasov” and “Romanian Papergirl“. I picked out a few of my works, printed them out and dropped them off at the “Ceai et caetera” tea house where they were on display for a week or so, among works by other artists. Wasn’t really happy with the print quality, they came out a tad too dark but I’ll take that into consideration for future print adjustments.

Posted in Lifestyle | 1 Comment

New website & blog

As you may have noticed I decided to fiddle around with the layout of the website and simplify it a little. I felt it wasn’t very “breatheable” so the colors became lighter and some dimensions were altered. I’ve rearranged some navigation features such as the portfolio menu, the search form, the resource link (which I feel does not properly depict something for my portfolio).

The blog itself is intended for different design/code studies, tutorials, featured articles and artist and different news I might consider is worth sharing. So basically the entire website was changed visualy so that it is more of a homepage with easy access to any area of interest, be it my portfolio, blog, resource section or guestbook.

 

Posted in Uncategorized | 1 Comment