Using CryptX in Template (5 posts)

  1. visualcraftsman
    Posted 4 years ago #

    I just installed CryptX 3.1.2 and pasted the php code into my footer.php template file to replace a mailto anchor. I changed the variable names where applicable and updated my css file for the class name, but after I tested the php file the anchor for the mailto link doesn't show up at all. Here's the php code I used replacing the old mailto link...

    $text="Email Us";
    $css ="footEmail";
    if (function_exists('cryptx')) {
    cryptx($mail, $text, $css, 1);
    } else {
    echo sprintf('<a href="mailto:%s" class="%s">%s</a>', $mail, $css, ($text != "" ? $text : $mail));


  2. visualcraftsman
    Posted 4 years ago #

    Okay, found the issue. But, can I switch the css class to an id by just changing "class" to "id" in the code above?

  3. visualcraftsman
    Posted 4 years ago #

    Well, I edited cryptx.php and changed "class" to "id" in the function for the template stuff. Seems to work great now. Only thing is, whenever the plugin gets updated it'll probably wipe out my changes.

    So would be grrreat if both class and id was supported in the anchor :-) cough, cough.

  4. Ralf Weber
    Plugin Author

    Posted 4 years ago #

    Hi visualcraftsman,

    thank you for your hints and improvements.

    I will add this to the next version of CryptX, so i will support both id and class configurable in the backend and at the template function.

    Will this be ok for you?

    Kind regards

  5. visualcraftsman
    Posted 4 years ago #

    That would be great Ralf! Thank you for considering it and for making a really cool plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CryptX
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic