| Author |
Message |
BadDog
Joined: 21 Nov 2005 Posts: 62
|
|
Latest_comments plugin v0.5 |
|
UPDATE: v0.5 made more compatable under mySQL while maintaining the speed under txtSQL.
mySQL note: If you recently imported news from cutenews to cutenews.RU and running mySQL 4.x comments may not apper when viewing full story using this plugin. This only applies with imported news, if your news is from direct user additions then there is no problem. This does not apply to txtSQL.
This is a real nice plugin that replaces the default latests-comments.php. Simply download and extract to your plugins folder and activate from the plugin's manager under admin options. Will return links with titles and author. You can add additional HTML if desired by editing the output directly from the script.
Usage: echo latest_comments(10, 0);
This will return 10 comments and not trim the title length. Set 0 to some other number and the titles will be trimed to that number in chars. You can add additional HTML tags to to the default output by directly editing the script.
The current latest comments plugin should be removed and replaced with this one since it is terribly broken.
| Description: |
| v0.5 of latest_comments.php plugin |
|
 Download |
| Filename: |
latest_comments.zip |
| Filesize: |
1.37 KB |
| Downloaded: |
488 Time(s) |
Last edited by BadDog on Mon Nov 28, 2005 5:25 pm; edited 3 times in total |
|
| Sat Nov 26, 2005 9:11 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
Fantastic!
Works great so far.
Thank you! 
|
|
| Sun Nov 27, 2005 12:25 am |
|
 |
Mr R

Joined: 27 Sep 2005 Posts: 82 Location: Spain |
|
|
|
doesnt work?
|
|
| Sun Nov 27, 2005 2:46 am |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
It's not working with MySQL database, I think.
It does work with txtSQL database.

|
|
| Sun Nov 27, 2005 12:06 pm |
|
 |
BadDog
Joined: 21 Nov 2005 Posts: 62
|
|
|
|
 |  | It's not working with MySQL database, I think.
It does work with txtSQL database.
|
I haven't tried it with mySQL yet but will once I import some data into a mySql db. It should work since it is using the same sql syntax as the rest of scripts.
|
|
| Sun Nov 27, 2005 1:12 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
 |  | It should work since it is using the same sql syntax as the rest of scripts. |
Yeah, I know about that. That's making me wonder why it isn't working with MySQL.
|
|
| Sun Nov 27, 2005 2:13 pm |
|
 |
BadDog
Joined: 21 Nov 2005 Posts: 62
|
|
|
|
I'll take a look now, but first, give me a crash course on configuring cutenews to use MySQL. Can a existing installation be converted or you need to do a new install?
|
|
| Sun Nov 27, 2005 2:57 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
Go to "cuteru/upgrade/mysql". This should convert your txtSQL base to MySQL.
|
|
| Sun Nov 27, 2005 3:05 pm |
|
 |
BadDog
Joined: 21 Nov 2005 Posts: 62
|
|
|
|
It's the $sql->table_count not returning the correct count. I have 230 comments and it reports under mySQL I have 853, 720, 532...no wonder nothing gets returned!!!
lexa could add a mysql_num_rows function to maybe return the correct number of rows or something, or something to return the last id that can be used when mySQL is detected.
|
|
| Sun Nov 27, 2005 9:12 pm |
|
 |
Pashka
Joined: 02 Nov 2005 Posts: 5
|
|
|
| Mon Nov 28, 2005 8:18 am |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
Thanks, works fine - even with MySQL.
But I think there is one disadvantage: title of the news can not be displayed.
|
|
| Mon Nov 28, 2005 10:28 am |
|
 |
BadDog
Joined: 21 Nov 2005 Posts: 62
|
|
|
|
Pashka, orderby DESC is not good under txtSQL because it makes page generation too slow by 2 seconds. I think the same would be true with mySQL as well.
As it is now, my plugin runs fast under txtSQL. I get about 220,000 page hits a day on my cutenews and txtSQL is by far faster than mySQL
latest_comments.php v 0.4 is only useful with txtSQL till I can decide on a approach to get the total correct record count under mySQL with the available mySQL function's provided by the mySQL class. If I use the right record count under mySQL then it runs just like it does under txtSQL.
|
|
| Mon Nov 28, 2005 1:37 pm |
|
 |
Pashka
Joined: 02 Nov 2005 Posts: 5
|
|
|
|
BadDog, FI-DD, its not a final version.
|
|
| Mon Nov 28, 2005 3:46 pm |
|
 |
|