- Posts: 5
COMMUNITY FORUM
simple question
- cachemony
-
Topic Author
- Offline
- New Member
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
-
- Offline
- Junior Member
- Designer
"If you fall down seven times, get up eight."<br /><br />JoomlaWorks Support Team
Please Log in or Create an account to join the conversation.
- cachemony
-
Topic Author
- Offline
- New Member
- Posts: 5
Any ideas?
Thanks,
Noah
Please Log in or Create an account to join the conversation.
- metacortex
-
- Offline
- Junior Member
- Designer
"If you fall down seven times, get up eight."<br /><br />JoomlaWorks Support Team
Please Log in or Create an account to join the conversation.
- cachemony
-
Topic Author
- Offline
- New Member
- Posts: 5
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.
- Morten
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- dook
-
- Offline
- New Member
- Posts: 1
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.