With the micro project opened by me, i wanted to replace the twitter on the top, as i said yesterday. What i did is create a small plugin for WordPress that that actually reads an RSS feed and displays it the way you see on the top left corner, where my micros’ reside. You just need to activate the plugin and then call the function from within your code or theme. Clean and easy. Below is the signature (and a small documentation) of the function.
/*
* $url The rss feed URL to read from
* $date_format Which way to display the date according to the php's date function
* $description_chars How many characters to display from the description
* $items How many items to display
*/
function read_rss_mini($url, $date_format = 'D @ g:i a', $description_chars = 140, $items = 1){
As you can see you can only provide the RSS link and everything else will be taken care of. One more thing you can do, is the styling that you can apply. The head of the feed (hour and title) are wrapped around a “span” with a class of “micro_head” and the trimmed description is wrapped around a span with a class of “micro_body”.
I hope you find it usefull. You can download it from my site (for now since i submitted it on the WordPress repository and i am waiting on clearance) here: [download#6#size]
it would be even greater if it is published as widget for users like me know nothing. 😳
@littleoslo: i thought of it but a widget that reads RSS already exists with the default installation. that’s why i didn’t widgetize it…
thanks for downloading guys!
but i can add one rss feed there only right? i m confused with the default one. 🙄 🙁
@littleoslo: well you can add one here too… what you do with the default one is you just add the url to the feed and a title for the widget. you do the same here but on the code not through an admin page…
Nice! Now get on with some serious coding and give us the plugins everybody want. All the best and don’t keep us waiting.
And please use a simple math plugin in the comment if you want. Don’t use captchas. 😡
@Ashfame: i already have a plugin going on… thx for the comment!
ps: i love captchas 😛
Cool work buddy. Looking for some more plugins from you. BTW your feed is not getting updated in my feedreader . I wondered why you were not writing and when i decided to pop up here, saw a lot of cool posts.
i’ll look into it thx for mentioning and stopping by!
what must i type in my sidebar.php to enable the plugin?
@Qwertys: open your sidebar.php and call the plugin function like this “read_rss_mini(“url_to_feed”)”. for any more problems do not hesitate 😉
So to understand it correctly I can incorporate someone else feed into my blog, correct?
thanks
Yup that is what exactly this does…
I dont know how exactly to “call the function” and set the parameters. Whats the code for it?
@Daniel: Well if you want to put it on your sidebar, go to your theme and edit your sidebar.php file. Wherever you want it just use:
If you still need help, let me know!
Sorry, seems to be not campatible with wp 2.7.1 🙁 Any Idea?
@Daniel: Copy-paste your sidebar.php file on pastebin and i will write the proper code for you. Then you upload and you tell me if it works.
Hi again,
u have to know, that i am NOT a code-noob 🙂 But the problem is, that nothing happens, even NO error message with the placed code in the sidebar.php. The rss-area is blank. Maybe the function is to old for 2.7.1? Tonight when i am back from work i will paste my sidebar (and besides u will see, that i check wordpress very well :-))
Greets from sunny Berlin/Germany
I haven’t tested the plugin but i believe the problem Daniel might have is the fact that the host does not have the feature “allow_url_fopen on” which is usually required for the rss reader scripts. I’m currently looking for one that goes around this. I’m just guessing here though, i just know that the effect of having fopen off and attempting to use a rss script will result in a blank area like he describes.
@dke: If the fopen was closed from the host it would show an error that the wrapper (http) is not supported. He is says it’s completely blank! So, something weird is going on… Besides i have used this plugin with 2.7* with no problems at all…
Hi folks,
I solved the prob by writing my own feed plugin 🙂 Works perfectly as shown on my page. Thx for help and getting around with my request.
greets from rainy Berlin/Germany
Hello,
How to put into sidebar ?
Is it like this :
Sorry, I’m really newbie.
Regards,
Scholar
@Scholar: Did you try what i told the guys above? I mean copy-pasting the function call in your sidebar.php?
Hi !
Thanks for this plugin, it seems great.
The only problem is that I don’t understand what you have to do to make it work…
I’m trying to put it on the index.php, to have it displayed on the top of my “home page”. But when I copy/paste as you told, I just get an awful ”
” in place of the nice mini RSS feader…
What do I miss in your explanations? I mean, do I have to change anything else to the plugin code (?…) to make it work? Because it is already activated in my plugin WP page… and still I don’t get what I should do to make it active…
I have installed the plugin and added the code to the sidebar and get nothing. If I echo the function inside the side bar I get ‘Nothing there!’. The feed is good but cannot figure it out. Any suggestions?
Trying to get this to work in a sidebar with no luck. Nothing is showing up at all. I installed and activated the plugin. Here is the code I’m using in the sidebar.php file…
That URL is just a random one I picked for testing. Am I doing something wrong?