Latest Threads Monthly Email [Deleted]

Got this error:
Fatal error: Maximum execution time of 30 seconds exceeded in /home/rex/addons/cruisingtalk.com/library/Zend/Mime.php on line 169

Also the subject lines just said: Latest Topics From
 
Got this error:
Fatal error: Maximum execution time of 30 seconds exceeded in /home/rex/addons/cruisingtalk.com/library/Zend/Mime.php on line 169

Also the subject lines just said: Latest Topics From

You'll have to increase the max_execution time for PHP. I've run into this as well on larger sites.
 
Apologies in advance for what I consider a stupid question :-/ But I don't know the answer - so I'm going to ask it... I have installed this - I want to tweak the layout. How can I test this add-on without sending any actual emails to members when I run the cron?

Thanks for the share and the assistance :)

J.
 
Apologies in advance for what I consider a stupid question :-/ But I don't know the answer - so I'm going to ask it... I have installed this - I want to tweak the layout. How can I test this add-on without sending any actual emails to members when I run the cron?

Thanks for the share and the assistance :)

J.
Perhaps this is why my Mama says, "Don't ask stupid questions, you silly lil' Bytch you." We have an interesting relationship... Anyway - thanks for the influx of answers .. LOL

J.
 
Open up MonthlyEmails/Model/Email.php and change:

PHP:
        $users = $this->getModelFromCache('XenForo_Model_User')->getUsers(array(
            'user_status' => 'valid',
            'receive_admin_email' => 1,
            'is_banned' => 0,
        ), array(
            'join' => XenForo_Model_User::FETCH_USER_FULL
        ));

to


PHP:
        $users = $this->getModelFromCache('XenForo_Model_User')->getUsers(array(
            'user_status' => 'valid',
            'receive_admin_email' => 1,
            'is_banned' => 0,
            'user_id' => 1,
        ), array(
            'join' => XenForo_Model_User::FETCH_USER_FULL
        ));

Replace 1 with your user id.
 
- would like to exclude my more active members eg anyone who has visited in the week or 2 weeks before the news email goes out. I see this as useful for my sleepier members but possibly annoying for those that have visited and already know.
But i appreciate thats a whole extra bundle.


Is this possible? To avoid spamming 'distant' users and getting troublesome spam reports, I'd like to send it to only those whose last activity was between xx and xx (eg. 2 weeks ago and 2 months ago). Perhaps a code change to the Email.php file similar to the above sending to a specific user? Otherwise I'd be sending out almost 19,000 emails each run!


Also the subject lines just said: Latest Topics From
I have the same issue with the emails subject too, as well as (presumably) the community name on the second line ... Does editing the email template affect either the of these?

Untitled.webp
 
.....
I have the same issue with the emails subject too, as well as (presumably) the community name on the second line ... ....

You have to change the variable {$boardname} for the variable {$xenOptions.boardTitle} in the email template for this Addon.
 
You have to change the variable {$boardname} for the variable {$xenOptions.boardTitle} in the email template for this Addon.

Thanks.
I wonder why the Board Title within /admin.php?options/list/basicBoard is not used ??
 
To manually specify forum IDs to pull from:

Open library/MonthlyEmails/Model/Email.php

Delete the code in red:

Rich (BB code):
 protected function _getRecentPublicThreads()
{
$nodeModel = $this->getModelFromCache('XenForo_Model_Node');
 $nodes = $nodeModel->getAllNodes(false, true);
 $nodePermissions = $nodeModel->getNodePermissionsForPermissionCombination(1);
        
 $nodeHandlers = $nodeModel->getNodeHandlersForNodeTypes(
 $nodeModel->getUniqueNodeTypeIdsFromNodeList($nodes)
 );
 
 $nodes = $nodeModel->getViewableNodesFromNodeList($nodes, $nodeHandlers, $nodePermissions);
        
 $options = XenForo_Application::get('options');
        
 foreach ($nodes as $node)
 {
 $nodeIds[] = $node['node_id'];
 }
       
$conditions = array(
'node_id' => $nodeIds);
       
$fetchOptions = array(
'order' => 'post_date',
'limit' => $options->monthlyEmailsThreadLimit);
       
$threadModel = $this->getModelFromCache('XenForo_Model_Thread');
       
$threads = $threadModel->getThreads($conditions, $fetchOptions);
       
return $threads;
}
In its place, add:

Rich (BB code):
 $nodeIds = array(
'2',
'3',
'4'
);


The resulting code will look like:
Rich (BB code):
 protected function _getRecentPublicThreads()
{
$nodeIds = array(
'2',
'3',
'4'
);
       
$conditions = array(
'node_id' => $nodeIds);
       
$fetchOptions = array(
'order' => 'post_date',
'limit' => $options->monthlyEmailsThreadLimit);
       
$threadModel = $this->getModelFromCache('XenForo_Model_Thread');
       
$threads = $threadModel->getThreads($conditions, $fetchOptions);
       
return $threads;
}
Thanks for this.
Perhaps there is a way to specify all nodes EXCEPT for nodes 1, 2 & 3?
Is this possible? Can you share how please?

J.
 
So - I finally got my email template edited - with site logo and customizations:

di-7RIF.png



I like it and plan to run the cron weekly or bi-weekly and hope this will bring much-needed activity to my forum. So thanks again for the share Bama and Chris! Much appreciation.

J.
 
Hi guys,

Great mod and just customized it to my needs, before I start using it, is it possible to edit the email.php file to only include members that have ticket the "Receive site mailings" in their Privacy settings?

Many thanks :)
 
Hi guys,

Great mod and just customized it to my needs, before I start using it, is it possible to edit the email.php file to only include members that have ticket the "Receive site mailings" in their Privacy settings?

Many thanks :)
hmmm - I'm pretty sure the add-on respects users' privacy settings right out-of-box
Someone else care to confirm this...?
 
For selecting lesser active users, something like this could work?

Rich (BB code):
        $users = $this->getModelFromCache('XenForo_Model_User')->getUsers(array(
            'user_status' => 'valid',
            'receive_admin_email' => 1,
            'is_banned' => 0,
            'last_activity' (some operator) (some value),
 
Top Bottom