Adding Author Names to Campaigns

More
18 May 2011 20:41 #1184 by IDHLA
joomlamailer version:1.7
Joomla! version:1.52
PHP version:5.2
MySQL version:5

Is it at all possible to add the author names into the campaigns? my client's site is basically an online newpaper and the writers seem to be quite touchy about their names being included in the newsletter alongside their stories. Is this possible? Also, is it possible to format the photos, such as resizing them or adjusting their position?

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

More
19 May 2011 14:32 #1195 by pete
Hello IDHLA,

Resizing images is currently not supported. We have plans to implement such a feature but it's still a bit down the road.
Displaying the author names is not possible at the moment.
If you're familiar with PHP code and want to show the author name on every article you can edit the file: /administrator/components/com_joomailermailchimpintegration/controllers/create.php

Add the author's name before the article content:
At line 1305 you'll find: $html_content = $art->introtext;
Replace that with:
Code:
$html_content = '<p>Author: '.JFactory::getUser( $art->created_by )->name.'</p>'; $html_content .= $art->introtext;

Add the name after the article content:
Add this code at line 1313:
Code:
$html_content .= '<p>Author: '.JFactory::getUser( $art->created_by )->name.'</p>';

This is for the preview part. For the actual campaign creation scroll up to line 270

Add the author's name before the article content:
At line 270 you'll find: $html_content = $art->introtext;
Replace that with:
Code:
$html_content = '<p>Author: '.JFactory::getUser( $art->created_by )->name.'</p>'; $html_content .= $art->introtext;


Add the name after the article content:
Add this code at line 278:
Code:
$html_content .= '<p>Author: '.JFactory::getUser( $art->created_by )->name.'</p>';

This refers to Joomla core articles only! Line numbers as of version 1.7

Kind regards,
Pete

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