Joomla VersionIn an earlier post you said this requires Joomla 1.5.04, but just now you said 1.5.4. I run on 1.5.15.
Sorry for the confusion, Joomla released the version in question labeled as 1.5.4. They meant version 1.5.04. Their numbering scheme goes .8, .9, .10, .11, etc. This can be misleading as .4 can be misconstrued as .40. Your version 1.5.15 has everything needed to make a successful run of it, no worries there.
Tweet on UpdateIf you are saving and then publishing at a later date, make sure that "Tweet on Update" is enabled in the Tweet Profile. The first save is the first insert into the database, Joomla considers this "new" as in never been in the db. When you return and edit the article to publish it for the first time, Joomla considers this an "update", as in the record is in the db and is being updated.
JCEAs for JCE, I am not familiar enough with it to know how it handles article publishing. Try creating a new article JCE disabled and see if it makes a difference.
Sections, Categories, and UsersOne thing I just noticed after playing around with this issue for a bit is with the profile sections, category and user include fields. If there is an white space (space character) entered in the fields the tweet will be cancelled by the extension. This is not very intuitive, as a person would not see the presence of white space without looking for it. I will need to change this in a future revision.
Programming InfoLastly, by all means take a crack at the code. It is difficult for me to diagnose a problem remotely without any hands on ability. You will have a definite advantage in this respect. I would focus most of my attention on the plugin, as it is responsible for building and sending the tweets. It does pull a class or two from the main component (if memory serves for storing data in the db), but for the most part it is independent. You will find the files for the plugin here
/your_joomla_root_directory/plugins/system/nicearticletweets.php
/your_joomla_root_directory/plugins/system/nicearticletweets.xml
The plugin runs pretty quiet. So, there are not a lot of indicators to work off of. One trick I use a lot is a write to flat file routine, this gives me the ability to take a peek at any portion of the runtime process that I want. Here is how to do it.
1. create a file somewhere on your server or host space. Name it mytrace.log or mytrace.txt. You will need to set the permissions to allow the scritps to read and write to the file. If you are on a Linux box the file permissions need to be set to 777.
2. open the /your_joomla_root_directory/plugins/system/nicearticletweets.php file and at the bottom add the following function (right before the last curly bracket "}"
- Code: Select all
function mytrace($data) {
$file = '/full/server/path/to/your/file/mytrace.log';
$handle = fopen($file, 'a') or die("can't open file");
fwrite($handle, $data."\n");
fclose($handle);
}
So the tail end of the script should look something like this:
- Code: Select all
function createtinyURL($url)
{
/*cURL*/
$curl = curl_init( );
curl_setopt( $curl, CURLOPT_URL, "http://tinyurl.com/api-create.php?url=".urlencode(trim($url)));
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 10 );
$content = curl_exec( $curl );
curl_close( $curl );
return $content;
}
function mytrace($data) {
$file = '/full/server/path/to/your/file/mytrace.log';
$handle = fopen($file, 'a') or die("can't open file");
fwrite($handle, $data."\n");
fclose($handle);
}
}
3. enter this line anywhere you want with in the nicearticletweets.php script to grab a peek from the plugin's runtime process:
- Code: Select all
$this->mytrace('your string message here');
or
$this->mytrace('get some variable info '.$variable);
Then when you read the flat file it will have logged the new message. If you are on a Linux box and have SSH access, you can run the following command to watch real time updates of the mytrace.log file
tail -f /full/server/path/to/your/file/mytrace.log
Just hit the break key when you want to abort tail.