WordPress.org

Ready to get started?Download WordPress

Forums

RSSImport
[resolved] Demo template code not working? Make sure to use all the variables! (4 posts)

  1. Jonathan Lahijani
    Member
    Posted 1 year ago #

    I was working with this plugin and noticed that the demo code shown on the home page of this plugin was not bringing in the elements I set, like the date. Don't use that code. Instead, bring in all the variables in the call and set whatever you need.

    function RSSImport(
    		$display = 5, $feedurl = 'http://bueltge.de/feed/',
    		$before_desc = '',
    		$displaydescriptions = 0,
    		$after_desc = '',
    		$html = 0,
    		$truncatedescchar = 200,
    		$truncatedescstring = ' ... ',
    		$truncatetitlechar = '', $truncatetitlestring = ' ... ',
    		$before_date = ' <small>', $date = 0, $after_date = '</small>', $date_format = '',
    		$before_creator = ' <small>', $creator = 0, $after_creator = '</small>',
    		$start_items = '<ul>', $end_items = '</ul>',
    		$start_item = '<li>', $end_item = '</li>',
    		$target = '',
    		$rel = '',
    		$desc4title = 0,
    		$charsetscan = 0, $debug = 0,
    		$before_noitems = '<p>', $noitems = 'No items, feed is empty.', $after_noitems = '</p>',
    		$before_error = '<p>',
    		$error = 'Error: Feed has a error or is not valid',
    		$after_error = '</p>',
    		$paging = 0,
    		$prev_paging_link = '&laquo; Previous', $next_paging_link = 'Next &raquo;',
    		$prev_paging_title = 'more items', $next_paging_title = 'more items',
    		$use_simplepie = 1,
    		$view = 1
    	)

    http://wordpress.org/extend/plugins/rss-import/

  2. novaclic
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your contribution.

    There is a plan to move forward having an associative array as parameters, to avoid this long list of parameters... The question is: how many plugin users would value the code rewrite?

  3. novaclic
    Member
    Plugin Author

    Posted 1 year ago #

    Nobody ?

    :-(

  4. Ryan
    Member
    Posted 1 year ago #

    I would. Definitely.

    Right now output becomes a bit of an unpredictable mess when adjusting arguments and not including absolutely every variable. Having an associative array and managing arguments the same as with core WordPress functions seems like the best way to go.

    -R

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags