View Full Version : Text Colors and Introduction Timestamp
BuckGB
01-27-2009, 07:28 AM
I just sent out my first newsletter, but for whatever reason the text links are using the default blue/purple colors rather than what I have in my CSS. The newsletter looks fine when previewed (http://www.gamebanshee.com/forums/newsletter.php?id=9&prev=1), but the text link colors don't carry over to the actual HTML email. Any idea how I can avoid this issue in the future?
Also, you'll notice my newsletter introduction has a timestamp of 12-31-1969 rather than the current date. How can I ensure that the correct time is used in the next newsletter I send out?
Thanks for the help!
Morgan
01-29-2009, 05:09 PM
Look at the HTML source for the email and see if the CSS for the links is there or has been stripped out or overridden by the email reader. For the date, what modules/setup are you using for the 'Newsletter Introduction' section?
BuckGB
01-29-2009, 05:14 PM
I'm using the Info Block with "Use Issue Text" set to Yes. It looks like all of the necessary CSS elements are there when I look at the newsletter's source HTML. I can forward you the emailed version, if that helps.
Morgan
01-29-2009, 05:40 PM
Go to the ACP -> GAZ -> Issues -> click the issue with the bad date -> set Refresh Layout to yes -> click the Save button and then do a preview. Is the date correct? For the CSS in the email, I'll need to see the HTML source. View the HTML source, copy-paste, and save to a text file, and then email the text file to the address in the PM sent to you. Do not forward the email to me; I need to see the HTML source.
BuckGB
01-29-2009, 08:35 PM
Even after refreshing the layout, the date is wrong in the preview. The source has been emailed to you.
Morgan
02-02-2009, 01:38 AM
The links appear tan, and when hovered over appear yellow, in the text file you sent. What do you see when you save the text file you sent to your local machine, to a file named newslettersource.html and view it with your browser?
For the date, what do you get when you run this query:
# add your vB table prefix to the gaz_data table name if you use a prefix
SELECT postdate, displaydate, frequency FROM gaz_data WHERE id = 9;
BuckGB
02-02-2009, 06:44 PM
The CSS works when I save the text to an HTML file and view it locally. However, it isn't working when viewed in Outlook or any other email client that I have access to. After sending out the newsletter, I received a lot of replies from people claiming that they could barely see the blue links on a dark background, so it's obviously an issue for some (if not most or all) of the recipients.
Running that SQL query returns zeroes and a frequency of 1233032400.
Morgan
02-05-2009, 05:33 PM
It could be the email reader that overrides the CSS you are applying to the links. What happens if you look at the email using a different email reader?
For the date, what frequency are you using? With that the date can be set via a query: TIMENOW - frequency = 1233032400.
BuckGB
02-05-2009, 08:09 PM
The only email clients I've tried are Outlook 2007 and a couple of web-based ones (such as mail2web). The CSS does not work in anything I've tried so far. Do you have any recommendations for another client I can check it in? If it doesn't work in Outlook, though, that's a big problem.
I turned off auto-generation of issues so I could manually send them out. With that said, the frequency is set to "Yearly", even though it's not active.
Morgan
02-10-2009, 04:14 PM
Try using the 'email to friend' option on the main newsletter.php page and send me a copy to the email address in that PM and I can see how it looks in my email reader. For the date, try running the following query:
# add your vB table prefix to the gaz_data table name if you use a prefix
UPDATE gaz_data SET postdate = 1233032400, displaydate = 1233032400 WHERE id = 9;
Afterward go to the ACP -> GAZ -> Issues -> click the issue with the bad date -> set Refresh Layout to yes -> click the Save button and then do a preview. Is the date correct?
BuckGB
02-10-2009, 06:06 PM
Newsletter mailed to you. Let me know if you have any luck figuring out what's wrong with the CSS.
After running the query, the correct date shows up. Am I going to have to run that query every time I create a new issue?
Morgan
02-17-2009, 07:29 PM
In the newsletter you sent, the links are green, and when hovered over, the links are black. Looking at the HTML source for one of the links shows the following:
<a target="_blank" href="http://www.xxxxxxxxxxx.com/forums/showthread.php?t=106101"><strong>xxxxxxxxxxx Promo Code at Good Old Games!</strong></a>
As there is no inline CSS, the link takes its CSS from the email reader. The CSS for A HREF anchor tags is pseudo class so there isn't a way to do this exactly:
<a style="a:link, a:visited {text-decoration:none;} a:hover, a:active {text-decoration:underline;} href="whatever">link</a>
You would need to make use of perhaps the SPAN tag to set a color for the link text with inline CSS in the following templates to override the pseudo class CSS that the email reader uses for its links:
gaz_html_thread
gaz_html_thread_simple
gaz_html_thread_info
As to the date, it is not clear why it was set to zero and not TIMENOW, as the value of the TIMENOW constant is what is used in the code.
BuckGB
02-18-2009, 12:57 PM
So there's no other way to fix the link issue without editing templates and adding span tags to every link? That seems like it's going to be a major annoyance for me when I upgrade (assuming there are template changes) and when I add or change links in each block.
And on the date issue, I'm still not clear on whether or not I'm going to have to run that SQL query every time I create a new newsletter. Can you confirm this one way or another?
Thanks!
Morgan
02-23-2009, 02:40 PM
Most, if not all, email readers have their own pseudo class CSS for links. If you want to override the color of the link, you would need to try SPAN or you could try using an important declaration (http://www.w3.org/TR/CSS2/cascade.html#important-rules) but there is no guarantee that the email reader will recognize that due to reasons listed here (http://www.thevbgeek.com/geeki/index.php/Styles_and_templates_in_GAZ#Inline_style_tools). As to the date, it is not clear to me why you got zero instead of TIMENOW, even after looking through the code, so I cannot say whether it will happen again. If it does, just let me know.
Lighting90
03-18-2009, 09:57 PM
I am having the same problem with blue text, and I have a green background... to match the forum.
My major problem is, I am not a code person, so need to find a simple way or have a simple explanation of what you need to do with span.. Can anyone help with this.. :)
Morgan
03-20-2009, 02:25 PM
In the gaz_html_thread template, you would find this:
$databit[title]
And add SPAN tags like so:
<span style="color: #000000;">$databit[title]</span>
Where #000000 is the color you want to use.
You can do the same sort of thing for the other templates listed in post twelve.
Lighting90
03-24-2009, 11:23 PM
Thanks Morgan, it is much appreciated... :)
Lighting90
03-30-2009, 08:28 PM
Sorry to be a total pain, but where do I find
* gaz_html_thread
* gaz_html_thread_simple
* gaz_html_thread_info
I have been looking everywhere for these items and can't find them...
Maybe this is a good indication that maybe I shouldn't touch... :(
Lighting90
03-30-2009, 08:54 PM
Sorry, found them... think I was having a Homer moment... Doh!!!
Lighting90
03-30-2009, 09:16 PM
Made the changes, and all looks fine in preview etc with white text on green background, but when sent by email and picked up by email client, it is still black text with links in Blue...
So I must have done something wrong..
I replaced this$databit[title]
with this <span style="color: #FFFFFF;">$databit[title]</span>
http://forum.landrovernet.com/newsletter.php?id=17&prev=1
I am using the style of the forum if that makes any sense...
Lighting90
03-30-2009, 09:23 PM
Just in case I am making some basic error... this is what I Typically end up with...
href="$vboptions[bburl]/showthread.php?t=$databit[threadid]"><strong><span style="color: #FFFFFF;">$databit[title]</span></strong></a>
Morgan
03-31-2009, 07:12 PM
Either of these should override the CSS but it might depend on what CSS the email reader injects:
<a href="$vboptions[bburl]/showthread.php?t=$databit[threadid]">
<strong>
<font color="#FFFFFF">$databit[title]</font>
</strong>
</a>
<a href="$vboptions[bburl]/showthread.php?t=$databit[threadid]">
<strong>
<span style="color: #FFFFFF;">$databit[title]</span>
</strong>
</a>
The FONT tag is deprecated so SPAN is the preferred tag.
vBulletin® v3.8.5, Copyright ©2000-2024, Jelsoft Enterprises Ltd.