| Author |
Message |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2683 Location: Germany |
|
Last viewed posts |
|
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.)
| Description: |
|
 Download |
| Filename: |
last-viewed.zip |
| Filesize: |
881 Bytes |
| Downloaded: |
191 Time(s) |
Last edited by FI-DD on Thu May 29, 2008 5:41 pm; edited 1 time in total |
|
| Mon May 14, 2007 8:07 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
PJR
Joined: 17 Oct 2005 Posts: 161 Location: Czech republic |
|
|
|
Thank you holy FI-DD!
|
|
| Mon May 14, 2007 8:59 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1808 Location: US |
|
|
|
I can't understand how your brain can just make cutenews.ru do magical things.. you speak cutenews.ru's language I guess.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Tue May 15, 2007 3:25 am |
|
 |
RDM
Joined: 12 Jan 2007 Posts: 40
|
|
|
|
edit
|
|
| Fri Aug 31, 2007 10:49 pm |
|
 |
nam

Joined: 23 Dec 2006 Posts: 67
|
|
|
|
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?
|
|
| Mon May 19, 2008 2:42 am |
|
 |
nam

Joined: 23 Dec 2006 Posts: 67
|
|
|
|
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.
|
|
| Mon May 19, 2008 3:48 am |
|
 |
nam

Joined: 23 Dec 2006 Posts: 67
|
|
|
|
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.
|
|
| Mon May 19, 2008 5:35 pm |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 186
|
|
|
|
Doesnt work for me either
|
|
| Fri May 23, 2008 9:35 am |
|
 |
nam

Joined: 23 Dec 2006 Posts: 67
|
|
A good plug-in but does not work |
|
Dear DD-FI,
This is a very useful plug-in but has the probelms mentioend about.
Can you please work to imporve it?
|
|
| Sun May 25, 2008 3:36 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2683 Location: Germany |
|
|
|
I added the $cutepath variable to the plugin.
|
|
| Thu May 29, 2008 5:42 pm |
|
 |
nam

Joined: 23 Dec 2006 Posts: 67
|
|
|
|
Thank you Dear FI-DD,
But what about the 2nd problem with the plug-in?
 |  |
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.
|
|
|
| Thu May 29, 2008 6:11 pm |
|
 |
nam

Joined: 23 Dec 2006 Posts: 67
|
|
|
|
And this problem:
 |  | 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? |
|
|
| Thu May 29, 2008 6:13 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2683 Location: Germany |
|
|
|
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.
|
|
| Thu May 29, 2008 7:15 pm |
|
 |
nam

Joined: 23 Dec 2006 Posts: 67
|
|
|
|
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.
|
|
| Thu May 29, 2008 9:49 pm |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 186
|
|
|
|
is it possible to set a ammount of characters?!
|
|
| Mon Jun 02, 2008 3:29 pm |
|
 |
|