V4.2.x Format Link URL

Discussion in 'Modules / Plugins / Modifications' started by freeze2, Feb 12, 2012.

  1. freeze2 Customer

    I'm currently working to allow a link to a Google map on the viewlisting.tpl. I am accomplishing this by "allowing URL" via the admin. The logged in user can then input a link to the google map if they choose.

    To format the output (example title tag and link text), I went into the plugins/modifier.linkurl.php file and made the following change:

    Approx line 62

    Find:
    Code:
    $string = preg_replace($pattern,"'$1<a href=\"$2$3\" title=\"$2$3\" target=\"_blank\">'.kuerzen('$2$3',$length).'</a>$4'",$string);
    Replace with:
    HTML:
    $string = preg_replace($pattern,"'$1<a href=\"$2$3\" title=\"Google Map\" target=\"_blank\">'.kuerzen('Google Map',$length).'</a>$4'",$string);
    It all seems to work great, just wanted someone to check the code to see if this is actually the correct way to do it.

    Thanks very much!
  2. seymourjames All Hands On Deck

    Nice idea - have you thought about making that link rel="nofollow" ?
  3. freeze2 Customer

    Thanks...just wanted to make sure the link was working first...thanks for the tip

Share This Page