Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Curiousity with links in discussions in forums that are embedded in Wordpress

peregrineperegrine MVP
edited September 2012 in Vanilla 2.0 - 2.8

if I put this link in a comment it opens a new tab as expected.

type of headphones

if I click on the discussion topic in the discussions page the discussion topic stays embedded.


However,

If I put the same link in a discussion (as the first item) - when you click on the discussion topic in the discussions page it opens a new tab for the discussion.

can anybody replicate this, if you have a wordpress site.

the code to insert in discussion

<a href="http://en.wikipedia.org/wiki/Headphones#Types" rel="nofollow" target="_blank">type of headphones</a>

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Comments

  • @Todd,

    Is there a way in buttonbar or in the embed version to process links the same way. It seems that using the buttonbar url vs. just posting the links have different side effects when embedded.

    <a href="http://en.wikipedia.org/wiki/Headphones#Types" rel="nofollow" >type of headphones</a>
    

    vs.

    http://en.wikipedia.org/wiki/Headphones#Types

    and if you add target="_blank" in the url when you start a discussion, it does some weird things when embedded in wordpress. As noted above.

    Surely there is someone with a wordpress forum with 3 minutes, who can test the above.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • here is what i found out

    if I post only this in the discussion no problem.
    
    with blank in front.
    
    <a target="_blank" href="http://en.wikipedia.org/wiki/Headphones#Types" rel="nofollow"   >type of headphones</a>
    
    
    with blank after
    
    if I post only this line in discussion "new topic" - then clicking the title of the discussion will open a new page.
    
    <a  href="http://en.wikipedia.org/wiki/Headphones#Types" rel="nofollow"   target="_blank" >type of headphones</a>
    

    go figure...

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thanks much shadowdare for your help testing.

    Shadowdare's site did not experience any of the problems I mentioned.

    It appears the problem is site specific glitch. - so just ignore this thread.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • It appears this mysterious behavior was caused by the interaction of the discussion tooltips plugin. Who wrote that damn thing :). aside from that the plugin doesn't appear to cause any other issues.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • ShadowdareShadowdare r_j MVP
    edited September 2012

    You're welcome. :)

    Here's a workaround for this issue with the discussion tooltips plugin that also strips BBCode tags if people use them in their posts:

    $bodyLine = $Sender->EventArguments['Discussion']->Body; $formline = strip_tags(str_replace(array('[',']'), array('<','>'), $bodyLine)); $sline = substr($formline, 0, 220);

    Add Pages to Vanilla with the Basic Pages app

  • peregrineperegrine MVP
    edited September 2012

    thx. I added your workaround for BBCode tags to the notes on the plugin.

    I also added a change to notes to prevent the problem I experienced when using html tags.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • No problem. I've tested my workaround and it works, and also fixes the target="_blank" URL problem.

    Add Pages to Vanilla with the Basic Pages app

Sign In or Register to comment.