85 Posts
kromoadv
10 years ago
2
Topic

Hi everybody,

I tried to use the syntax plugin {plugin} ... {/ plugin} with a Field X but it returns an error:
"Warning:
No images in specified directory. Please check the directoy!
Debug: specified directory - http://www.mysite.com/Array "


Whether I use the plugin typo:
{plugin}*value*{/ plugin}

Whether I use a custom template:
$ cck-> renderField ('my_fieldx);

or:

<? php foreach ($ cck-> get ('my_fieldx') -> value as $ fx) {?>
  <img src = "<? php echo $ fx-> value;?>" alt = "<? php echo $ fx-> image_alt;?>" title = "<? php echo $ fx-> image_title;?>" />
<? php}?>

Does anyone have any idea why is not working and help me figure out how to set it?

Thanks in advance.


Regards,

Luca

Get a VIP membership
85 Posts
kromoadv
10 years ago
0
Level 1

Anyone?

Regards,

Luca

85 Posts
kromoadv
10 years ago
0
Level 1

Hi people,

ok this is my 2 cent for the community ;)

i just don't like the seblod colorbox script for image galleries because it doesn't resize the modal box depending on the browser window size...

I solved my problem with a custom position and milkbox:

templates/seb_one/positions/my_content_type/content/bottombody.php

Bottom Body is the position i used in the content form of my content type.

This is the code:

<?php 
// No Direct Access
defined( '_JEXEC' ) or die;
?>

<?php
   $document =& JFactory::getDocument();
   $document->addStyleSheet(JURI::base().'templates/'. $this->template. "/css/milkbox/milkbox.css");
   $document->addScript( JURI::root( true ).'/templates/'.$this->template.'/js/milkbox-yc.js' );
   $document->addScript( JURI::root( true ).'/templates/'.$this->template.'/js/mootools-more.js' );
?>


<?php foreach($cck->get( 'dy_image_gallery_x' )->value as $fx){ ?>
  <a href="/<?php echo $fx->value; ?>" data-milkbox="gallery" title="<?php echo $fx->image_title; ?>" /> <img src="/<?php echo $fx->thumb1; ?>" alt="<?php echo $fx->image_alt; ?>" title ="<?php echo $fx->image_title; ?>" /> </a>
<?php } ?>

The CSS file goes in the css folder in seb_one template folder and the JS files in the js folder (you have to create it in the
seb_one template folder).

Since the milkbox is a mootools modal box you don't have to load the mootools-core.js wich is already in Joomla... but mootools-more.js is needed.

Anyway i will not mark this topic as solved because my question has not been answered.
I'd really like to know if i can use a third party plugin syntax with a Field X field.

Regards,
Luca
Get a VIP membership