Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

display 4 rss-feeds in randomized fashion: doable?

display 4 rss-feeds in randomized fashion: doable?

hello dear Community

i have a set of 4 rss-feeds (that means adresses for the feeds)

i want to show them in one column - without having 4 different blocks.

questsion: can i randomize the display of the 4 RSS-feeds, so that each call of the page another feed will get displayed.

note: we ve got various great rss-browsers. Maybe we can tinker them in order to get above mentioned behaviour...

btw If i have to explain more thoroughly - just let me know.

dilbert
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: display 4 rss-feeds in randomized fashion: doable?

Answer: Yes, if they are in modules, then MetaMod can help you.

How: Create a module for each RSS feed. Assign the modules to a "fake" position e.g. "randomfeed". Make a note of the module ids for the 4 modules.
Then create a MetaMod in the module position where you want to actually show ones of the modules. In the MetaMod use the following PHP:

$r = mt_rand(1,4);
if ($r == 1) return AAA;
if ($r == 2) return BBB;
if ($r == 3) return CCC;
if ($r == 4) return DDD;

Replace AAA-DDD with the actual module ids of the modules you want to display.
The MetaMod needs to be published, set to display on some or all pages, and assigned to the correct module position.

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1696
Total Polls:
6
Total Posts:
5941
Posts this week:
7
User Info:
 
Total Users:
5418
Newest User:
outsd2
Members Online:
0
Guests Online:
127

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked