Pulling random images into another page

Forum rules
Support ended: 31.12.2011

Pulling random images into another page

Postby sunglowpierlive » Thu Sep 22, 2011 7:30 pm

Gallery Version: 1.0.6
phpBB Version: 3.0.9
Gallery-Link: http://www.sunglowpierlive.com/forum/gallery/index.php

PHP Version: 4.x - Godaddy
Database Version: MySQL 4.4


Error description and message
How can you pull random images into another page?

For example, i would like to display 4 random images on my websites homepage to entice visitors to click into the gallery.
sunglowpierlive
Posts < 10
Posts < 10
 
Posts: 3
Topics: 3
Joined: Wed Sep 21, 2011 11:46 pm

Re: Pulling random images into another page

Postby nickvergessen » Thu Sep 22, 2011 7:58 pm

The pages need to be part of a php site that uses the phpbb code base, so we can use the permissions and database and more.
Afterwards rrc_configurator.php should help a lot.
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5748
Topics: 217
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: Pulling random images into another page

Postby JezUK1 » Tue Oct 11, 2011 7:08 pm

Useing that I have made this code.

/**
* RRC of phpbb gallery
* See rrc_configurator.php for more information
*/
$gallery_block = new phpbb_gallery_block();
$gallery_block->set_modes(array('random'));
$gallery_block->set_display_options(array('albumname', 'imagename', 'username'));
$gallery_block->set_nums(array('rows' => 1, 'columns' => 4, 'comments' => 10, 'contests' => 1));
$gallery_block->set_toggle(true);
$gallery_block->set_pegas(true);
$gallery_block->add_albums(1, 2, 3);
$gallery_block->display();


Where would I put this on my main indexpage of my board? I would like the images to show in the center under the link which says [ Moderator Control Panel ]

Thanks
JezUK1
Posts 30 - 40
Posts 30 - 40
 
Posts: 34
Topics: 4
Joined: Thu Nov 26, 2009 7:55 pm
Location: England, Somerset
phpBB.com: JezUK1

Re: Pulling random images into another page

Postby nickvergessen » Tue Oct 11, 2011 11:03 pm

Just add this code right before:
Code: Select all
// Output page
page_header($user->lang['INDEX']);



and in styles/prosilver/template/index_body.html
find:
Code: Select all
<!-- INCLUDE forumlist_body.html -->

and before add:
Code: Select all
<!-- INCLUDE gallery/recent_body.html -->
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5748
Topics: 217
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: Pulling random images into another page

Postby JezUK1 » Tue Oct 11, 2011 11:13 pm

Thanks thats ace!!
Last edited by JezUK1 on Tue Oct 11, 2011 11:23 pm, edited 2 times in total.
JezUK1
Posts 30 - 40
Posts 30 - 40
 
Posts: 34
Topics: 4
Joined: Thu Nov 26, 2009 7:55 pm
Location: England, Somerset
phpBB.com: JezUK1

Re: Pulling random images into another page

Postby nickvergessen » Tue Oct 11, 2011 11:18 pm

Please read my post above
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5748
Topics: 217
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: Pulling random images into another page

Postby JezUK1 » Tue Oct 11, 2011 11:23 pm

Your a star. One last thing why is it only showing random pictures from 2 of the galleries are not the 2nd?
JezUK1
Posts 30 - 40
Posts 30 - 40
 
Posts: 34
Topics: 4
Joined: Thu Nov 26, 2009 7:55 pm
Location: England, Somerset
phpBB.com: JezUK1

Re: Pulling random images into another page

Postby JezUK1 » Wed Oct 12, 2011 6:30 pm

Can you help me please?
JezUK1
Posts 30 - 40
Posts 30 - 40
 
Posts: 34
Topics: 4
Joined: Thu Nov 26, 2009 7:55 pm
Location: England, Somerset
phpBB.com: JezUK1

Re: Pulling random images into another page

Postby nickvergessen » Wed Oct 12, 2011 7:09 pm

I didnt understand your previous post
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5748
Topics: 217
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: Pulling random images into another page

Postby JezUK1 » Wed Oct 12, 2011 11:33 pm

I have set it so radam images show up on my main board index page http://forum.gardenwildlife.co.uk/

But its only talking images from 2 of the albums and not all of them. I have made it to take images from 1,2,3 but its not showing the ones from 2.

Can you help at all?
JezUK1
Posts 30 - 40
Posts 30 - 40
 
Posts: 34
Topics: 4
Joined: Thu Nov 26, 2009 7:55 pm
Location: England, Somerset
phpBB.com: JezUK1

Next

Return to Support & Administration

Who is online

Users browsing this forum: No registered users and 0 guests