Re: Email Archive Search (Archive Manager)
Now I get it. The goal is to break html that can't be used inside another page, but fix the rest. I think I have it now, all my tables are corrected, and I don't see any code anymore. Here is my rewriten section:
PHP Code:
if ($action=='prev_html') {
$html_content = $this_email->fields['email_html'];
$html_content = str_replace('__','><',$html_content);
$html_content = str_replace('_html','<html',$html_content);
$html_content = str_replace('_base','<base',$html_content);
$html_content = str_replace('_table_','<table>',$html_content);
$html_content = str_replace('_table ','<table ',$html_content);
$html_content = str_replace('_/table','</table',$html_content);
$html_content = str_replace('</table_','</table>',$html_content);
$html_content = str_replace(array('_tr_','_tr>'),'<tr>',$html_content);
$html_content = str_replace(array('_/tr_','_/tr>'),'</tr>',$html_content);
$html_content = str_replace(array('_td_','<td_'),'<td>',$html_content);
$html_content = str_replace('_td ','<td ',$html_content);
$html_content = str_replace(array('_/td_','_/td>','</td_'),'</td>',$html_content);
$html_content = str_replace('"_','">',$html_content);
$html_content = str_replace('_ ','> ',$html_content);
$html_content = str_replace('_li>','<li>',$html_content);
$html_content = str_replace('_div ','<div ',$html_content);
$html_content = str_replace('_/div_','</div>',$html_content);
$html_content = str_replace('_/div','</div',$html_content);
$html_content = str_replace('</div_','</div>',$html_content);
$html_content = str_replace('_strong_','<strong>',$html_content);
$html_content = str_replace('_/strong_','</strong>',$html_content);
$html_content = str_replace('strong_','strong>',$html_content);
$html_content = str_replace('_/strong','</strong',$html_content);
$html_content = str_replace('_!','<!',$html_content);
$html_content = str_replace(array('_br_','_br /_','_br />','_br /','<br /_'),'<br />',$html_content);
$html_content = str_replace('_style','<!-- style',$html_content);
$html_content = str_replace('_/style_','</style> -->',$html_content);
$html_content = str_replace('em_','em>',$html_content);
$html_content = str_replace('_/em','</em',$html_content);
$html_content = str_replace('_img ','<img ',$html_content);
$html_content = str_replace('_a href','<a href',$html_content);
$html_content = str_replace('_sup_','<sup>',$html_content);
$html_content = str_replace('_/sup','</sup',$html_content);
$html_content = str_replace(array('_/a_','_/a>'),'</a>',$html_content);
$html_content = str_replace(array('<html>','</html>','</html_','_/html_'),'',$html_content);
$html_content = str_replace(array('<head>','</head>','_/head_'),'',$html_content);
$html_content = str_replace(array('<body>','</body>','_body_','_/body_'),'',$html_content);
$html_content = str_replace('"_','">',$html_content);
$html_content = str_replace('_nobr','<nobr',$html_content);
$html_content = str_replace(';nbsp;',' ',$html_content);
$html_content = str_replace('&','&',$html_content);
$html_content = str_replace('&&','&&',$html_content);
$html_content = str_replace('& ',' ',$html_content);
$html_content = str_replace('"','"',$html_content);
}
Re: Email Archive Manager
(From a PM)
Quote:
Great Contribution! I'm having trouble using the Email Archive Manager, it does not display any emails. The page isnt broken, just not doing anything.
By default nothing shows up, you have to perform a search in order to get results. Are you able to load the page and perform a search?
Re: Email Archive Manager
Thanks for your quick reply!
The page renders fine, doesnt display any errors. However there is no search field. All I get is the normal top of the page and bottom, but no content. I checked to make sure there was emails in the archive and there are. Any ideas what I can do to fix it?
I'm using Zencart 1.3.8a.
Thanks!
Matt
Re: Email Archive Manager
Hi
I installed Email Archive manager and when i view emails in HTML this is what i see.......... It seems to be pulling the css in from the email welcome template
http://www.bidgeepumps.com.au/images/MAILBEEZProb.jpg
How do I remove this??
Thanks
Re: Email Archive Manager
Quote:
Originally Posted by
mateogp
The page renders fine, doesnt display any errors. However there is no search field. All I get is the normal top of the page and bottom, but no content. I checked to make sure there was emails in the archive and there are. Any ideas what I can do to fix it?
Re-upload the files. It sounds like either they got corrupted during transfer, or you put them in the wrong place.
Quote:
Originally Posted by
Bidgee182
Have you made any customizations to your email templates?
Re: Email Archive Manager
Hiya Frank,
Just wondering if you can help me.
I am using your Email Archive Manager which is Great :) in my Zen-cart 1.3.9 and it seems to be working fine, guess it doesn't need to be updated to the latest 1.3.9 version :)
The only problem I am getting is when I click on (Trim Email Archive), it's deleting all the emails, even ones that are new and only a few days old!
I have changed the dates on my website to suit the d/m/y. Would that be the problem? if so what do you think is the fix?
Hope you can help.
Best Regards,
Re: Email Archive Manager
Glad you like it, rlexyd. :bigups:
The Trim functionality doesn't even look at your date formats. Since the date selections are preset radio buttons (1, 6, or 12 months), there's no date to enter, so the code just automatically puts the date in MySQL format. If you didn't touch the code in the addon you should be fine.
Assuming you didn't touch the code, let's do a test. Make sure you've installed the latest version of Email Archive Manager from the addon section. Then open email_history.php, and find this code at line 60:
Code:
$db->Execute("delete from " . TABLE_EMAIL_ARCHIVE . " where date_sent <= '" . zen_date_raw($cutoff_date) . "'");
Just above that line, enter the following code:
Code:
$sql = "delete from " . TABLE_EMAIL_ARCHIVE . " where date_sent <= '" . zen_date_raw($cutoff_date) . "'";
die($sql);
Save and upload the file to your /admin directory.
Now perform a trim, any date range. When you do, the page will come back blank with just the SQL query listed at the top. Copy and paste that query into a response post on this thread.
When you're done, go back into email_history.php and undo the changes described above. You can simply comment out the new lines and uncomment the original.
Re: Email Archive Manager
Hello Frank,
Thank you for your reply.
I did as you asked, here is the query:
delete from zen_email_archive where date_sent <= '20101307'
Just wondering, shouldn't the date have shown up as 20100713?
Hope you can solve this.
Best Regards,
Re: Email Archive Manager
Re: Email Archive Manager
Sorry, went underground dealing with some non-Zen Cart stuff.
You're right, that date isn't correct. I'll look into this further.