OWA Most Popular
NOTE : THIS PLUGIN IS OUT-DATED AND WILL NOT WORK IN NEWER VERSIONS OF OWA (1.2+)
Prerequisites
Changelog
- 0.1 – inital coding
- 0.2 – recoded using the API instead of raw SQL queries (suggestion by Peter Adams)
- 0.3 – added date range parameter (suggestion by Mike McLin)
- 0.4 – bugfix
- 0.5 – PostOnly feature
- 1.0 – Proved stable + Detection if OWA does not have any data yet (bugfix)
- 1.1 – Code moved to seperate function (for flexibility)
- 1.2 – New algorithm : Weighted factor = visits / age
- 1.3 – Options can be set thru the widget control panel
- 1.4 – Live Feed widget added, can be selected as “algorithm” too
- 1.4.1 – Bugfix
- 1.4.2 – Referal layout change
- 1.5.0 – Wordpress Theme compliance
- 1.5.1 – Header title fix for Live Feed Widget
- 1.6.0 – Category algorithm : filter on category id
- 1.7.0 – Fix for getMetric error on OWA 1.1.1+ installations
Script
Wordpress Extend
Subversion
Installation
- Get the script from (f.e.) Wordpress Extent
- Copy the “owa-most-popular-widget.php” file to your to your wp-content/plugins directory (you may put this in a seperate directory within the plugins directory too)
- Copy the “owa-images” directory to your theme directory
- Go to the “plugins”-tab under your admin panel
- Enable the plugin called “OWA Most Popular”
Configuration (widget)
- Go to the “Presentation”-tab
- Go to widgets, and drag it/them to your widget sidebar
Configuration (non-widget)
- OWA Most Popular (api based)
print owa_api_popular($amount_of_entries,$date_range,$post_only);
print owa_api_popular();
- OWA Most Popular (weighted)
print owa_weighted_popular($amount_of_entries);
print owa_weighted_popular();
- Live Traffic Feed
print owa_live_traffic_feed($amount_of_entries);
print owa_live_traffic_feed();
- OWA Most Popular (category)
print owa_category_popular($category_id,$amount_of_entries,);
print owa_category_popular($category_id);
- Defaults:
$amount_of_entries=10
$date_range=”last_seven_days”
$post_only=TRUE - Possible values for “date_range”:
today – last_24_hours – last_hour – last_half_hour – last_seven_days – this_week – this_month – this_year – yesterday – last_week – last_month – last_year – same_day_last_week – same_week_last_year – same_month_last_year – all_time – last_tuesday – last_thrity_days
FAQ
- Q: “I love your plugin!”
A: A small thank you as a comment or mail is always appreciated. Donations are also always welcome, in support to help pay the hosting bills.
Or if you want to enrich this blog even more, feel free to check out my wishlist.
- Q: “Call to a member function getMetric() on a non-object in… ” with OWA Version 1.1.1 (or higher)
A: The API was suddenly changed in version 1.1.1, so the code needed to be adjusted to handle the new situation. This has been fixed in version 1.7.0 of the plugin. - Q: “Call to a member function getMetric() on a non-object in… “
A: Make sure you have the OWA framework installed. - Q: “Is there any way to include every page, instead of only the posts?”
A: Set the variable “$post_only_owa_popular” to “FALSE”. - Q: “I don’t see any output, why is that?”
A: Does the OWA framework have any data yet? If you just installed the plugin, then the database may still be empty. - Q: “Can I change the number of posts it’s displaying?”
A: For the widget you can do this in the presentation menu, in the raw functions you can do this by passing a number to indicate how many posts you want to display. - Q: “How do you determine what is popular?”
A: The metric “Page Views” is used to determine this. - Q: “The plugin doesn’t work; Fix it for me!”
A: Read the license, it’s provided “as-is”. I’ll do my best effort to reply to all questions, but bare in mind that a message without any debug information is totally useless. I’m not gifted with a certain extra-ordinary talent that empowers me to know all your configurations/implementations.
So if you want help, please provide me with basic debug information. - Q: “Could you adjust the plugin to do *insert feature*?”
A: Feel free to suggest things, but bare in mind that I do this in my spare time. If you want to speed things up, you are also free to contact me for custom services. Yet you are still free to do any changes you like; as it’s released under the BSD-license, you aren’t obliged to contribute your changes back, but it’s always appreciated. - Q: “How come I don’t get any flags in my -Live Feed-?”
A: As stated in the readme.txt file; make sure you copy the owa-images directory to your theme directory.






Ooooh lawd! It must be my birthdya. Thank
Mike McLinOoooh lawd! It must be my birthdya. Thank you very much for the update
Was my pleasure, I've implemented it myself too. ;)
Karim VaesWas my pleasure, I’ve implemented it myself too.
Hi. I love this plugin. Is there any way to
Randy BryanHi. I love this plugin. Is there any way to suppress my default page from showing up in the list of most popular pages? ie, I don’t want randybryan.com to be listed in the list. Thanks!
Perfect!
Mark EvansPerfect!
*cleaned up comments, as there were a lot of support
Karim Vaes*cleaned up comments, as there were a lot of support questions here*
I'm getting the following PHP Error Message. Any idea
AnishI’m getting the following PHP Error Message. Any idea what may be the cause of this
Fatal error: Call to a member function getMetric() on a non-object in /public_html/blog/wp-content/plugins/owa-most-popular/owa-most-popular-widget.php on line 143
Read the FAQ?
Karim VaesRead the FAQ?
Could this be altered for links rather than posts?
franzCould this be altered for links rather than posts?
I don't want to use the widget configuration but the non
JohanI don’t want to use the widget configuration
but the non widget config.
When I add
in the sidebar I get:
Fatal error: Call to a member function on a non-object in …/owa-most-popular/owa-most-popular-widget.php on line 143
How to fix this?
@Franz: Could you provide me with some details on what
Karim Vaes@Franz: Could you provide me with some details on what you had in mind?
@Johan: What was the code you used to that caused the above? It would be helpful for me to try to debug this.
my code was:
Johanmy code was:
owa_weighted_popular($amount_of_entries); owa_weighted_popular(); (sorry php block) thanks in advance
Johanowa_weighted_popular($amount_of_entries);
owa_weighted_popular();
(sorry php block)
thanks in advance
Do you have OWA framework installed? I also made a change
Karim VaesDo you have OWA framework installed?
I also made a change in the documentation, the functions return an output, but they do not print it. So you should add “echo” or “print” in front of it.
I currently using Popularity Contest but the alignment is bad: *
JohanI currently using Popularity Contest but the alignment is bad:
* Virus programma NOD32
veranderd van naam
* Firefox 3 (bèta 1)
* Telenet verhoogt snelheid
* OpenOffice ook bestuurbaar via
de browser
* GPU-Z
* DxAdsl actie Seodsldx
* Belgische Zeitgeist 2007
like to have it too:
* Virus programma NOD32
veranderd van naam
* Firefox 3 (bèta 1)
* Telenet verhoogt snelheid
* OpenOffice ook bestuurbaar via
de browser
* GPU-Z
* DxAdsl actie Seodsldx
* Belgische Zeitgeist 2007
Best Regards, Johan
This plugin relies on OWA (as stated above) for it's
Karim VaesThis plugin relies on OWA (as stated above) for it’s data. For alignment of data, you may want to try out css?
I have a strange behavior with my OWA setup. The
AlexanderI have a strange behavior with my OWA setup. The visits are counted successfully if I access the website using Internet Explorer, but no visit is counted if I use Firefox, for the same pages. What can be wrong here? Is there any setting I should look for?
That's probably related to the OWA setup, for support on
Karim VaesThat’s probably related to the OWA setup, for support on that area, you’re better served with checking at their trac page…
Thanks for taking the time to keep this plugin updated.
plannerThanks for taking the time to keep this plugin updated. The non-widget support is what I have been waiting for.
Another feature that I would love to see is printing most popular per category or category range. For example:
print owa_api_popular($5); or
print owa_api_popular($5,8);
Where the numbers represent category ids
You get the idea.
Thanks for your time.
Here you go... released ;-)
Karim VaesHere you go… released
Hey, i'm having a bit of trouble on my website.
Daily YeahHey, i’m having a bit of trouble on my website. The regular option doesn’t work and the Live feed option doesn’t display anything. Help
Did you just install the plugin, then check out the
Karim VaesDid you just install the plugin, then check out the FAQ…
The plugin needs data (read: visitors) to show anything. OWA will not show any trace of what admin users do (if I’m not mistaken).
If that isn’t the problem: Do the other options work? If so, which versions do you use? (owa, owa most popular & wordpress)
Very nice plugin.
plastikVery nice plugin.
have a strange behavior with my OWA setup. The visits
otogazhave a strange behavior with my OWA setup. The visits are counted successfully if I access the website using Internet Explorer, but no visit is counted if I use Firefox, for the same pages. What can be wrong here? Is there any setting I should look fo
Could it be that you are logged in (as admin)
Karim VaesCould it be that you are logged in (as admin) under your firefox session, and not under internet explorer session? OWA doesn’t count admin visits…
If that shouldn’t solve it for you, then you’re best off to try the mailinglist of OWA.
Hi there, great plugin, I don't think category filter works :-( I
Paul LaceyHi there,
great plugin, I don’t think category filter works
I just get the number of my category printed
Any ideas
Cheers
Paul
Just tested it myself, and it works here... How are
Karim VaesJust tested it myself, and it works here… How are you invoking it? Did you use the widget form, or thru the php function?
hi Karim, through the template tag (not the widget)... I am doing
Paul Laceyhi Karim,
through the template tag (not the widget)…
I am doing this: print owa_category_popular(1);
And simply nothing shows…..
This one works: print owa_api_popular();
But I need to only show category 1….
Any ideas are gladly received!
I'm guessing that you do not have a category with
Karim VaesI’m guessing that you do not have a category with id 1, or the OWA framework hasn’t registered any visits to posts within this category.
I'm getting the error Fatal error: Call to a member
Andre KibbeI’m getting the error Fatal error: Call to a member function on a non-object in /home/akibbe02/public_html/tools-for-thought/wp-content/plugins/owa-most-popular-widget.php on line 173.
This message doesn’t have the “GetMetic()” call, and I have OWA installed and activated. I’m assuming the image folder is supposed to be installed in the folder for my active theme, not in the general “Themes” directory. Any ideas? TIA.
Never mind. I went back to the Plugin Management page,
Andre KibbeNever mind. I went back to the Plugin Management page, and it turns out that OWA wasn’t activated.
Thanks for implementing my suggestion. Will come in very handy
plannerThanks for implementing my suggestion. Will come in very handy for a Linux/BSD site that I’ll be launching in two weeks.
A question. How may this plugin be used with a standalone installation of owa
It doesn't... it expects OWA to be installed in the
Karim VaesIt doesn’t… it expects OWA to be installed in the same database as where the wordpress tables reside.
Suggest you just sit there and wait till life gets
FupeneugwenSuggest you just sit there and wait till life gets easier.
—————————————————————————————————-
http://xanga.com/oscarpierceie
hi there .thanks for plugin: Does anybody know if tis script
baronhi there .thanks for plugin:
Does anybody know if tis script is compatible with Wordpress 2.5.1 ?
Thanks in advance for any help on this!
regards
It's compatible up to the latest release, as I follow
Karim VaesIt’s compatible up to the latest release, as I follow the release cycle very closely.
Hi Boss, I found this may redundant "......" Copy the “owa-most-popular-widget.php” file
mprHi Boss,
I found this may redundant “……”
Copy the “owa-most-popular-widget.php” file “to your” to your wp-content/plugins directory (you may put this in a seperate directory within the plugins directory too
I used theme “http://thedeadone.net/” that enable to make forum with wordpress.
I have installed plugin OWA … and found error:
Your help are most appreciated.
thanks
It isn't redundant to some... ;-) So you error is...?
Karim VaesIt isn’t redundant to some…
So you error is…?
I meant there are two double word "to your” on
mprI meant there are two double word “to your” on your post on the above.
Back to my big problem
I used theme “http://thedeadone.net/” that enable to make forum with wordpress. I have installed plugin OWA … and found error:
On widget there are some syntax errors below the widget box :
am I should make any change on the OWA code/php or on function.php?
thanks
Do a search on getMetric on THIS page, and you'll
Karim VaesDo a search on getMetric on THIS page, and you’ll find the answer to your questions -multiple- times…
You may be expert in writing plugins but you the
Shanker BakshiYou may be expert in writing plugins but you the biggest DUMBO i have ever seen – The layman guy is asking about his getMetric Problem above and you are idiotically referring him to look in FAQ or to look here and there. You so lazy and Dumbo can’t explain it at one place on your post. Well I will do it for you on my blog after all there are always few guys who extend help
The error regarding the getMetric is handled multiple times on
Karim VaesThe error regarding the getMetric is handled multiple times on this page, and I get numerous requests (by mail) on this situation. The plugin depends (as clearly stated on this page) on the OWA framework. So if one wishes to use this, they have to install the OWA plugin too…
Let me remind you that I’ve written this code for my own purpose, yet I’ve published this under a FreeBSD license. This way everyone is free to do whatever they want to do with it. I’ve stated that I’d give support on it, depending on the amount of spare time I have.
It’s been downloaded more than 1500 times, yet the amount of “thanks” I’ve got is pretty low in regards to the amount of support I’ve given… So excuse me that I just refer to the FAQ, which is published on the same page as the request(/comment).
Thanks anyway for your comment, I hope this clears things up for you, and might encourage you to think before commenting next time…
Hi, it seems that your plugin (version installed 1.6.0) no
SkumpicHi, it seems that your plugin (version installed 1.6.0) no longer works with the last release of OWA (version 1.1.1 released on 31 may).
Can you confirm it and do you think to upgrade your great plugin ??
THANKS in advance
Skumpic
The getMetric issue with the 1.1.1 version has been fixed.
Karim VaesThe getMetric issue with the 1.1.1 version has been fixed. For some reason the invokation of the API to the OWA framework changed… So to all those who faced the getMetric error on wordpress 2.5+ with OWA 1.1.1+ versions, upgrade to version 1.7.0 (or higher) of this plugin.
Thanks, the new version 1.7.0 works perfectly. Thanks
SkumpicThanks, the new version 1.7.0 works perfectly.
Thanks
Good to hear! ;-)
Karim VaesGood to hear!
I have read over this page but didnt notice this
JesseI have read over this page but didnt notice this question answered. Using your default call:
print owa_api_popular($amount_of_entries,$date_range,$post_only);
My main posts page shows up as the most viewed. Is there any way to have it not show up?
Thanks, this plugin does solve a LOT of problems for me
Try setting the "$post_only" variable to TRUE? Then pages are
Karim VaesTry setting the “$post_only” variable to TRUE? Then pages are filtered out of the top content.
Are you sure the images go in the theme directory
Alan KelloggAre you sure the images go in the theme directory instead of the images/images directory?
I'm... That's how it always worked for me. But
Karim VaesI’m… That’s how it always worked for me. But feel free to experiment…
Is there anyway to exclude a certain category from being
JesseIs there anyway to exclude a certain category from being displayed in the list using the owa_api_popular() tag?
The current version doesn't support this, yet I guess it's
Karim VaesThe current version doesn’t support this, yet I guess it’s possible to create.
Thanks
OtogazThanks
Very important and useful plugin I think.
burun estetiğiVery important and useful plugin I think.
Could it be that you are logged in (as admin)
kopCould it be that you are logged in (as admin) under your firefox session, and not under internet explorer session? OWA doesn’t count admin visits…
If that shouldn’t solve it for you, then you’re best off to try the mailinglist of OWA.
Internet Explorer & Firefox are two seperate programs, so they
Karim VaesInternet Explorer & Firefox are two seperate programs, so they don’t share their sessions. OWA works on session based and not on IP address. This is because session information is seen as more accurate than IP. Imagine that your are connected thru a router to the internet. All the people surfing on your network would have the same IP, and would would happen then if they would check the same website?
What about tag pages? I’m finding that alot of my
Plastik cerrahiWhat about tag pages? I’m finding that alot of my traffic is coming from tag pages. I didn’t see any settings for true/false with regard to tag pages. Thx.
love this plugin. Is there any way to suppress my
estetiklove this plugin. Is there any way to suppress my default page from showing up in the list of most popular pages? ie, I don’t want randybryan.com to be listed in the list.
So to all those who faced the getMetric error on
ünlülerSo to all those who faced the getMetric error on wordpress 2.5+ with OWA 1.1.1+ versions, upgrade to version 1.7.0 (or higher) of this plugin.
thanks a lot.
dış cephethanks a lot.
thanks.
hekimboardthanks.
Sounds very cool, but I’m not seeing the example you
Burun EstetiğiSounds very cool, but I’m not seeing the example you talk about.
it’s not all bad news - some things apparently went
Estetikit’s not all bad news – some things apparently went right with Wordpress 2.3. This isn’t the first scandal to rock Wordpress. It was previously found that
Hi, How do I reduce the font size of the
MattHi,
How do I reduce the font size of the titles used with this plugin?
I noticed the H2 tags being used and changed them the H3 to reduce the size but they don’t seem to change.
Whats happening is that the sidebar where the plugin is being used is too narrow for the default font size for this plugin so its squashing the text between the frames (or in the sidebar)
you can see what happening here: http://www.mattbrownblog.com (by the way – it only squashes the text when using a mac)
Help / advice appreciated.
Thanks
Matt
The code is currently not foreseen, as it deviated from
Karim VaesThe code is currently not foreseen, as it deviated from the default behaviour of wordpress plugins. It’s possible to adapt the script to encorporate such a feature.
nice post!
tercümenice post!
thanks
ikinci el iş makinalarıthanks
new version works great...
temel kimyanew version works great…
great page! thanks a lot.
lazer epilasyongreat page! thanks a lot.
nice post!
iddaanice post!
Hi Karim, very good little plugin, simple to use anywhere
YorikHi Karim, very good little plugin, simple to use anywhere in your blog… Thanks a lot for making it! Cheers Yorik
Question about WordPress Plugin - Popular Posts - Personal Development
Trackbacks