Extension: wzup - article view counter

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: Extension: wzup - article view counter

Postby julia » Fri Jan 16, 2009 12:27 pm

Thank you Wim, this is just what I needed and it was really easy to implement!

One question though. I would like to give a couple of the articles a boost in the number of people who read it. This is because some of the articles are really indepth and I want to highlight them by helping them in the rating.. Tried looking at the source code but I am not that good at it, where would i add the extra numbers?

Thanks
Julia
julia
 
Posts: 9
Joined: Tue Jan 13, 2009 3:32 pm

Re: Extension: wzup - article view counter

Postby Wim » Sat Jan 17, 2009 4:45 pm

julia wrote:One question though. I would like to give a couple of the articles a boost in the number of people who read it.


Julia wants to start cheating a little bit here ;) OK it is for a good cause, so I help:

1. (the obvious but hard way) you can of course F5 the article a number of times and the counter will increase with each F5 key press

or 2. you use this little tool that I wrote for this purpose. You can grab it from here, unpack the zip, put the file in your pivot/db/wzup/ folder and then execute it for each article id that you want to give a specific starting count, like this:
Code: Select all
http://yoursite.../pivot/db/wzup/wzupcheat?id=571&value=101

this would give the article with id 571 a starting wzup count of 101.

Remember to remove the wzupcheat.php file from your pivot/db/wzup/ folder after you're done (there is no protection from others messing with this!)
Last edited by Wim on Mon Aug 08, 2011 8:15 pm, edited 1 time in total.
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: wzup - article view counter

Postby julia » Sun Jan 18, 2009 11:15 am

Thank you Wim!! Really nice! When cheating for a good purpose is not really cheating =)
julia
 
Posts: 9
Joined: Tue Jan 13, 2009 3:32 pm

Re: Extension: wzup - article view counter

Postby Wim » Sun Jan 18, 2009 6:11 pm

I have released wzup 0.8X (beta), a new version that contains solutions to the two requests posted in this forum:

    1. count multiple times that the same user reads an article as only one hit. This is done with a cookie that expires after 24 hours.

    2. the first reader that reads an article will see a count of 0 views (actually the wzupshow counter on the entry page will always be one behind due to order of processing of the code). This is now circumvented with a fix, but this is slightly inadequate and may be revised later.

Upgrading is simple and will not impact your existing wzup counts:
    1. Grab the zip file from the first post in this forum topic. Unzip the files and put them in the pivot/extensions/wzup/ folder on your server, replacing the existing files.
    2. Go to the extensions section in your PivotX dashboard, that will trigger the final update of the necessary files

Feedback is very welcome!
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: wzup - article view counter

Postby julia » Tue Feb 17, 2009 8:49 am

HI Wim,

Thanks for a really good extension!

I was wondering if you or anyone else could help me out taking it one step further. We at our site post diffrent categories, often several per entery. But if one clicks on an entery I want to list the most popular posts in that category to be listed after the entery. I know one can set categoires by using this for example:
Code: Select all
[[wzuptop count=100 cutoff=80 format="Rank %num%, Views %views%, <a href='%link%'>%title%</a>" categories="fun,lol"]]
but i want it to be automatic so if one reads an entery about business the top 5 other enterys of business will follow.

I guess this could be done by a simple php script?

Thanks!!
julia
 
Posts: 9
Joined: Tue Jan 13, 2009 3:32 pm

Re: Extension: wzup - article view counter

Postby Wim » Wed Feb 18, 2009 8:25 pm

julia wrote:But if one clicks on an entery I want to list the most popular posts in that category to be listed after the entery.
...but i want it to be automatic so if one reads an entery about business the top 5 other enterys of business will follow.


Interesting suggestion. Inside an entry context only to show a top listing of entries that belong to the same category or categories as the current entry.

I need to have a look at this in more detail, but I should be able to code this in. I already know of an elegant way, namely adding the option "categories=." to the options in wzuptop. This weekend I will startup my coding engine once again...
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: wzup - article view counter

Postby julia » Thu Feb 19, 2009 3:50 pm

That would be great if you could implement that Wim! One tricky thing might be that we often post one entery with several catagories. So I don't know what the best way is to handle that...
julia
 
Posts: 9
Joined: Tue Jan 13, 2009 3:32 pm

Re: Extension: wzup - article view counter

Postby Wim » Sat Feb 21, 2009 6:40 pm

julia wrote:That would be great if you could implement that Wim! One tricky thing might be that we often post one entery with several catagories. So I don't know what the best way is to handle that...


It's ready and attached to this post. Please go ahead and install this version and let me know if it works as required. Note that this file is not the complete release, only for upgrades and for testing right now (get the complete release from the first entry in this post).

It adds a new option for the categories parameter. If you specify categories=. (that is a dot) then it will filter the best viewed articles for the categories that the current entry has been assigned to.

example: if you put this
Code: Select all
[[wzuptop categories=.]]
in your template within the context of an entry that belongs to categories a and b, then it will display a list of most viewed articles in categories a and/or b. (Outside the entry context it will display all entry categories)
Attachments
widget_wzup.php.zip
(4.63 KiB) Downloaded 621 times
User avatar
Wim
 
Posts: 59
Joined: Sun Dec 28, 2008 11:32 am

Re: Extension: wzup - article view counter

Postby mbootsman » Thu Mar 19, 2009 9:29 am

Wim,

I just upgraded to PivotX RC.
Wzup is not really working. It is showing the statistics from before the upgrade but new views are not regsitered.
If I look in the debug log I see the following message:

Code: Select all
Error - wzup.php not found in extensions/wzup directory


But, in the /pivotx/extentions/wzup dir, wzup.php and widget_wzup.php are available and chmodded to 777.

Hope you can help me solve this, thanks!
mbootsman
 
Posts: 89
Joined: Tue Apr 29, 2008 7:09 am

Re: Extension: wzup - article view counter

Postby hansfn » Thu Mar 19, 2009 9:53 am

The script needs to be update - every where you see "pivot_path" use "pivotx_path".
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

PreviousNext

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 1 guest

cron