Keyword

Parsing third-party plugin

More
14 years 6 months ago #75197 by Mato
Parsing third-party plugin was created by Mato
Hello

I would like to include some images to certain item in my K2 catalog. To do it automaticly i inserted this code into item.php:

// item external pictures and video

$page_title = strtolower($mainframe->getPageTitle());

$url='images/CONTENT/CATALOG/MULTIMEDIA/'.$page_title;

if(is_dir($url))
{// TRUE
$dir_content = scandir($url);
if ($dir_content != FALSE){
// DIR NOT EMPTY

$directory = $url."/";;

// get all image files with a .jpg extension.
$images = glob("" . $directory . "*.jpg");
if (isset($images)) {
echo '{artsexylightbox path="..." previewWidth="150"},{/artsexylightbox}';
}

$videos = glob("" . $directory . "*.flv");
if (isset($videos)) {
echo '{flv}'.$page_title.'/'.$page_title.'{/flv}';
}

}else{ // DIR EMPTY
}
}
else // FALSE
{
echo ("Folder does not exists");
}

It's interesting that video is playing but images are not showing up. Instead just string {artsexylightbox path="..." previewWidth="150"},{/artsexylightbox} appears.

If there is any solution i would be very happy.

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


Powered by Kunena Forum