Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Latest_Comments 1.1 for 2.5.x
Goto page 1, 2, 3, 4  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
Latest_Comments 1.1 for 2.5.x
Author Message
BadDog



Joined: 21 Nov 2005
Posts: 62

Post Latest_Comments 1.1 for 2.5.x Reply with quote
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:
    if ($config_flood_time){




Add above:



Code:
   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:
msg('info', $echo['headerDeleted'],...




Add above:

Code:
   latest_comments(10, 40);




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



Code:
<?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



latest_comments1_1.zip
 Description:
01/11/06: fixed path to /data/tpl directory that broke the original script.

Download
 Filename:  latest_comments1_1.zip
 Filesize:  1.97 KB
 Downloaded:  556 Time(s)



Last edited by BadDog on Thu Jan 12, 2006 2:01 am; edited 1 time in total
Wed Jan 11, 2006 6:10 am View user's profile Send private message
Guest








Please login to hide the ads.

odin
Moderator


Joined: 29 Sep 2005
Posts: 138
Location: Poland

Post Reply with quote
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.
Wed Jan 11, 2006 3:32 pm View user's profile Send private message MSN Messenger
BadDog



Joined: 21 Nov 2005
Posts: 62

Post Reply with quote
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.
Thu Jan 12, 2006 2:06 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
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.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri May 26, 2006 9:11 am View user's profile Send private message Visit poster's website AIM Address
Sylx



Joined: 17 Mar 2006
Posts: 15

Post Reply with quote
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?
Wed Jul 12, 2006 3:40 am View user's profile Send private message
joshers



Joined: 14 Nov 2005
Posts: 68

Post Reply with quote
Didnt work for me. I just gave up. It wasnt saving to the file. Online adding whitespace.
Wed Jul 12, 2006 6:51 am View user's profile Send private message Visit poster's website AIM Address
Saszoo



Joined: 07 Jun 2006
Posts: 409
Location: Norway

Post Reply with quote
is there a way to make it work with rUFUS?

_________________
My cute.ru site
Sun Aug 13, 2006 5:26 pm View user's profile Send private message Visit poster's website
Falconer



Joined: 01 Feb 2006
Posts: 49

Post Reply with quote
Doesn't work for me either. Getting the same problems as Odin, despite having the latest version downloaded...
Fri Sep 01, 2006 11:13 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post This should get everyone's working. Reply with quote
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:
<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
Wed Sep 27, 2006 7:55 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Re: This should get everyone's working. Reply with quote
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.
Wed Sep 27, 2006 8:10 pm View user's profile Send private message
Saszoo



Joined: 07 Jun 2006
Posts: 409
Location: Norway

Post Reply with quote
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

_________________
My cute.ru site
Wed Sep 27, 2006 8:24 pm View user's profile Send private message Visit poster's website
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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.
Wed Sep 27, 2006 8:28 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

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

http://english.cutenews.ru/forum/rufus-search-and-latest-comment-t786.html#4255
Wed Sep 27, 2006 10:45 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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 Smile



-HIM
Wed Oct 04, 2006 8:20 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
Open latest_comments.php and change this:

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




to this:

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


Replace your_page with the name of your page.
Wed Oct 04, 2006 9:34 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.