Newsletter Builder Archive Issues - Draft newsletters
11 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: October 26, 2015 (RSS)
I am having a bit of a problem with a Newsletter Builder installation. I am using CMSB 2.65 and Newsletter Builder 3.02.
When I create a draft newsletter, it shows up on the archive.php page. It shouldn't, as my testing has shown from other implementations.
I have attached my archive.php file as I believe the error is in there.
Thanks!
Ragi
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
By Damon - October 21, 2015
Hi Ragi,
Can you try replacing the code on line 28:
'where' => $where,
with this code:
'where' => "send IN ('all','archive')"
Let me know if that works for you.
Thanks!
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
That worked perfectly!
Thanks Damon.
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Damon: I just realized I also have the file weeklyMessage.php which only lists the weekly messages. It has the same issue as the archive.php file, but in this case its a bit more convoluted. Can you provide me a hint?
Ragi
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
By Damon - October 23, 2015
Hi again,
For the weeklyMessage.php file, on line 22, can you replace this:
'where' => "to_list = '" . coalesce(mysql_escape(@$_REQUEST['to_list']), '2') . "' AND " . $whereMessageNumIs,
with this:
'where' => "send IN ('all','archive') AND " . whereRecordNumberInUrl(1), // If no record # is specified then latest record is shown
Let me know if that works for you.
Thanks!
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Damon: again, great!
Ragi
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Woops! I made a mistake. Your solution actually brought me back to a previous version. it appears we’re back to the Messages from the SSC appearing under the weekly message archive. Only the weekly messages should appear in the weekly message section and archives.
And weekly messages are also appearing in the newsletter achive, when only Messages from the SSC (Owls nest) and 706 on the move! newsletters should be in the newsletter archive.
So, no it did not work.
Ragi
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
By Damon - October 26, 2015
Hi Ragi,
You do need this code:
'where' => "send IN ('all','archive') AND " . whereRecordNumberInUrl(1),
so that only newsletters that have been sent and archived (all) or just archived (archive) will be displayed. Otherwise newsletters that set as drafts (none) are displayed as well.
Can you add your additional mySQL filtering to the where statement?
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
By northernpenguin - October 26, 2015 - edited: October 26, 2015
Damon: Not exactly how I would do that.... would this work?
'where' => "to_list = '" . coalesce(mysql_escape(@$_REQUEST['to_list']), '2') . "' AND " . $whereMessageNumIs . " AND " . "send IN ('all','archive') AND " . whereRecordNumberInUrl(1),
Ragi
P.S. It worked! Thanks Damon.
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
By Damon - October 26, 2015
It worked!
My two favorite words! :)
Thanks for the update.
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/