View Full Version : Display random thumbs with keyword in custom_a page
Tini72
12th of November 2008 (Wed), 03:29
I would like to display some random thumbs with a specific keyword in one of my custom pages (custom_a template).
While searching this forum if figured out that there is a function called
<?php ee_random_photos("20","thumb"); ?>
But this only displays a certain number (20 in the given example) of random thumbs but it doesn't do it according a specific keyword. Is there any function to which displays thumbs according keywords?
jeronimo
12th of November 2008 (Wed), 10:10
Try the snippets (snippets.php) Maybe you can do it with one of those?
Tini72
12th of November 2008 (Wed), 16:28
As far as I know you can only use categories but not keywords for snippets. But I would need to use keywords.
<?php
$get = "random_photos";
$amount = "20";
$exhibition = "all";
$thumbsize = "microthumb";
$viewas = "image";
$includecategory = "";
$excludecategory = "";
$thumbclass = "ee_css_thumb";
$linkclass = "";
@include("./snippets.php");
?>
Do you know how I could include keywords into the snippets?
jeronimo
13th of November 2008 (Thu), 02:38
As far as I know you can only use categories but not keywords for snippets. But I would need to use keywords.
<?php
$get = "random_photos";
$amount = "20";
$exhibition = "all";
$thumbsize = "microthumb";
$viewas = "image";
$includecategory = "";
$excludecategory = "";
$thumbclass = "ee_css_thumb";
$linkclass = "";
@include("./snippets.php");
?>
Do you know how I could include keywords into the snippets?
Probably you have to edit snippets.php. But you need a lot off knowledge to do so.
Other way to do it;
Make a virtual gallery for the keyword. Then link the snippets template to this virtual gallery. Does the same
Tini72
14th of November 2008 (Fri), 17:58
Probably you have to edit snippets.php. But you need a lot off knowledge to do so.
Other way to do it;
Make a virtual gallery for the keyword. Then link the snippets template to this virtual gallery. Does the same
Thanks jeronimo for trying to help me. It works with virtual galleries but I wanted to avoid having to create virtual galleries for many keywords. I had hoped that there would be another solution just using the keywords (with snippets or so).
I have no idea how to modify the snippets to get it working for keywords. If anyone has done this or knows how to do it I would be more than happy if he could share the solution with me.
jeronimo
15th of November 2008 (Sat), 07:50
You can also try with cateogries (that you CAN call with snippets) but then again you have to have a lot off categories....
Tini72
22nd of November 2008 (Sat), 16:49
Well I think I have to quit that idea. All suggestions turns out to be complicated. I don't want to have more work than necessary. I am not Using categories so far and I don't want to add those to all old photos.
wkitty42
1st of December 2008 (Mon), 00:29
Well I think I have to quit that idea. All suggestions turns out to be complicated. I don't want to have more work than necessary. I am not Using categories so far and I don't want to add those to all old photos.
FWIW: there's nothing more complicated than coding an application (speaking as a full-time 30+ year coder in numerous languages) ;)
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.