0
Welcome Guest! Login
0 items Join Now

Random Module, Module..

    • webboss's Avatar
    • webboss
    • Rocketeer
    • Posts: 89
    • Thanks: 0

    Random Module, Module..

    Posted 16 years 2 months ago
    • I would like to randomly display a module.

      Metamod will let me assign stuff, but won't just randomly put a module in there.

      (or will it ?? I can't figure it out)

      I'd like to have a module position where one visitor sees a random image, next visitor a random video, next person the last uploaded podcast.. I don't want my right side to be 15 modules deep.. I want 3 or 4 modules over there.. and have them change each time the page is loaded.
    • JEM's Avatar
    • JEM
    • Preeminent Rocketeer
    • Posts: 17917
    • Thanks: 4

    Re: Random Module, Module..

    Posted 16 years 2 months ago
    • I took a quick look at the documentation, doesn't seem to be designed for that.

      I've never heard of a component that does that either, not that one does not exist...

      You could try to use some accordion style module which would all you to display the all module titles and expand when clicked on.
    • Thanks,
      jim
    • Ragdata's Avatar
    • Ragdata
    • Elite Rocketeer
    • Posts: 614
    • Thanks: 0
    • Software Engineer

    Re: Random Module, Module..

    Posted 16 years 2 months ago
    • You could do this all with your default Newsflash module. It just depends on the content you drop in each 'article'. To really add impact, Rokbox will handle the content types you've listed here (with a little fiddling of the fodder you give it). I don't think you need a special module - you just need to think a little further outside the square.
    • Ragdata's Rubber Duck
      www.ragdata.net/
    • SteveB's Avatar
    • SteveB
    • Sr. Rocketeer
    • Posts: 126
    • Thanks: 0

    Re: Random Module, Module..

    Posted 16 years 2 months ago
    • Yeah I've been after something similar, haven't quite got it figured out yet.

      Basically I want to use the very nice jweather module, and have a random version of the module to show up once with each page navigation in a single position.

      I would have a series of the modules set up to gather weather from different cities around the country, but just one of the cities being randomly displayed at any given time.
    • Lawn Care Guide
      Lawn Forum
    • webboss's Avatar
    • webboss
    • Rocketeer
    • Posts: 89
    • Thanks: 0

    Re: Random Module, Module..

    Posted 16 years 2 months ago
    • I was provided this on another forum.. now I just have to have someone explain it to me !!
      As far as I know, Metamod can randomize, a quick look in Google returned this:

      // RANDOMISED MODULES (all versions)
        $r = rand(1,3); // get a random number: 1-3 inclusive
        if ($r == 1) return 44;
        if ($r == 2) return 88;
        if ($r == 3) return 42;

      Source: www.brandonitconsulting.co.uk/mod_metamod/

      Olaf
    • JEM's Avatar
    • JEM
    • Preeminent Rocketeer
    • Posts: 17917
    • Thanks: 4

    Re: Random Module, Module..

    Posted 16 years 2 months ago
    • webboss wrote:
      I was provided this on another forum.. now I just have to have someone explain it to me !!

      To explain how to use this module, which is not part of the template or an RT extension, someone would have to install and configure, and test it.

      You may get a quicker response by contacting the author directly: This email address is being protected from spambots. You need JavaScript enabled to view it.
    • Thanks,
      jim
    • webboss's Avatar
    • webboss
    • Rocketeer
    • Posts: 89
    • Thanks: 0

    Re: Random Module, Module..

    Posted 16 years 2 months ago
    • This turned out to be quite easy actually.

      Just copied that bit of code above into the php variable in the module parameters and it works just fine.
    • JEM's Avatar
    • JEM
    • Preeminent Rocketeer
    • Posts: 17917
    • Thanks: 4

    Re: Random Module, Module..

    Posted 16 years 2 months ago
    • Great, glad you got it sorted.

      Cheers!
    • Thanks,
      jim
    • SteveB's Avatar
    • SteveB
    • Sr. Rocketeer
    • Posts: 126
    • Thanks: 0

    Re: Random Module, Module..

    Posted 16 years 2 months ago

Time to create page: 0.091 seconds