![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Registered User
Industry Role:
Join Date: Dec 2011
Posts: 33
|
Random Rss feeds
After scouring this forum, hot scripts and google with no luck- I have a question. Does anyone know a way to have rss feeds randomly display on your non-wordpress site. In other words I want to shuffle say ten different rss feeds and have one display content each time web page is loaded. I have the displaying part down(using rss2html and I also used an awesome script provided by this forum) but can't figure out the random(shuffling) part. Thanks.
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Industry Role:
Join Date: Feb 2012
Posts: 24
|
If you're using the rss2html php-script which can be downloaded from www[dot]feedforall[dot]com/more-php.htm then you can add something like that in this script:
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Registered User
Industry Role:
Join Date: Dec 2011
Posts: 33
|
How do I call that
Thanks much for your help. So, I have replaced in the rss2html.php file like you mentioned. Now I am wondering how do I call this from my index.php page. Normally with rss2html you call with the following:
<?php include'URL OF RSS2HTML FILE?XMLFILE=YOUR RSS FEED URL&TEMPLATE=URL OF TEMPLATE/sample-template.html&MAXITEMS=20'; ?> |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Registered User
Industry Role:
Join Date: Feb 2012
Posts: 24
|
Just remove the "XMLFILE=YOUR RSS FEED URL" part. Then it will use the random feed that you configured in the rss2html.php
Like that: <?php include'URL OF RSS2HTML FILE?TEMPLATE=URL OF TEMPLATE/sample-template.html&MAXITEMS=20'; ?> Or you can leave the rss2html.php as it is by default and do the randomization in your index.php file. In that case you should write in your index.php: PHP Code:
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#5 |
Registered User
Industry Role:
Join Date: Dec 2011
Posts: 33
|
Configuration error message.
Thanks for your help. I tried both examples above and am getting the following error message: Unable to open RSS Feed 6, exiting Unable to open RSS Feed sample.xml, exiting .
I made sure all files are chmod to 755 and changed this line in the rss2html.php script: $fileAccessLevel = 1; to this: $fileAccessLevel = 0; per their forum. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#6 |
Registered User
Industry Role:
Join Date: Feb 2012
Posts: 24
|
Sorry, I made a mistake.
PHP Code:
PHP Code:
PHP Code:
I tested on my server. I left the rss2html.php as it was. And in index.php I put: PHP Code:
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#7 |
Registered User
Industry Role:
Join Date: Dec 2011
Posts: 33
|
Works like a charm.
Thank you very much!!!!! You rock!!!!!!!!!!!!!!!
|
![]() |
![]() ![]() ![]() ![]() |