Author Topic: CSS Inline Styles for links  (Read 5465 times)

jac

  • Posts: 26
    • View Profile
CSS Inline Styles for links
« on: September 24, 2007, 05:21:22 am »
Is there any way of defining the appearance of Tracked Links AND Message Codes within an HTML email using inline CSS styles as opposed to normal CSS styles.

If so...can you please explain how!

Many thanks
---
John

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
CSS Inline Styles for links
« Reply #1 on: September 24, 2007, 07:34:27 am »
Hi John,

This is unfortunately not yet possible.  I suppose an option in message codes that output a link to specify the CSS "class" would suffice for this.  I've added this to suggestions.  I'm working on a major update (incl.  several features) after which it will be a lot easier for me to continue adding even more features.

If you want to apply a CSS class to ALL of your ListMail links you would have to manually edit the "processmsg" function of admin.php (search for "function processmsg").  If you need further assistance with that let me know and I will go through it line-by-line with you.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

jac

  • Posts: 26
    • View Profile
CSS Inline Styles for links
« Reply #2 on: September 24, 2007, 07:39:14 am »
DW

Thanks for the swift reply.  I looked at the processmsg function in admin.php but didn't really understand where to specify inline css styles.  If you could explain line by line that would brilliant.

Again thanks for your timely reply.
---
John

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
CSS Inline Styles for links
« Reply #3 on: September 25, 2007, 12:25:56 am »
No problem - here it is:

First search for:
Code: [Select]
function processmsg
Then search for
Code: [Select]
<a
Change these lines:
Code: [Select]
     if($mhtml=='1') $xmsg = eregi_replace('!link_'.$refcode,"<a class=codelink href=\"$href\">" . $ktitle . "</a>",$xmsg);
Code: [Select]
      $rtext .= "<a class=coderem href=\"$rlink\">$data2</a>";
Code: [Select]
      $rtext .= "<a class=coderem href=\"".$config['listmail_path']."confirm.php?u=$usid\">$data2</a>";
Code: [Select]
      $rtext .= "<a class=link2html href=\"".$config['listmail_path']."showpage.php?u=$usid&m=$mid\">$data2</a>";
Actually, now that we're looking at the code itself you will see there are some undocumented CSS classes already applied to all these links. :)  For message codes use the class ".codelink", for remove and confirm links ".coderem", for Link-to-HTML links, use ".link2html".  You may not even have to modify the code. ;)

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting