HELP!!!!!!!!!!!
What would the smarty code need to be just to display the content of the table that holds the email addresses of the newsletter subscribers?
Please help. Thanks John |
Not quite a simple as that really.
The first step is creating a php script that will pull the info from the database and assign it to smarty. You can then display this with a template. Or you could export the data straight from the database using phpmyadmin if you have it. |
You can use this code I modified from one I created for another purpose:
Code:
<?php This pulls the newsletter email addresses out as well as linking to the customer table and getting the first and last name. Copy this into a text file, fill in your specific database information, save as newsletter_maillist.php or something like that, then post it up in a secure folder on your site (.htaccess protected or something) and just call it up by URL:http://www.yoursite.com/yoursecurefolder/newsletter_maillist.php A better way would be to use the auth.php and config.php to get access to the db, but I couldn't figure out how to incorporate them into what I was trying to do. I'm fairly new to PHP and MySQL. Maybe funky can add advice on this and how to then assign to smarty if he's so inclined... :D hth |
Looks good so far.
Looks good so far. Initial tests have been successful.
Will keep you posted. |
This script works
This script works.
Now how do I stick it inside an xcart template? |
Well, that would take me a bit of time to figure out (which I currently don't have at the moment), since it's the part where you would do that smarty stuff.
Sorry to bail on you, but maybe one of the gurus can post a quick reply... |
I appreciate your help anyways.
I appreciate your help anyways.
I can force it to work, but it'll be a little sloppy. I'm sure it would be a breeze for one of the masters like Funkydunk. For me so far I can get the job done but it might be a little messy under the hood. You put me on the right track and your help is greatly appreciated. Thanks, John |
okay .... here goes :)
new file: admin/subscriber_list.php Code:
<? add in to the central area: Code:
{elseif $main eq "subscribers"} new template: admin/main/subscriber_list.tpl Code:
{* subscriber_list.tpl - funkydunk 2003 *} |
Nice job funky! :D I knew you'd have no problem with this.
|
works on 3.3.x haven't tested on 3.4.x .
thanks |
All times are GMT -8. The time now is 09:27 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.