Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

bbcodes autolink and mail

Asked Modified Viewed 1,954 times
D
DwB
D
DwB 10
  • Junior Member, joined since
  • Contributed 21 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
asked
Junior Member

Using the BBCodes autolink and mail at the same time causes some problems. In $text the tag [mail] isn't removed before calling hide_email. Result is that parts of the CDATA of the function hire_mail is shown.

Solution: parse $text before calling hide_mail and replace [mail]
$containsMAIL = strpos($text, '[mail]') !== FALSE;
if ($containsMAIL) {
   $text = str_replace(array("[mail]", "[/mail]"), array("", ""), $text);
}


Looking at the sources at GitHub v9-autolink must be updated as well.
0 replies

4 posts

R
Rimelek
R
  • Senior Member, joined since
  • Contributed 301 posts on the community forums.
  • Started 23 threads in the forums
answered
Senior Member

I know, you can find this message in the line of autolink: "MUST be above URL and Mail bbcode." but in v9, it works me if I move autolink below URL and Mail. I cannot try it on v7 now.
0 replies
D
DwB
D
DwB 10
  • Junior Member, joined since
  • Contributed 21 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
answered
Junior Member

I've installed a v7 and autolink is at top and url and mail are at the bottom, still have the problem without the fix.
0 replies
R
Rimelek
R
  • Senior Member, joined since
  • Contributed 301 posts on the community forums.
  • Started 23 threads in the forums
answered
Senior Member

Quote

autolink is at top
- by DwB

Quote

it works me if I move autolink below URL and Mail.
- by Rimelek


The right order for me:

- URL
- Mail
- autolink
0 replies
D
DwB
D
DwB 10
  • Junior Member, joined since
  • Contributed 21 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
answered
Junior Member

Tried your working solution for v9 as well in v7. Doesn't work either.

Having it at top makes at least a clickable link, although the receiver is "[mail]<script type="
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 4 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

D
D
DwB 10
  • Junior Member, joined since
  • Contributed 21 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
R
R
  • Senior Member, joined since
  • Contributed 301 posts on the community forums.
  • Started 23 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet