Results 1 to 3 of 3

Thread: [RESOLVED] Finish making this re-usable! (VisualAD!???)

Threaded View

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Resolved [RESOLVED] Finish making this re-usable! (VisualAD!???)

    VisualAD was helping me with this, but i havent seen him on MSN!

    anyway.. I am trying to make this code re-usable. Its an RSS Feed parser to be used on my forum. Right now I need 1 file for each feed, so im using basically 11 files, renaming the function names in each one and passing 1 feed url into each file. the result looks like this: http://staticfx.com/forums/bb3portal.php (rss gaming news section)

    now I would like to reuse the code and just loop thru the feed urls..
    one thing to keep in mind, this section of code:
    (PHP 5.1.4 - Just updated.. was running 4.3.11)
    PHP Code:
    $template->assign_block_vars('oneup', array(
    'LINK' => $val['LINK'],
    'TITLE' => $val['TITLE'],
    'DESC' => $val['DESCRIPTION'])
    ); 
    the 'oneup' variable needs to change with each feed url, because the output is dont in an html file by each variable.. so in this case the output file would use {oneup.LINK} etc...

    so when passing in a url, i need to pass in a url & the output variable... or, if there is another way around it

    Attached:
    Original file: rss_1up.php
    Partially completed new file: rss_feeds.php
    Output HTML file: rss_feeds.html
    Attached Files Attached Files
    Last edited by Static; Apr 18th, 2007 at 09:37 AM.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width