Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 1:16 pm (All times are UTC )

 




Post new topic Reply to topic  [ 3 posts ] 
Author Message
Posted: Fri Jun 06, 2008 1:07 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Jan 02, 2007 2:42 pm
Posts: 66
I am trying to call Simple Image gallery in my component,
It is a content plugin that looks for { gallery }foldername{ /gallery } in an article and put the images for the folder there.
How can I call a content plugin from my component?


Top
  E-mail  
 
Posted: Mon Aug 25, 2008 12:31 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Aug 28, 2006 5:12 pm
Posts: 22
Hello,

Have you had any success?
I am attempting the same thing and have not been able to find a solution.

Thanks,


Top
  E-mail  
 
Posted: Mon Aug 25, 2008 1:23 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Jan 02, 2007 2:42 pm
Posts: 66
I created my own solution using jquery lightbox.
Download both, and call scripts from document.
You may need to use noconflict for jquery if you are also using mootools, google it.

Javascript (put in document header)
Code:
$(document).ready(function() {
$('a[@rel*=lightbox]').lightBox();
}

then in the php:

In Images/stories I created a folder called theimagefolder, inside of which are folders with name of id of database entry ($row->id) then put the code in the components .html.php file:

Code:
$dir = JPATH_SITE.'/images/stories/theimagefolder/'.$row->id; //
   
      // open specified directory
      $dirHandle = opendir($dir);
      while ($file = readdir($dirHandle)) {
      // if not a subdirectory and if filename contains the string '.jpg'
      if(!is_dir($file) && strpos($file, '.jpg')>0) {
         // update count and string of files to be returned
       $imgurl= $live_site."images/stories/theimagefolder/".$row->id."/".$file;
       ?>
       <a  rel="lightbox" href = "<? echo $imgurl; ?>" title="Your title" ><img src ="<? echo $imgurl; ?>" alt="Your alt"   width="100" height="70"  /></a>
      
       <?
         
       $count++;
         echo $ourlink;
         }
      }
   closedir($dirHandle);



Hope this helps


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Quick reply

 



Who is online

Users browsing this forum: oldfella73 and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group