My quick&dirty solution:
query/newsletter.php, line 89:
after $post_title = $post->post_title; insert:
if($action=="first_post_title")Return $post_title;
sendmail/sendmail-subscriber.php line 45:
after content, insert another alp_template_compose:
$first_post_title = elp_cls_newsletter::elp_template_compose($data[0]['elp_set_templid'], $data[0]['elp_set_postcount'], $data[0]['elp_set_postcategory'], $data[0]['elp_set_postorderby'], $data[0]['elp_set_postorder'], "first_post_title");
$subject = substr_count($subject,"###POSTTITLEONLY###")?$first_post_title:str_replace("###POSTTITLE###", $first_post_title, $subject);
now, in the mail configuration you can add ###POSTTITLE### or ###POSTTITLEONLY### to extend or replace the mail subject.
I added the above code but only getting ###POSTTITLEONLY### in the subject not the
actual title. Not getting any errors, just not replacing the variable with actual title.
Hi there, does it work for ###POSTTITLE###?
Nope, I just changed :
$subject = substr_count($subject,”###POSTTITLEONLY###”)?$first_post_title:str_replace(“###POSTTITLE###”, $first_post_title, $subject);
To:
$subject = $first_post_title;
And I’m still getting the variable not the title.
did i miss something?
email-posts-to-subscribers/sendmail/sendmail-subscriber.php
https://pastebin.com/7uWSayMZ
email-posts-to-subscribers/query/newsletter.php
https://pastebin.com/qZZ72hTY
-
This reply was modified 6 years, 9 months ago by
mattblox.
-
This reply was modified 6 years, 9 months ago by
mattblox.
I’m using 4.4 so I’ll grab 4.8 & try it.
Actually installed 4.9 with the edits. Working great thanks!