Saturday 12th July 2008

by Sajith M.R

After the success of my previous wordpress plugins , Announcement, Show My Page Rank, Sexy Rating, Add to this , Stumble Reviews, I created one more interesting plugin, called Currently Reading Posts Plugin.

Whenever a visitor visits your website, he can see what are the posts currently reading by other visitors. It is like youtube’s currently watching videos.

Wordpress Currently Watching Plugin

You can see its current working at the top right corner of this website.

Download the plugin for here: http://www.sajithmr.com/downloads/CurrentlyWatching.zip

Go to Admin > Plugins > and activate the plugin.

Paste this code: <?php wp_show_currently_watching() ?> by editing your template / theme . (I placed the code in header.php file)

It is implemented with ajax support.

Tags: , , , , , , ,

· · · ◊ ◊ ◊ · · ·

37 Responses to “Show WordPress Currently Reading Posts”

  1. Alex says:

    guys help me out, how i can use wp-postratings plugin within this plugin, i added option the_ratings()in $division section which is default option from wp-postratings plugin and i see stars but not ratings. and for those who are wondering how to set their own number of posts to show, in CurrentlyWatching.php find add_option(‘cw_queue’, 8 , “”); and put number of posts you wont to show(i put 8) if you already installed plugin, find in database in options table cw_queue and put there your number of posts. this way it worked for me.

  2. Alex says:

    and can someone help mi configure it with stars rating, comments, and post view’s plugins, i reconfigured division section, but it shows everything out of area, only images are right

  3. Alex says:

    Is there any way to make this plugin show last 8 posts instead of 4

  4. Radu says:

    Hello. I have a little problem with this plugin. After I’ve add on my blog, it shows and extra space between the plugin and the rest of page. The plugin is installed into header.php under the title code. Can someone help me to fix this? Click on my name to see what I’m talking about :) . Thanks, Radu

  5. Stef says:

    Great plugin, i love it!

  6. Pls thell me if it is normal that the plugin on google chrome browser is styled to see the recent watched posts side by side & on internet explorer it is styled to see the recent watches among each other i hafe to fix anything on da code?

  7. www.Trancentral.Asia says:

    Awesome Plugin! Thx Alot. . .makes bloglife so much better ;) dreams come true ;)

  8. mark says:

    my code got eaten by the comment system.. hopefully this gets through

    “Below replace what is there with

    post_title.'">post_title.'" height="50" width="50">
    ';

  9. mark says:

    I figured out how to add my own custom field image to this….

    in getcurrent_im.php scroll down to
    $division = ‘

    Above it add
    $my_images = get_post_meta($post->ID, ‘thumbnail_small’, true);

    Below it replace what is there with

    post_title.’”>post_title.’” height=”50″ width=”50″>
    ‘;

    (replace everyting up to the first “;” that tells php the line is done)
    The first line of code you add says, if there is a variable called “thumbnail_small” on the page make it $my_images

    In the second line it tells it to put that variable into the page.

    Just change it to fit your needs.

    Thanks Rob for your input on fixing this up too!

  10. greg says:

    hi@all
    someone knows where i adjust the ajax time for reload..now its ca.6 seconds, i want 10 or 15..thanks a lot and enjoy .:

  11. greg says:

    @rob you know where i can configure to show more images.thx and nice weekend

  12. greg says:

    i love u rob ..THX :)

  13. rob cain says:

    sorry some of my responses above dissappeared. to clarrify:

    the last fix is to change span to /span, near very end of file getcurrentim.php.

    the one before that is to move the link tag from $header_template and place it instead in your header file.

    the one before that was removing the iframe (and adjusting css) in file CurrentlyWatching.php

    and the one before that was changing echo to retur return at the end of update_cw_queue function in same file.

    hope thats clear:)

    good luck

  14. rob cain says:

    hi
    to anyone having problems with this plugin conflicting with others, in particular, it ‘eats’ up the $content variable and doesnt pass it down the filter chain to pluginds later n teh install/calling sequence.

    the solution is as follows:

    file: CurrentlyWatchin.php, function: update_cw_queue($content).

    notice that it echoes the result

    echo $content

    change this to

    return $content;

    presto, it should work! at least ot does under my config – wpmu2.7 with lots of other plugins loaded – and they now all work also.

    i thought at first it was the install call to register_activation_hook, but some hours tracing and eliminating bits of code [proved this was nothing to do with it.

    also, i got rid of the horid iframe in wp_show_currently_watching(), it wasnt really causing a problem, but its asking for one to appear. some css changes to compensate.

    some further bugs found and corrected:
    file: getcurrentim.php, function: begin()
    where it says:

    $header_template = ‘
    … etc

    remove the link tag – this is not valid html if placed here – it need to be moved to the header.php file in your template (or other means of getting it in the header section).
    that line now reads:

    $header_template = ‘

    finally: change the penultimate line of this file, (trailing) occurence of should be

    (please remove my extra spaces around above- they are only there so this code example will show up here)

    apart from that (bit of pain), great plugin, thanks, makes for more engaging/social navigation, especially on a news site.

    hope the code above print out ok here (I can mail a copy to author if not).

    regards
    rob cain

  15. greg :) says:

    hello again.. thx rat for your help. now i have the same problem like one before.. if you use codes on your site like adsense [ad#ad1] or to post youtube videos [youtube]link[/youtube] this plugin disable then… Like, instead of showing the ad for [ad#ad1] itll show just like [ad#ad1] and if you post a youtube video [youtube]link[/youtube] instead of showing the video itll jsut show the [youtube]… Sorry about my english, im not emrican but i tried to explain though

  16. ren says:

    hello can i know if the reason of iframe ??is it because so the its cannot be affcted by the catch right??

  17. ren says:

    Hi admin great plugins

    but i need to know if they support a meta key or custom field :)

    thanks many thanks

  18. greg again :) says:

    someone have the same problem ??

  19. raT says:

    i canot post html code here…

    include the cwstyle.css in your header and it works

  20. raT says:

    oups the code disapeared…
    this line i mean.

  21. raT says:

    @greg
    the only thing you have to do is to append this line to your header.

    and after that it is working on internet explorer
    :)

  22. greg says:

    nice plugin.
    but in IE shows just one thumb in a line..in FF its perfect.. where is the problem :) thx for helping

  23. Levent says:

    thx very much.awesome plugin.How can I use custom field “Thumb” for picture in that post…?

  24. Miguel says:

    ps.: I think you should really work ont hat plugin, because it is the only one I found like that… so it would make a lot of success

  25. Miguel says:

    Hello, this plugin is great, the only problem is: if you use codes on your site like adsense [ad#ad1] or to post youtube videos [youtube]link[/youtube] this plugin disable then… Like, instead of showing the ad for [ad#ad1] itll show just like [ad#ad1] and if you post a youtube video [youtube]link[/youtube] instead of showing the video itll jsut show the [youtube]… Sorry about my english, im not emrican but i tried to explain though :P

    So please do you think it will be possible to fix that? im really intreasted on that plugin.

    Thank You

  26. NotAlame says:

    Hi!

    Thanks a lot for this beautiful plugin…
    But I have 2 problems:
    1. When I want to add it as a widget, nothing happen ( I don’t see anything on my widgets… )
    2. And, when I add it on the header, all my links become blue colors (they are orange…)

    Thanks

  27. Akaber says:

    its conflict with another plugin that i dont know it !
    when i activate it , its duplicate my post content 3 times and stop many plugins work !

  28. tarzan says:

    thanks a lot Sajith :) hope to see the upgraded version soon :)

  29. Sajith M.R says:

    I made this plugin as a testing purpose. If more people like it, i have to code it with more functions and options. Yep, i will upgrade this plugin soon

  30. tarzan says:

    I am surprised to see no replies for our queries here. Your answers to our queries will be highly appreciated. thanks again

  31. dmeemai says:

    Just want to say BIG THANK YOU for this wonderful plugin! I love it! It’s live on my website now! Am very pleased with it.

    I tried it with another site- unfortunately, it contradicts with my other plugins, can’t pinpoint which but it just screws up the whole layout of the theme. It won’t work :-(

    Bless you for making this available for free! :-)

  32. tarzan says:

    Hi Sajith,
    Is there a possibility of restricting the number of windows to a lesser number. Right now its 6. Please let me know.

  33. Adrian says:

    Hello.

    Very nice plugin, thank you.

    However, I’ve noticed a problem, in IE, it doesn’t show up good(it shows without graphic, one pic in a row).

    Also, how can we limit the number of posts to show up(currently 6) ?

  34. iCarlo says:

    Hi!

    Thanks for this plugin, very particolar!

    I have some question,

    Can we edit the number of recent post showing?! can we set 3 images in a row?

    Thanks again

  35. Sajith M.R says:

    @Ged
    That is the picture in that post. If there is no pictures, default wordpress logo will be displayed

  36. ged says:

    How do you put the imagelogos ?

  37. TheAnand says:

    This is really awsome! Just like the concept on youtube…..But will it make my blog slower? I am considering this plugin after my blogs redesign.

· · · ◊ ◊ ◊ · · ·

Leave a Reply

وظائف 2011 تحويل العملات برامج برنامج تسريع التحميل برنامج الفلاش برنامج محول الصوتيات عربي hotel 2011 زيادة رواتب العساكر 1431