ThemeShaper Forums » Thematic

Sidebar PHP

(1 post)
  • Started 12 years ago by jackpatterson
  • This topic is not resolved
  1. Hi guys, I'm using the Executable PHP widget to make a multilingual gallery in the sidebar. I am using a PHP array to generate a display a selection of random images. I have a value that defines how many images are to be displayed. I want this value to be driven by the height of the 'main' div area, so that as it expands, the sidebar will always be full of images. I have an idea of the jquery code that I would need to implement this, but I don't really know how to get it to send the variable to the php.

    Here is my php gallery generator (using thick box)

    <div id="docs">
    $length= "5";
    $families = array
    $numbers = range(0, $length);
    for($n = 0; $n<$length; $n++) {
    $random_1 = $numbers[$n];
    $random_1_tit = $families[ICL_LANGUAGE_CODE][$numbers[$n]];
            echo "<a href=\"". ICL_LANGUAGE_CODE ."/archives/" . $random_1 . ".jpg\" title= ". $random_1_tit. " class=\"thickbox\" /><img src=\"" . $random_1 . "_t.jpg\"  alt=\"\"/></a>";

    The value $length i want to be determined by something like this:

    var mainReal = $("#main").height();
    		var length = Math.round(mainReal/300);

    Any help would be greatly appreciated,

    all the best,


    Posted 12 years ago #

RSS feed for this topic


You must log in to post.