Last viewed posts

Download plugins, language packs and stuff.

Last viewed posts

Postby FI-DD » Mon May 14, 2007 8:07 pm

Shows the last X headlines recently viewed.



Installation:

1. Open last_viewed.php and change the number of headlines to show.



2. Upload the file to the plugins directory and activate it via the admin panel.



3. Put this into your page to show the results: show_last_viewed();



(I don't know if this still works if you have a lot of users on your page.)
Attachments
last-viewed.zip
(881 Bytes) Downloaded 464 times
Last edited by FI-DD on Thu May 29, 2008 5:41 pm, edited 1 time in total.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby PJR » Mon May 14, 2007 8:59 pm

Thank you holy FI-DD!
PJR
 
Posts: 165
Joined: Mon Oct 17, 2005 3:15 pm
Location: Czech republic

Postby scottdallas » Tue May 15, 2007 3:25 am

I can't understand how your brain can just make cutenews.ru do magical things.. you speak cutenews.ru's language I guess.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby RDM » Fri Aug 31, 2007 10:49 pm

edit
RDM
 
Posts: 40
Joined: Fri Jan 12, 2007 9:07 pm

Postby nam » Mon May 19, 2008 2:42 am

I modified it a bit so also display the view count of each article.

But one problem with it:

The headings output is like:

McCain blames Bush for Osama\'s escape (1255)
Philippines, Afghanistan listed as Asia\'s worst for journalists (2027)
Prosecutor Suggests \"Some People\" Cannot Be Tried (695)


How to remove the \ from them?
User avatar
nam
 
Posts: 221
Joined: Sat Dec 23, 2006 9:10 pm

Postby nam » Mon May 19, 2008 3:48 am

And I just noticed that this plug-in does not work if it is placed on the bottom of a newspage. It will only work if placed in a separate page such as lastview.php.

Because every post is stored in cache, even if we refresh the page, the changes will not be reflected in it, we can see the change only when cache is cleared.

So for my purpose, this plug-in is useless.

Dear FI-DD, do you have any trick to fix this problem? Or place a "refresh" button to reflect the latest changes.

In separate page, I checked it and works fine, I have almost a visitor every second, but it still works fine.
User avatar
nam
 
Posts: 221
Joined: Sat Dec 23, 2006 9:10 pm

Postby nam » Mon May 19, 2008 5:35 pm

I run into many problems after activating this plug-in, so I had to deactivate it, I think it needs to be improved.

The path for data dir must be fixed; it creates much problem when the script is called from outside of the main cutenews.ru dir.

The {cutepath}/data does not work here, it should work in that way to solve much of the problems.

And there should be a mechanism to reflect the changes made in the last view posts, when it is inserted as links on the bottom of other posts. But currently only the cached pages are displayed so even if you refresh the page, the changes will not be reflected.

Without these changes I think is plug-in will be troublesome for anyone using it.
User avatar
nam
 
Posts: 221
Joined: Sat Dec 23, 2006 9:10 pm

Postby Partyism » Fri May 23, 2008 9:35 am

Doesnt work for me either
Partyism
 
Posts: 399
Joined: Tue Sep 25, 2007 6:24 pm

A good plug-in but does not work

Postby nam » Sun May 25, 2008 3:36 pm

Dear DD-FI,

This is a very useful plug-in but has the probelms mentioend about.

Can you please work to imporve it?
User avatar
nam
 
Posts: 221
Joined: Sat Dec 23, 2006 9:10 pm

Postby FI-DD » Thu May 29, 2008 5:42 pm

I added the $cutepath variable to the plugin.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby nam » Thu May 29, 2008 6:11 pm

Thank you Dear FI-DD,

But what about the 2nd problem with the plug-in?

nam wrote:And there should be a mechanism to reflect the changes made in the last view posts, when it is inserted as links on the bottom of other posts. But currently only the cached pages are displayed so even if you refresh the page, the changes will not be reflected.
User avatar
nam
 
Posts: 221
Joined: Sat Dec 23, 2006 9:10 pm

Postby nam » Thu May 29, 2008 6:13 pm

And this problem:

nam wrote:I modified it a bit so also display the view count of each article.

But one problem with it:

The headings output is like:

McCain blames Bush for Osama\'s escape (1255)
Philippines, Afghanistan listed as Asia\'s worst for journalists (2027)
Prosecutor Suggests "Some People" Cannot Be Tried (695)


How to remove the \ from them?
User avatar
nam
 
Posts: 221
Joined: Sat Dec 23, 2006 9:10 pm

Postby FI-DD » Thu May 29, 2008 7:15 pm

It doesn't matter where you put show_last_viewed(); on the page - top or bottom. It is still working for me.

I don't know what you are doing exactly but if I put it below the include code I can see the changes when viewing the full story of a post.

About your modifications: I don't know how you modified the code but you can remove something using the str_replace() function.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby nam » Thu May 29, 2008 9:49 pm

It seems to work without problem now. Thanks for your help. I also included view counts.

But one problem still exists:

This is how my headings with comma are displayed:

\'Private security firms involved in mercenary activity\' (1490)


You wrote about str_replace() function, but I have no idea on how and where to use it.
User avatar
nam
 
Posts: 221
Joined: Sat Dec 23, 2006 9:10 pm

Postby Partyism » Mon Jun 02, 2008 3:29 pm

is it possible to set a ammount of characters?!
Partyism
 
Posts: 399
Joined: Tue Sep 25, 2007 6:24 pm

Next

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests

cron