Keyword

simple question

  • cachemony
  • cachemony's Avatar Topic Author
  • Offline
  • New Member
More
16 years 2 months ago #11499 by cachemony
simple question was created by cachemony
I get the following error when I view the my gallery in the browser:

Warning: opendir(/home/mcbridec/public_html/images/stories/</strong><strong>gallery</strong><strong class="red">) [function.opendir]: failed to open dir: No such file or directory in /home/mcbridec/public_html/mambots/content/plugin_jw_sig.php on line 46


Whats wrong?

Thanks,
Noah

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

  • metacortex
  • metacortex's Avatar
  • Offline
  • Junior Member
  • Designer
More
16 years 2 months ago #11500 by metacortex
Replied by metacortex on topic Re: simple question
Can you comment about what thing you're modified?

&quot;If you fall down seven times, get up eight.&quot;<br /><br />JoomlaWorks Support Team

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

  • cachemony
  • cachemony's Avatar Topic Author
  • Offline
  • New Member
More
16 years 2 months ago - 16 years 2 months ago #11501 by cachemony
Replied by cachemony on topic Re: simple question
Hi, I am simply trying to add a gallery to a content item and I get that error. I'm just having a hard time getting this to work. I put all the images into the image/stories directory. I put the tag: {gallery}myphotos{/gallery} in the text area of a content item, but it does not display the images property.

Any ideas?

Thanks,
Noah

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

  • metacortex
  • metacortex's Avatar
  • Offline
  • Junior Member
  • Designer
More
16 years 2 months ago #11502 by metacortex
Replied by metacortex on topic Re: simple question
Do you have been inserted {gallery}tags over <strong> tags? If you had it, the result will shows as error. You must to write {gallery}your folder{/gallery} for a correct display.

&quot;If you fall down seven times, get up eight.&quot;<br /><br />JoomlaWorks Support Team

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

  • cachemony
  • cachemony's Avatar Topic Author
  • Offline
  • New Member
More
16 years 2 months ago #11503 by cachemony
Replied by cachemony on topic Re: simple question
Thanks again for your help.

So I create a folder and put all my images in it in the image/stories folder. So it would be: image/stories/myfolder  and then simply write this in a content item: {gallery}myfolder{/gallery}  Correct?

I believe I did do that, but I'm going to try again.

Thanks for your patiences,
Noah

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

More
16 years 2 months ago #11504 by Morten
Replied by Morten on topic Re: simple question
In case you did the same typo I just did -and got the same error message- check if there's by mistake a space that has sneaked in in front of myfolder !

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

More
16 years 1 month ago #11505 by dook
Replied by dook on topic Re: simple question
I'm getting a similar problem to the one above...

I get the error message:

Warning: opendir(/home/eurofes/public_html/home/images/stories/festivals) [function.opendir]: failed to open dir: No such file or directory in /home/eurofes/public_html/home/mambots/content/plugin_jw_sig.php on line 46


I've put the images in the folder "festivals" using the text { gallery }festivals{ /gallery } (without spaces).

The url is www.eurofestival.co.uk and the problem can be found in the news item called " M.I.A. & more for Roskilde". Anyone know where I'm going wrong?

Also, I read on a PHP forum that Frontpage can cause problems. I used Frontpage to edit my index.html file (which is not being used anymore because I redirect the url - www.eurofestival.co.uk - to www.eurofestival.co.uk/home - e.g. to the Joomla site I've built) and apparently this can cause problems.

The PHP script for the Simple Image Gallery installation is as follows...

<?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_+30).'px;height:'.($_height_+20).'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 );
}     
  }
}

?>


Any help would be much appreciated!

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


Powered by Kunena Forum