Image field - 'Use popup' in item view only

More
13 years 6 months ago - 13 years 6 months ago #11189 by kharmer
Hi,

I'm using the 'FLEXIcontent - image' field type and have configured it to 'use popup' (JCE MediaBox). However, I've noticed that it is inserted on both the 'category items' view and the 'item' view.

Just wondered if there was a simple way to prevent the script from inserting the popup on the 'category items' view.

The code I am suing for inserting the image in this view is as follows:
Code:
<?php if($item->positions['photo']) : ?> <?php foreach ($item->positions['photo'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> <?php else : ?> <img src="images/no-credential-pic-thumb.jpg" alt="<?php echo($this->escape($item->title)); ?>" /> <?php endif; ?>

Is there a way I can insert the small image without invoking the popup?

Kind regards,
Kris...
Last edit: 13 years 6 months ago by kharmer.

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

More
13 years 6 months ago #11196 by kharmer
OK, I'm sure there is no way of configuring whether the 'use popup' parameter is triggered on a category view or an 'items' view or both.

So, this is what I did.

> Open file 'plugins/flexicontent_fields/image.php'.
> Find the function 'onDisplayFieldValue' (aroud line #115) and edit the following.

Find:
Code:
// some parameter shortcuts $uselegend = $field->parameters->get( 'uselegend', 1 ) ; $usepopup = $field->parameters->get( 'usepopup', 1 ) ; $popuptype = $field->parameters->get( 'popuptype', 1 ) ;

and add directy after it:
Code:
// if the view is not 'items' set '$usepopup' to false: 0 if($_GET['view'] != 'items') $usepopup = 0;

Of course, if you have several areas on your site and some need to trigger 'use popup'; you'll need to add axtra checks/arguements to my line of code.

Please do let me know if there is a way of doing this without touching the plugin code (like from within the custom flexicontent templates etc.).

Thanks,
Kris...

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

More
13 years 6 months ago #11215 by micker
hello diplicate the plugin
rename for image-nopoup
do your modification (adapte name etc)
after you can selected image field or image-nopoup field
regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
12 years 1 week ago #24785 by acvmultimedia
Hello, I do it and it works.

How I can do to click in image and links to item details?

Thanks

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

More
12 years 1 week ago #24795 by ggppdk
Maybe you should use the "Related Items Field":

Read here:
www.flexicontent.org/documentati ... field.html


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.277 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline