rss feed lookup in database

Developers
2013-07-02
2013-07-10
  • i'd like to create a rss feed reader widget that take the url from the feed in a database. user will chose the feed they want to add when installing the widget on their page.
    any clue on how i could do that with posh?
    thanks

     
    Last edit: Thibault Honegger 2013-07-02
  • hi
    You can duplicate the posh rss feeds widget, add pwspecif=mywid, copy portal/xmlfeeds.php as portal/xmlfeeds_mywid.php
    then modify the xmlfeeds_mywid.php to set the selection of the rss feed as a drop down list build from your database.

     
  • super thanks! i ll keep you updated

     
  • ok so I duplicated the feed widget, add pwspecif to the param and created a personalized portal/xmlfeeds_blabla.php. However, it does not seem to load the proper page.(I echo some string in php without anything echoing) When looking in the code, I cant see where is th mywid param loaded, is it with a _ before or not?
    thanks for the help

     
  • in your example, pwspecif=blabla
    Opening your widget, you need to check (using network tab in firebug) that xmlfeeds_blabla.php is called

     
  • indeed xmlfeeds_blabla.php is not loaded by ../modules/p_rss.php?nb=5&pwspecif=papeers
    nor xmlfeedsmulti.php is loaded by ../modules/p_rss.php?nb=5&pwspecif=multi.
    Actually, I don t see in the code of p_rss.php any readout of the variable $_REQUEST["pwspecif"]), could you please be more specific on how this should work?
    Even if I try directly to load the url of the module directly, the authorisation doesn t seem to be working.
    Thanks again, your software rocks !

     
  • ok got it to work, I used directly the link to the module file and used queries with DB->getresults and %u in the request to avoid injection...

    Last question, can I include jquery in the head script? seems to be conflicting with other functions, any idea why?
    tks

     
  • Posh is using Mootools js framework. You should find on Google solutions to have both fw working together

    Cheers

     
  • ok mootools js framework is working great, thanks for the tip!