I wanted to see if there is a mod or a way to display a random row of car thumbnails on the top of a picture detail page. So instead of only the "next" prev" pic, i would like to display a random row of other car pics.
basically taking the first row from the random.php page and inserting this on the picture page, to display other images in the gallery
Offline
Could you give us a screenshot with an additional random thumbnail ?
Just to understand you requirement.
8-)
Offline
i want to insert a row of random pictures on the this page.
http://demo.phpwebgallery.net/picture.p … ry/America
a row like the one that appears here.
http://demo.phpwebgallery.net/index.php … 28,383,120
Offline
I already understood that.
Could you take your prefered paint tool paste a screenshot of the picture page.
Now draw somewhere a square where we can add the random picture.
(And please, try to imagine not only your gallery but many others.)
8-)
Offline
random picture idea.... could be used either vertically or horizontal.
I would think if we could make some form of random array, that we could cache this way it doesn't kill a busy server, but this feature would be a "Great Advertisement" of the other images in the gallery.
Last edited by carminejg3 (2008-06-11 00:56:20)
Offline
i have been looking into the random php file and i wonder if we could somehow convert it to run this random script. Maybe by changing up the redirect at the bottom?
<?php
define('PHPWG_ROOT_PATH','./');
include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
check_status(ACCESS_GUEST);
$query = '
SELECT DISTINCT(id)
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
'.get_sql_condition_FandF
(
array
(
'forbidden_categories' => 'category_id',
'visible_categories' => 'category_id',
'visible_images' => 'id'
),
'WHERE'
).'
ORDER BY RAND(NOW())
LIMIT 0, '.$conf['top_number'].'
;';
// +-----------------------------------------------------------------------+
// | redirect |
// +-----------------------------------------------------------------------+
redirect(make_index_url(array('list' => array_from_query($query, 'id'))));
?>
Offline
A good idea for a plugin or a feature...
8-)
Offline
I think this would be an awesome plugin. Esp, if it was a web service or file that i could put on say my news page and show 3 random pictures, this way pulling more people into the photo gallery.
Offline
carminejg3 wrote:
I think this would be an awesome plugin. Esp, if it was a web service or file that i could put on say my news page and show 3 random pictures, this way pulling more people into the photo gallery.
I love the idea :)
However, I used a curl example from the french forum the other week there on localhost(wampserver), and you should have seen my hdd go nuts as it searched over 60,000+ images in my database.
I wasn't impressed, hence, no inclusion of this functionality.
Offline
well all you had to do was check the database for the image count, and picked 5 random numbers to display those images between 1 and that number, that would have taken nano seconds with a random function.
then display the thumbnails for those images.
Hi jamie,
Let sleeping dogs lie for old threads if you don't have the detailled solution.
Thanks.
Offline