SimplePortal

Customization => Custom Coding => Topic started by: freeopkiller on April 13, 2010, 05:00:36 AM

Title: Gallery block in footer
Post by: freeopkiller on April 13, 2010, 05:00:36 AM
I'm using SMF gallery, I added the block to show random Images. Works great. But I'm wanting to place it into my index.template.php footer.  Being new to Simple Portal, Is there an easy include call, available snippet or will I have to strip code from the portalblocks.php ?

I tried using function call : sp_gallery();
Which does show 1 image, I'm missing the variable to show 4 randoms...


Any Help or Suggestions are Greatly Appreciated..Thanks
Title: Re: Gallery block in footer
Post by: AngelinaBelle on April 14, 2010, 01:53:39 PM
I never thought of that -- putting the block contents someplace else.
You can take a look at the function's parameters. The one you really want is $parameters['limit'].
 
Does this really work?
Code: [Select]
$parameters =
array(
        'limit' => 4,          // integer number of images to show
        'type' => True,    // true = random, false = most recent
        'direction' => True  // true = horizontal, false = vertical
);
 
sp_gallery($parameters);
Title: Re: Gallery block in footer
Post by: freeopkiller on April 14, 2010, 08:01:31 PM
Works great ! Thank You. 

I like Simple Portal, however it looks like any other portal, big square middle and little boxes wrapped around them. It limits a lot of creativity and freedom of design. ( Without lots of hacking. )   If you could create a block, enter prams, create a block.template for it, then a function to plugin to your web site design it would greatly open up design and usability.   Ie. plugging in block on my footer..  or just a simple pop-up that would show the function call for the block would be great..   Thank you again for your help.. Another perfect solution from Simple Portal Team..

Title: Re: Gallery block in footer
Post by: AngelinaBelle on April 14, 2010, 08:42:13 PM
Glad to help. Ok that I've marked it solved?
Title: Re: Gallery block in footer
Post by: freeopkiller on April 15, 2010, 12:49:19 PM
Absolutely ! Thanks
Title: Re: Gallery block in footer
Post by: AngelinaBelle on April 27, 2010, 12:16:03 PM
Another option, if you have already created the block, is to use the method [SiNaN] wrote about in his team blog posting: http://simpleportal.net/index.php?topic=5332.0 (http://simpleportal.net/index.php?topic=5332.0)
 
There's plenty there to play with!
Title: Re: Gallery block in footer
Post by: freeopkiller on April 28, 2010, 12:04:34 AM
Great Post, thanx AB
SimplePortal 2.3.8 © 2008-2024, SimplePortal