SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: zapiy on August 30, 2012, 06:12:58 AM

Title: Pages block
Post by: zapiy on August 30, 2012, 06:12:58 AM
Hi all, we have used Simplportal on our site for creating review pages.. What i wondered is there someone that could help me to create a block that will pull some random reviews to a block?
Title: Re: Pages block
Post by: Chen Zhen on September 04, 2012, 08:40:44 PM

zapiy,

  Below is custom php block that will display a random Simple Portal page. With this block you must edit the array within to reflect the Page ID's that you wish to display.

Code: [Select]
global $scripturl;

/* Add Page ID's to the array */
$pages = array('page1', 'page2', 'page3');

/* Redirect to random portal page */
redirectexit($scripturl . '?page=' . $pages[array_rand($pages,1)]);



Title: Re: Pages block
Post by: zapiy on May 16, 2013, 11:31:34 AM
Thanks for this and sorry for the delay on getting back to you..

Is there a way that it just lists 5 of them with the titles as the links in a block?
SimplePortal 2.3.8 © 2008-2024, SimplePortal