Got it working (just) to send campaigns from CGBlog articles without changing any module code.
For anyone interested:
1. Ensure the CMon Options tab is saved with the API Key & Client ID etc
2. Create a module_custom directory
3. Create CMon/templates directory
4. Copy campaigns.tpl into this directory and change it to the following with the module_action_link to the createCampaignStep1 action:
Code: Select all
{*<div class="pageoptions">
<p class="pageoptions">
<div style="border: 1px solid;">
{$addCampaignIcon}
{$addCampaign}
{$sendCampaignIcon}
{$sendCampaign}
{$viewDraftsIcon}
{$viewDrafts}
{$deleteCampaignIcon}
{$deleteCampaign}
</div>
</p>
</div> *}
<div class="pageoptions">
<p>{module_action_link module='CMon' action='createCampaignStep1' text="Send campaign"}</p>
</div>
{if $campaigns|count > 0}
<table cellspacing="0" class="pagetable">
<thead>
<tr>
<th>{$campaign_title}</th>
<th>{$campaign_id_title}</th>
<th>{$sent}</th>
<th>{$total_recipients_title}</th>
<th class="pageicon"> </th>
</tr>
</thead>
<tbody>
{foreach from=$campaigns item=campaign}
<tr class="{$campaign->rowclass}" onmouseover="this.className='{$campaign->rowclass}hover';" onmouseout="this.className='{$campaign->rowclass}';">
<td>{$campaign->Name}</td>
<td>{$campaign->CampaignID}</td>
<td>{$campaign->SentDate}</td>
<td>{$campaign->TotalRecipients}</td>
<td>{$campaign->manageIcon}</td>
</tr>
{/foreach}
</tbody></table>
{*
<div class="pageoptions">
<p class="pageoptions">
{$addCampaignIcon}
{$addCampaign}</p>
</div>
*}
<div class="pageoptions">
<p>{module_action_link module='CMon' action='createCampaignStep1' text="Send campaign"}</p>
</div>
{/if}
This puts a 'Send campaign' link in the Campaigns tab.
This module really should be BETA. There are lots of glaring gaps and old-style code BUT, the above is all you need to send a page as campaign in the current version of CMSMS, ie 1.11.11. You'll have to format your page template to suit the Campaign Monitor template reqs.
To send the GCBlog article, I used the SEOTools2/CGBlog stuff discussed in
http://forum.cmsmadesimple.org/viewtopi ... =7&t=71429 with the following changes:
1. In the CGBlog template, add {$nokeywords=1}, and
2 in the SEOTools2 title field, {$mytitle}{if empty($nokeywords)} | {$sitename} - {$title_keywords}{/if}. This ensures that only the article title is delivered to Campaign Monitor as the campaign name and email subject.
It's unlikely this module will ever be updated. This however will allow you to do what the Module description says it will do.