Category Archives: Wordpress
This Tweet, Like, Google +1 and Share Plugin for Wordpress by “Let Us Buzz” @letusbuzz came out, and its great! It shows Facebook Like, Facebook Send, Facebook Share, Twitter, and the new Google +1. It is very easy to install and implement with lots of options.
What is frustrating is that Facebook doesnt show numbers by default for some of its icons without clicking it. This makes for an uneven and irritating look on your page, instead of having 3 or 4 nice blocks you get one or the other pushing its way out or being uneven.
So what to do? Display it on its own! I modified the plugin so that you can insert the icons one at a time, circumventing the database setting, to show whatever you want wherever you want.
I’d like to submit the changes to the developers so they can incorporate it so other could benefit but haven’t heard back from them yet.
You can see the modified plugin in action here on this page. Notice the Share button is at the bottom. Leave a comment if you have any questions. Here are the notes I left inside the plugin. and how to use it:
- Added: $type:
The following is an example for the Facebook Share button (which doesn’t have a number count by default until clicked.):
- Template Code: echo display_social4i(“large”,“float-right”,“s4_fbshare”);
- WordPress Shortcode: [social4i size="large" align="float-right" type="s4_fbshare"]
Update: The Author of the plugin allowed me to submit my code and has since incorporated it into version 1.1.5 You can download it from the WordPress Repository here.
This is the missing link for you Fedora Users, without this package installed you will not even see the SSH2 Option in wordpress for updates.
yum install php-pecl-ssh2
then restart apache
httpd -k restart
After installing that (and having SSH2 installed and all the other Apache / PHP Goodies) the SSH method opens up in WordPress.
Note you do not need an authorized key, just username and password for SSH. Notice that the host can be anything from localhost to the IP Address of the domain, any way you would log into SSH.
Also make sure to set the following in your wp-config,
define(‘FTP_BASE’, ‘/var/www/vhostsyourdomain.com/httpdocs/’);define(‘FTP_CONTENT_DIR’, ‘/var/www/vhosts/yourdomain.com/httpdocs/wp-content/’);define(‘FTP_PLUGIN_DIR ‘, ‘/var/www/vhosts/yourdomain.com/httpdocs/wp-content/plugins/’);
Nice thing is you can use your root user and password (for you dangerous types) to upgrade, just don’t give it to anyone else!!!! This is a security risk!!
Other good resources on this topic (but missing the above command and advice):
Looks like my ever advancing PHP experience and knowledge is coming in handy. I was able to help a major entertainment news website: http://www.bloginity.com, get back on its feet.
They use Godaddy, *shudder* and moved from a dedicated virtual, to a dedicated server. Sure, its cheap, but you get what you pay for. The migration did not go smooth ,Godaddy screwed them over. They had tons of problems. Godaddy should stick to domain names, of which they are, imho, the best to use.
If you use mktime() in your plugin code you will notice the timezone will always reflect GMT. There is a reason for this.
Notice that in settings, WordPress asks you for your locale. It then tells you what the time is in GMT and then what the new locale time is. Somehow, WordPress overrides php.ini, system time, etc and thinks its GMT when using mktime(). You cant change it anywhere, not in .htaccess ,nothing. It’s probably embedded deep within the core of wordpress somewhere, and has something to do with plugin functions called within the Loop.
Anyways, how do we get the current linux timestamp that mktime() normally so easily creates for us? Use the following wordpress function:
This will give you your standard linux timestamp. It also has the ability to create a mysql timestamp using the format:
Test it out, but don’t try using a separate .php to test as mktime() works fine outside of the Loop.
Hope this helps!!