Thursday 15 April 2010

Setting your Facebook up receive twitter updates.

Here's the deal, So you have a website that when you write a new article it then automatically sends the title and and a Short url to Twitter, which then also sends the same status update to your facebook fanpage. Saving you time, energy and money.

Well with Joomla it's easy, all you need is AutoTweet - This will status your Twitter account. This is installed onto your Joomla installation

Next you'll need to add 'Twitter Fan Page Sync' this is done from your Facebook Fanpage. You can get this app here Twitter Fan Page Sync

Have Fun!

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in *plugins/system/autotweet.php on line 26

I got this error message when using the Plugin Autotweet on a new installation of Joomla! 1.5

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in *plugins/system/autotweet.php on line 26

The problem had occured because I had not set up my webspace to be using PHP 5.

The Solution:

open up the file htaccess.txt in your editor.

add the following line to the top

SetEnv DEFAULT_PHP_VERSION 5

now save as .htaccess

and upload.

THATS IT !!!!

hope this works for you.

Friday 9 April 2010

Database transfer has put ’ , ‘ , “, Â, ”, –, …, ’ in my text.

Here's how I got rid of these from my database.

On this project I am working with Joomla 1.5 but the following instrunctions are fairly Generic and could be used with other mysql database problems with a little adaption.
The theory of the mysql find and replace is this

UPDATE tablename SET fieldname = replace(fieldname,"valuetofind","valuetoreplacewith");

Note: in this scenario I need to replace with apostrophe's ( ' ) . when doing this they need to be escaped. ie \'

Here are the commands I ran in my phpMyAdmin area.

UPDATE jos_content SET introtext = replace(introtext,"’","\'");

UPDATE jos_content SET introtext = replace(introtext,"‘","\'");

UPDATE jos_content SET introtext = replace(introtext,"“","\"");


UPDATE jos_content SET introtext = replace(introtext,"Â"," ");

UPDATE jos_content SET introtext = replace(introtext,"”","\"");

UPDATE jos_content SET introtext = replace(introtext,"–","-");

UPDATE jos_content SET introtext = replace(introtext,"…",";");


I also had to check the titles of the articles to do this replace 'introtext' with 'title'



Building Websites with Joomla! 1.5: The best-selling Joomla! tutorial guide updated for the latest 1.5 release