ACYMailing display image field.

More
12 years 2 months ago #22425 by inspireddevelopment
Hello, I've been working with Flexi and ACYMailing for a new site and thought someone out there might appreciate what i've learnt.

I needed to get the images displaying in my ACYM newsletter.. obviously it didnt work by default, here is my solution.

Open the file plugins/acymailing/tagcontent.php and scan down to about line 594 and look for a function called _replaceContent, then you want to scan down a few more lines until you see a line that says something like "if($this->params->get('integration') == 'jreviews' AND !empty($article->images))" - you can actually put the code wherever you like within the replaceContent function but sticking it close to the jreviews plugin just keeps it neat.

Paste in the following code:
Code:
if($this->params->get('integration') == 'flexicontent'){ $sql = "SELECT value FROM #__flexicontent_fields_item_relations WHERE field_id=YOUR_IMAGE_FIELD_ID AND item_id=".$tag->id; $db->setQuery($sql); $flexi_image = $db->loadResult(); $array = unserialize($flexi_image); $img_name = $array['originalname']; $myPict = '<img src="URL_TO_IMAGES/s_' . $img_name . '" hspace="5" style="margin:5px" align="left" />'; $article->introtext = $myPict.$article->introtext; }


Just change the YOUR_IMAGE_FIELD_ID in the query to.. your image field id. Modify the line beginning $myPict so that URL_TO_IMAGES becomes your Flexi image path.

I think thats everything... Thanks to everyone in the forums thats helped out when we've been stuck!

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

More
12 years 2 months ago #22426 by micker
go tips !
did you try to put this in a plugin (in order to didn't touch on core file )
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 2 months ago #22453 by inspireddevelopment
I havent done so, time is limited unfortunately and i'm onto the next project already. Although anyone who wants to is more than welcome!

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.259 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