Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Display random
Page:
1
Display random
Re: Display random
Hi,
that's a good question. Yes, there will be a way of doing a database query to get all the modules assigned to a certain position, then you could randomise these. In fact one of the "recipes" does something a bit similar to this:
http://www.metamodpro.com/metamod/recip … not-appear
So you could try this:
$sql = 'SELECT id from #_' . '_modules m ' .
"WHERE m.position = 'left-metamod' " .
'and m.published = 1 ';
$db->setQuery( $sql );
$mods = $db->loadColumn();
if (count($mods)) {
shuffle($mods);
return $mods[0];
}
Administrator has disabled public posting
Page:
1
- Index
- » MetaMod
- » MetaMod General Support
- » Display random
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7628
- Newest User:
- horlogekorting34
- 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