Keyword

Images not forming into rows...why is this?

  • ComposerRyan
  • ComposerRyan's Avatar Topic Author
  • Offline
  • New Member
More
16 years 3 months ago #10030 by ComposerRyan
Images not forming into rows...why is this? was created by ComposerRyan
Hello, I am using the free version of Simple Image gallery (v 1.2.1) and I am having problems with it.

The images should look like this:



But they look like this instead:



Why is this?  I want them to form in their own rows...please help!  Thanks.

Here is the plugn_jw_sig.php file...notice that I have changed the height and width to: ($_height_-75) and ($_width_+10):

<?php
/*
// "Simple Image Gallery" (in content items) Plugin for Joomla 1.0.x - Version 1.2.1
// License: www.gnu.org/copyleft/gpl.html
// Authors: Fotis Evangelou - George Chouliaras
// Copyright (c) 2006 JoomlaWorks.net - www.joomlaworks.net
// Project page at www.joomlaworks.net - Demos at demo.joomlaworks.net
// ***Last update: January 6th, 2007***
*/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$_MAMBOTS->registerFunction( 'onPrepareContent', 'jw_gallery' );
function jw_gallery( $published, &$row, &$params, $page=0 ) {
  if (!$published) {
    $row->text = preg_replace( "#{gallery}(.*?){/gallery}#s", "" , $row->text );
    return;
  }
 
// Variables
global $database, $mainframe, $option, $task, $mosConfig_lang, $mosConfig_absolute_path, $mosConfig_live_site, $my, $Itemid;
$rootfolder = '/images/stories/';
$query = "SELECT id FROM #__mambots WHERE element = 'plugin_jw_sig' AND folder = 'content'";
$database->setQuery( $query );
$id = $database->loadResult();
$mambot = new mosMambot( $database );
$mambot->load( $id );
$param =& new mosParameters( $mambot->params );
$_width_ = $param->get('th_width', 200);
$_height_ = $param->get('th_height', 200);
$_quality_ = $param->get('th_quality', 80);
$displaynavtip = $param->get('displaynavtip', 1);
$navtip = $param->get('navtip', 'Navigation tip: Hover mouse on top of the right or left side of the image to see the next or previous image respectively.');
$displaymessage = $param->get('displaymessage', 1);
$message = $param->get('message', 'You are browsing images from the article:');

 
  if (preg_match_all("#{gallery}(.*?){/gallery}#s", $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
  $sigcount = -1;
  foreach ($matches[0] as $match) {
$sigcount++;
$_images_dir_ = preg_replace("/{.+?}/", "", $match);
unset($images);
$noimage = 0;
// read directory
    if ($dh = opendir($mosConfig_absolute_path.$rootfolder.$_images_dir_)) {
          while (($f = readdir($dh)) !== false) {
        if((substr(strtolower($f),-3) == 'jpg') || (substr(strtolower($f),-3) == 'gif') || (substr(strtolower($f),-3) == 'png')) {
              $noimage++;
              $images[] = array('filename' => $f);
              array_multisort($images, SORT_ASC, SORT_REGULAR);
        }
          }
          closedir($dh);
        }
$itemtitle = preg_replace("/\"/", "'", $row->title);
if($noimage) {
  $html = '
<!-- JW "Simple Image Gallery" Plugin (v1.2.1) starts here -->
<link href="'.$mosConfig_live_site.'/mambots/content/plugin_jw_sig/sig.css" rel="stylesheet" type="text/css" />
<style type="text/css">.sig_cont {width:'.($_width_+10).'px;height:'.($_height_-75).'px;}</style>
<script type="text/javascript" src="'.$mosConfig_live_site.'/mambots/content/plugin_jw_sig/mootools.js"></script>
<script type="text/javascript" src="'.$mosConfig_live_site.'/mambots/content/plugin_jw_sig/slimbox.js"></script>
<div class="sig">';
    for($a = 0;$a<$noimage;$a++) {
    if($images[$a] != '') {
    $html .= '<div class="sig_cont"><div class="sig_thumb"><a href="'.$mosConfig_live_site.$rootfolder.$_images_dir_.'/'.$images[$a].'" rel="lightbox[sig'.$sigcount.']" title="';
if ($displaynavtip) {$html .= $navtip.'

';}
if ($displaymessage) {$html .= $message.'
<b>'.$itemtitle.'</b>';}
else {$html .= '<b>'.$images[$a].'</b>';}
$html .= '" alt="';
if ($displaymessage) {$html .= $message.' '.$itemtitle.'';}
else {$html .= $images[$a];}
$html .= '" target="_blank"><img src="'.$mosConfig_live_site.'/mambots/content/plugin_jw_sig/showthumb.php?img='.$_images_dir_.'/'.$images[$a].'&width='.$_width_.'&height='.$_height_.'&quality='.$_quality_.'"></a></div></div>';
    }
    }
$html .="\n<div class=\"sig_clr\"></div>\n</div>\n<!-- JW \"Simple Image Gallery\" Plugin (v1.2.1) ends here -->";
  }
$row->text = preg_replace( "#{gallery}".$_images_dir_."{/gallery}#s", $html , $row->text );
}     
  }
}

?>

Please Log in or Create an account to join the conversation.

More
16 years 3 months ago #10031 by felham
I had the same problem (only in Firefox).

Check out SIG Pro thumbnails display in one column. Problem explained & solution provided .

For me, it worked with adding the following to my CSS:
table.contentpaneopen {width:100%;}

But there are suggestions to other solutions as well.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum