Latest_Comments 1.1 for 2.5.x

Download plugins, language packs and stuff.

Latest_Comments 1.1 for 2.5.x

Postby BadDog » Wed Jan 11, 2006 6:10 am

4 easy steps to install...



1) Place latest_comments.php in the /plugins directory and activate it from the adminstration plugins manager.



2) Open show.addcomment.php in /inc directory and find this line:



Code: Select all
    if ($config_flood_time){




Add above:



Code: Select all
   latest_comments(10, 40);




This will display 10 of the most recent comments posted and trim the title to 40 characters. If you do not want to trim title length, set 40 to 0. You shouldn't set the number to display any higher than 30 because it takes up a lot of page space.



You might also want to edit editcomments.mdu so if you remove a comment the comment display will be updated at same time. Look for the line that starts:



Code: Select all
msg('info', $echo['headerDeleted'],...




Add above:

Code: Select all
   latest_comments(10, 40);




3) Determine where you want the comments to appear on your main news page by simply adding this line:



Code: Select all
<?php include($cutepath . '/data/latest_comments.txt'); ?>






4) Next add a comment and a display of latest comments will appear...a template will also be created when first run. Edit latest_comments.tpl if needed directly in the data/tpl directory or through the manage template from the admistration page. You may want to add <tr> or <td> tags depending on where in a table you desire the comments to appear. Default is:



<a href="$config_http_home_url?id={id}#{comment-id}">{title}</a>&nbsp;by {author}<br>





To see latest_comments.php in action see: This News Site
Attachments
latest_comments1_1.zip
01/11/06: fixed path to /data/tpl directory that broke the original script.
(1.97 KiB) Downloaded 743 times
Last edited by BadDog on Thu Jan 12, 2006 2:01 am, edited 1 time in total.
BadDog
 
Posts: 62
Joined: Mon Nov 21, 2005 8:19 am

Postby odin » Wed Jan 11, 2006 3:32 pm

I tried, but without any good effect. I've done everything, following your instructions, but as for now I can see only error messages.



When adding comment:



Warning: latest_comments.tpl: failed to open stream: No such file or directory in path to file/latest_comments.php on line 70



Warning: latest_comments(): Failed opening 'latest_comments.tpl' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in path to file/latest_comments.php on line 70



when tring to view latest comments:



the same as when adding comment.



I had to upload blank latest_comments.txt, because plugin didn't create any. After that most of the errors have gone, but still plugin is not displaying latest comments at all. And one more thing, template isn't created when first run.
odin
Moderator
 
Posts: 138
Joined: Thu Sep 29, 2005 8:20 pm
Location: Poland

Postby BadDog » Thu Jan 12, 2006 2:06 am

odin wrote:I tried, but without any good effect. I've done everything, following your instructions, but as for now I can see only error messages.



When adding comment:



Warning: latest_comments.tpl: failed to open stream: No such file or directory in path to file/latest_comments.php on line 70



Warning: latest_comments(): Failed opening 'latest_comments.tpl' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in path to file/latest_comments.php on line 70





I forgot to add the path /data/tpl to where the latest_comments.tpl was to be created if it did not exist. It was being created in the /data directory. Before 2.5 templates was stored in data directory...so just a silly oversight. The script has been corrected.
BadDog
 
Posts: 62
Joined: Mon Nov 21, 2005 8:19 am

Postby scottdallas » Fri May 26, 2006 9:11 am

anyone else having trouble with it saying that the headers are already sent out in latest_comments.php ? i have installed the hack but not tried to use it yet.. when i go to the log in page on my various websites it says the headers are already sent out in /plugins/latest_comments.php so i just renamed latest_comments.php to latest_commentsbroke.php and that stops it from including whatever it is twice. it doesn't look like it breaks or stops me from logging in, it's just a weird dilemma. nothing im too worried about at the moment.. i just figured in the meantime i'd let someone know or give a heads up.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby Sylx » Wed Jul 12, 2006 3:40 am

IT doesn't work at all for me...



I did exactly what i have to do but when i added a comment it kept showing : no such file ass (phpdir)/data/latest_comments.txt

When I changed the phpdir in to my cuteru dir it makes a latest_comments.txt but no tekst in it... plz help?
Sylx
 
Posts: 15
Joined: Fri Mar 17, 2006 1:22 am

Postby joshers » Wed Jul 12, 2006 6:51 am

Didnt work for me. I just gave up. It wasnt saving to the file. Online adding whitespace.
joshers
 
Posts: 68
Joined: Mon Nov 14, 2005 8:03 am

Postby Saszoo » Sun Aug 13, 2006 5:26 pm

is there a way to make it work with rUFUS?
User avatar
Saszoo
 
Posts: 414
Joined: Wed Jun 07, 2006 10:34 pm
Location: Norway

Postby Falconer » Fri Sep 01, 2006 11:13 pm

Doesn't work for me either. Getting the same problems as Odin, despite having the latest version downloaded...
Falconer
 
Posts: 50
Joined: Wed Feb 01, 2006 10:51 pm

This should get everyone's working.

Postby Heya Im Me » Wed Sep 27, 2006 7:55 pm

I figured out how to get this to work if anyone is interested.



The original author wrote the script but doesn't include two files that would make this an even easier plugin to integrate on one's site.



Make sure you use his include statement and activate the latest comments plugin.





Part 1: Creating the .txt file

1. Create a text file and save it as latest_comments.txt.

2. Upload latest_comments.txt to your data folder and CHMOD it 777.



That takes care of part 1, the next part is a little more involved.



Part 2: Creating the Template

1. Login to Cutenews and go to Manage Templates

2. Create a new template called latest_comments

3. Now make a template you want to appear on your site for the latest comments part. What you want to appear on your site will be taken from the Active News template.



Here's a short example of what you could do:

Code: Select all
<div><a href="$config_http_home_url?id={id}#{comment-id}">{title}</div><div>{author}</div><br>




4. Save the template.



Bring up your site and you'll now see the latest comments posted wherever you put the include statement. If nothing shows up after this, add a comment to any post and then check again. I had to do this to get it to work initially



-HIM
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Re: This should get everyone's working.

Postby FI-DD » Wed Sep 27, 2006 8:10 pm

Heya Im Me wrote:The original author wrote the script but doesn't include two files that would make this an even easier plugin to integrate on one's site.


These two files were automatically created by the script - at least in my case.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Saszoo » Wed Sep 27, 2006 8:24 pm

I had no problems neither, but if this works for you then it's good advice as I see lots of people had problems getting this to work
User avatar
Saszoo
 
Posts: 414
Joined: Wed Jun 07, 2006 10:34 pm
Location: Norway

Postby Heya Im Me » Wed Sep 27, 2006 8:28 pm

Yeah, it wasn't creating anything so I just did it manually, the script is fantastic though. I saw some others had issues so I figured I'd post something to look at if anyone else falls into the same trouble.
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby FI-DD » Wed Sep 27, 2006 10:45 pm

If you wanna have the neat urls instead of "?id=329#3" check out my modifications:

http://english.cutenews.ru/forum/rufus- ... .html#4255
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Heya Im Me » Wed Oct 04, 2006 8:20 pm

FI-DD, I installed your modification but I'm having a problem...for every link it refers to the [home] portion of my rUFUS. Currently I have different sections like [articles] and [news] that have different .php files in the main directory. None of the recent comments show up with the links to these sections like they do when you read their full story (articles/{title}.html and news/{title}.html) is there a way to fix this? Right now it just goes to the home link and I don't want it to.



Thanks :)



-HIM
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby FI-DD » Wed Oct 04, 2006 9:34 pm

Open latest_comments.php and change this:

Code: Select all
$output = str_replace('{link}', cute_get_link($get_news), $output);




to this:

Code: Select all
$output = str_replace('{link}', cute_get_link($get_news, 'post', 'your_page'), $output);


Replace your_page with the name of your page.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Next

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests

cron