Show Wordpress Currently Reading Posts
Posted on 12. Jul, 2008 by Sajith M.R in Downloads, php
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.

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.



TheAnand
Jul 12th, 2008
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.
ged
Jul 20th, 2008
How do you put the imagelogos ?
Sajith M.R
Jul 20th, 2008
@Ged
That is the picture in that post. If there is no pictures, default wordpress logo will be displayed
iCarlo
Jul 26th, 2008
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
Adrian
Aug 26th, 2008
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) ?
tarzan
Aug 31st, 2008
Hi Sajith,
Is there a possibility of restricting the number of windows to a lesser number. Right now its 6. Please let me know.
dmeemai
Sep 10th, 2008
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!
tarzan
Oct 1st, 2008
I am surprised to see no replies for our queries here. Your answers to our queries will be highly appreciated. thanks again
Sajith M.R
Oct 2nd, 2008
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
tarzan
Oct 2nd, 2008
thanks a lot Sajith
hope to see the upgraded version soon
Akaber
Oct 21st, 2008
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 !
NotAlame
Dec 5th, 2008
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
Miguel
Dec 17th, 2008
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
So please do you think it will be possible to fix that? im really intreasted on that plugin.
Thank You
Miguel
Dec 17th, 2008
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
Levent
Dec 20th, 2008
thx very much.awesome plugin.How can I use custom field “Thumb” for picture in that post…?
greg
Jan 14th, 2009
nice plugin.
thx for helping
but in IE shows just one thumb in a line..in FF its perfect.. where is the problem
raT
Jan 22nd, 2009
@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
raT
Jan 22nd, 2009
oups the code disapeared…
this line i mean.
raT
Jan 22nd, 2009
i canot post html code here…
include the cwstyle.css in your header and it works
greg again :)
Jan 24th, 2009
someone have the same problem ??
ren
Feb 13th, 2009
Hi admin great plugins
but i need to know if they support a meta key or custom field
thanks many thanks
ren
Feb 13th, 2009
hello can i know if the reason of iframe ??is it because so the its cannot be affcted by the catch right??
greg :)
Mar 11th, 2009
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
rob cain
Mar 12th, 2009
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
rob cain
Mar 12th, 2009
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
greg
Mar 13th, 2009
i love u rob ..THX
greg
Mar 14th, 2009
@rob you know where i can configure to show more images.thx and nice weekend
greg
Apr 23rd, 2009
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 .:
mark
Oct 2nd, 2009
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!
mark
Oct 2nd, 2009
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">
';
www.Trancentral.Asia
Nov 29th, 2009
Awesome Plugin! Thx Alot. . .makes bloglife so much better
dreams come true
Trancentral.Asia
Nov 29th, 2009
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?
Stef
Mar 2nd, 2010
Great plugin, i love it!