PDA

View Full Version : how to display random/latest photos without title/name


Tini72
16th of March 2008 (Sun), 18:42
I managed to change the dsiplay of latest photos to random photos (index page) and from thumbs to microthumbs.
<?php ee_random_photos("10","microthumb"); ?>

But what do I have to do that the image names aren't displayed under the microthumbs? I just want to have the microthumbs without titles/names.

Which file do I need to change for that?

jeronimo
17th of March 2008 (Mon), 14:04
Try to play around with the snippets. Probably you can use this code then

$get = "random_photos";
$amount = "10";
$exhibition = "all";
$thumbsize = "";
$viewas = "image";
$includecategory = "";
$excludecategory = "";
$thumbclass = "ee_css_thumb";
$linkclass = "";
@include("./snippets.php");

Tini72
17th of March 2008 (Mon), 14:40
Try to play around with the snippets. Probably you can use this code then

$get = "random_photos";
$amount = "10";
$exhibition = "all";
$thumbsize = "";
$viewas = "image";
$includecategory = "";
$excludecategory = "";
$thumbclass = "ee_css_thumb";
$linkclass = "";
@include("./snippets.php");

Unfortunately this dosn't work. If I try that I just get an empty page. I thought snippets were only meant for external use so that's maybe the reason it doesn't work. I wonder if there are some settings somewhere to set the display of the integrated latest/random photos code.

Overshot
18th of March 2008 (Tue), 13:21
I think this should remove the titles/names. Comment out the appropriate code in ...basecode/SCRIPT_common_functions.php
If you are showing random microthumbs search SCRIPT_common_functions.php for
if (!function_exists("ee_random_photos"))
within this function find
if ($viewtype == "microthumb") {

ob_start();
$s_max_thumbsize_width = $s_microthumbs_outputstyle_max_thumbsize_width;
$s_max_thumbsize_height = $s_microthumbs_outputstyle_max_thumbsize_height;
$thumb_output = ee_print_thumbs($thumbarraylist,"microthumb");
ob_end_clean();
foreach ($thumb_output as $thisthumb => $thumbdata) {
print $thumbdata["output"];
print "<p class=\"ee_css_paragraph_small\" style=\"margin: -5px 0px 5px 0px;\">";
print $thumbdata["thumbheader"];
print "</p>";
}
//print "<br class=\"clear\" />";
}
and comment out the header print line as below.
// print $thumbdata["thumbheader"];
Hope this helps.

jeronimo
19th of March 2008 (Wed), 11:01
Unfortunately this dosn't work. If I try that I just get an empty page. I thought snippets were only meant for external use so that's maybe the reason it doesn't work. I wonder if there are some settings somewhere to set the display of the integrated latest/random photos code.

No, it also works INSIDE EE2. E.g. go to http://dieren.landmarks.nl and you'll see. Those thumbs are also with snippets.php

The solution above my post must work also.