Wallpaper Script Forum » How-To and Troubleshooting

mainrandomwallpaper Module

(4 posts)
  • Started 3 years ago by KWilfred
  • Latest reply from KWilfred
  1. Anyone knows a quick way to make this block to show more than one item, preferably 3 items.

    Tried changing this
    $items = $DB->getRandom( ... 1);
    to
    $items = $DB->getRandom( ... 3);

    The result displays 3 consecutive images instead of 3 random images.

    Any help would be much appreciated. Thanks.

    Posted 3 years ago #
  2. Try this:

    $items = $DB->getRandom( ... 1);
    $items .= $DB->getRandom( ... 1);
    $items .= $DB->getRandom( ... 1);

    note the dot append result to $items

    JAP

    Posted 3 years ago #
  3. Thanks for the help.
    Unfortunately, this doesn't work for me. Gave me this error when refreshing my site. Maybe I'm doing it wrong.
    Fatal error: Cannot use string offset as an array

    Posted 3 years ago #
  4. Anyone has a tip / solution for this?
    Adi, can you help ? :) Would really appreciate it.

    Thanks,
    Keith

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.