Welcome Guest, Not a member yet? Register   Sign In
Auto_LInk - how to add a class to the resulting link
#4

[eluser]Georgi Budinov[/eluser]
Yes I realized that Sad OK no way as I see the problem!
However you can overwrite the function by creating your own my_url_helper updating the code:

Code:
function auto_link($str, $type = 'both', $popup = FALSE, $customClass = FALSE)
    {
        if ($type != 'email')
        {
            if (preg_match_all("#(^|\s|\()((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
            {
                $pop = ($popup == TRUE) ? " target=\"_blank\" " : "";
                $pop .= ($customClass) ? " class=\"".$customClass."\" " : "";

Not tested but something like this will help.


Messages In This Thread
Auto_LInk - how to add a class to the resulting link - by El Forum - 09-14-2010, 05:52 AM
Auto_LInk - how to add a class to the resulting link - by El Forum - 09-14-2010, 08:05 AM
Auto_LInk - how to add a class to the resulting link - by El Forum - 09-14-2010, 08:08 AM
Auto_LInk - how to add a class to the resulting link - by El Forum - 09-14-2010, 08:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB