Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: rssbox

  1. #1
    Join Date
    Jan 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default rssbox

    1) Script Title: rssbox

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ybox/index.htm

    3) Describe problem: I'm brand new and need help setting the rss reader to work. After setting everything up and uploading to my server, I still can't get it to work. When I tried to invoke the shtml, nothing happens. Instead, I see the following on the top of the page:

    feed_url('http://example.com/feed.xml'); $feed->cache_location($_SERVER['DOCUMENT_ROOT'] . '/cache'); $feed->init(); $feed->handle_content_type(); ?>

    What am I doing wrong? How can I fix it?

    Also, the initial instrustions says to create two directories: php and cache. I did. But the instructions doesn't say where exactly to put the rssbox files. I have the rssbox files in the php I created. Is this correct. My host is ipowerweb and the directory is: /public_html/php/rssbox. Please let me know if I need to change anything.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Can you post a URL to the problem page on your server? It's easier that way.

    But the instructions doesn't say where exactly to put the rssbox files
    By default you should simply perserve the original structure of the folders within the zip file when uploading to your site. In other words, you shouldn't change any directory information.

  3. #3
    Join Date
    Jan 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    Can you post a URL to the problem page on your server? It's easier that way.
    Thanks for your reply. Here is the link:

    http://www.voicesfrombeyond.com/rssarticle1.shtml

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ok, the way your page is currently set up, I think pigs will fly before the RSS display box is shown You seem to have just taken the config portion of the PHP script and stuck it to the top of your page- this won't work.

    Take a step back, and just upload all the contents of the zip file to your site, as is, and mantaining the structure:

    demo.htm: working demo page of RSS display boxes
    rssbox/rssdisplaybox.js
    rssbox/virtualpaginate.js
    rssbox/rssdisplaybox.css
    rssbox/main.php
    rssbox/outputbody.php
    rssbox/loading.gif
    rssbox/cache/ directory. Chmod 777 or 755!
    simplepie/ directory, which contains the files that make up the SimplePie package

    Most FTP programs will let you perserve the original structure of the uploaded directories when you upload them- do this. Be sure to chmod the cache directory to 777 as well.

    Once that's done, try running demo.htm to see if it works. If not, post the link to it here.

  5. #5
    Join Date
    Jan 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Okay, the demo and all files have been uploaded to root directory, public_html/rssbox. The url is: http://www.voicesfrombeyond.com/rssbox/demo.htm.

    I also moved simplepie.inc from php folder to this folder for purposes of sending you the url to check out.
    To do this, I had to rename the original rssbox folder which I had modified. The contents of main.php as modified is:

    <?php
    //Function for ouputting the body of each RSS item displayed (inside loop)- DynamicDrive.com

    require('/php/simplepie.inc'); //Specify path to simplepie.inc on your server (by default located inside "simplepie" directory)
    $feed = new SimplePie();
    $feed->cache_location($_SERVER['DOCUMENT_ROOT'] . '/cache'); //Specify path to cache directory on your server relative to this file
    $feed->handle_content_type();
    require('outputbody.php'); //Path to custom "outputbody.php" file relative to this file

    //Specify list of RSS URLs
    $rsslist=array(
    "sip" => "http://ezinearticles.com/rss/Self-Improvement-Spirituality.xml",
    "goa" => "http://www.goarticles.com/cgi-bin/rss-search.cgi?l=20&s=1&c=91&D1=subject&title=Spirituality",
    "giv" => "http://www.givemearticles.com/rss/givemearticles.cfm?directory=selfimprovement",
    "atz" => "http://www.articlebiz.com/topic/114-1-spirituality/" //no trailing comma after last RSS URL!!
    );
    ======================================================
    The rssdisplaybox.js was modified as follows:
    //Path to "main.php" *relative* to "demo.htm", or the HTML page on your server displaying the RSS Box:

    var rssoutputscript="/rssbox/main.php"

    //Switch to full URL to "main.php" on your server below, so script will work with any page on your server, not just "demo.htm"
    //Do NOT change window.location.hostname, which is your site's root domain, dynamically determined
    //Configure below line and uncomment it to activate it:

    rssoutputscript="http://"+window.location.hostname+"/php/rssbox/main.php"
    ======================================
    My feed1.shtml which is at http://www.voicesfrombeyond.com/feed1.shtml contains the following:

    <script type="text/javascript">
    <font size=-1>
    //MAIN FUNCTION: rssdisplaybox("rssfeed_id", "rssbox_id", "rssbox_class")
    var sip=new rssdisplaybox("sip", "sipbox", "sipclass")
    sip.set_cache_time(10) //Change cache time of feed to 10 minutes (instead of default 30 minutes. Set to 0 to disable cache)
    sip.set_items_shown(10, 5) //Fetch 10 entries, but display only 5 at a time (pagination links auto created)
    sip.set_template("default") //Use "default" template, which outputs title + description + date
    sip.setpagination("auto", "top") //Automatically generate the interface for the pagination links, plus position it to the top of the RSS Box
    sip.set_template("titles") //Use "titles" template (see "outputbody.php"), which outputs title + category
    sip.start() //Required: start script
    </font>
    </script>
    ==========================================
    Thank you very much for your time and assistance. Please let me know what I'm doing wrong.

  6. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Just by looking at http://www.voicesfrombeyond.com/rssbox/demo.htm, your paths are still incorrect. Inside your source, you're referencing the external files, such as the .js file, as follows:

    Code:
    <script type="text/javascript" src="rssbox/rssdisplaybox.js">
    //credit notice here...
    </script>
    This tells the browser that the .js file is located in the directory:

    rssbox/rssdisplaybox.js

    relative to the directory the webpage is located in. Adding the two up, you're telling the browser the .js file is located in:

    http://www.voicesfrombeyond.com/rssb...sdisplaybox.js

    Clearly not correct.

    Is there any reason why you're moving and renaming files directories? That's the source of your problem. All you should be doing at this point to get the demo working is this:

    1) Create an arbitrary directory, say "test" in your root directory.

    2) Upload all the files of the zip into this directory as is and mantaining the original structure of the directories.

    3) Chmod the cache directory and any other details as mentioned in the instructions

    4) Run demo.htm to see if it works.

  7. #7
    Join Date
    Jan 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I thought I followed the instructions when I uploaded the rssbox folder with its contents to my root directory resulting in /rssbox/files. I created a test folder, uploaded everything into this folder, including demo.htm. When I tested it, this is what I get. Is this what I'm supposed to see?

    Dynamic Drive RSS Display Boxes: Source code and install instructions
    Example 1 (CSS Drive):



    Example 2 (BBC News):



    Example 3 with "manual" pagination mode (NYTimes):
    First - + Last



    Example 4 with "manual" pagination mode (CSS Drive):
    Prev Next

    The link to test it is: http://www.voicesfrombeyond.com/test/demo.htm

  8. #8
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm nope, if it worked you should see the RSS feeds being displayed. Where are the .js and .css files for this script currently located in? Per your link it is assumed they're located in /test/rssbox/, for example:

    http://www.voicesfrombeyond.com/test...sdisplaybox.js

    which if you test it out you'll see is invalid...

  9. #9
    Join Date
    Jan 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Originally, the files were in public_html/rssbox/ as the instructions here say: http://www.dynamicdrive.com/dynamici...ybox/index.htm and the reference to the js files was

    <script type="text/javascript" src="rssbox/rssdisplaybox.js">
    //credit notice here...
    </script>

    which was the way it came without modifications. But you said it was wrong. Then I created the "Test" folder and uploaded everything into it without the rssbox sub folder. Either way, what I showed you is what I get whether in test/*.js or rssbox/*.js

    I'm so confused now. Originally, the instruction was to create a "php" and a "cache" folders in my root directory and copy the simplepie.inc into the php folder. Then I downloaded rssbox and the instructions were different. Do those instructions still hold? Do I still need the php and cache folders in my root directory? Where exactly is simplepie.inc supposed to be with rssbox?

  10. #10
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I'm confused too now It doesn't matter if you put the files for this script in your root directory or an arbitrary directory (ie: /test) of your choice- the key is to mantain the original structure of the files relative to one another. Here's the instructions on the script page:

    To get the script up and running, just upload all files above as is to your PHP capable server, and make sure the directory "rssbox/cache/" has read+write permissions (typically chmod 777 or chmod 755) for the cache files to be created in. Then, call up demo.htm in your browser to see the script in action!
    With the original structure being:

    demo.htm: working demo page of RSS display boxes
    rssbox/rssdisplaybox.js
    rssbox/virtualpaginate.js
    rssbox/rssdisplaybox.css
    rssbox/main.php
    rssbox/outputbody.php
    rssbox/loading.gif
    rssbox/cache/ directory. Chmod 777 or 755!
    simplepie/ directory, which contains the files that make up the SimplePie package
    So demo.htm should always be one folder above the .js file, with the later being is /rssbox. For example:

    /test/demo.htm
    /test/rssbox/rssdisplaybox.js
    "

    and so on.

Bookmarks

Posting Permissions

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