1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Links after upgrade from phpBB3

Discussion in 'Installation, Upgrade, and Import Support' started by MattW, Feb 29, 2012.

  1. MattW

    MattW Well-Known Member

    Hi,

    After upgrading from phpBB3.0.10, the links in post are showing as plain html as per the below:

    Code:
    <a class="postlink" href="http://issues.pageturninteractive.com/CoverStory/four/?ptie=forums@chrisknott.co.uk" onclick="window.open(this.href);return false;">http://issues.pageturninteractive.com/C ... nott.co.uk</a>
    
    Is there an automated way to resolve this post upgrade?

    Thanks,
    Matt
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can use this addon:

    http://xenforo.com/community/threads/post-content-find-replace.6548/

    Here are settings for your specific situation:

    Quick Find: <a class="postlink"

    Regular expression: #<a class="postlink" href="([^"]+)" onclick="window\.open\(this\.href\);return false;">([^<]+)</a>#siU

    Replacement String: [url=\1]\2[/url]

    Screen shot 2012-02-28 at 6.59.48 PM.png

    I tested it on my forum and it worked using your code.
     
    MattW likes this.
  3. MattW

    MattW Well-Known Member

    Thank you so much Jake, that worked perfectly! (y)
     
  4. MattW

    MattW Well-Known Member

    I'm also having issues with youtube links.

    The link are all now the full URL, and not embedded

    Code:
    http://www.youtube.com/watch?v=j4VAF9QHxR
    I've tried the below:

    quick find
    Code:
    www.youtube.com
    regex
    Code:
    #http:.+youtube.+v=(\w+)#siU
    replace string
    Code:
    [media=youtube]\1[/media]
    It's matching the string, but only the first letter/number of the video ID.

    youtube.PNG

    Thanks,
    Matt
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You will need to better define the ID by specifying what comes after it. Is there a common delimiter after the URL? Such as a space character or bracket?

    A space:

    Code:
    #http:.+youtube.+v=(\w+) #siU
    
    A bracket:

    Code:
    #http:.+youtube.+v=(\w+)\[#siU
    
     
  6. Mike

    Mike XenForo Developer Staff Member

    Or try this regex:

    #http:.+youtube.+v=(\w+?)#siU
     
    Jake Bunce likes this.
  7. MattW

    MattW Well-Known Member

    That almost works, unless there is a - in the video ID.
    Most of the posts are single posts with just the video URL in them, and nothing else after the URL.
     
  8. Mike

    Mike XenForo Developer Staff Member

    Try:

    #http:.+youtube.+v=([\w\-]+?)#siU
     
    Jake Bunce and MattW like this.
  9. MattW

    MattW Well-Known Member

    Perfect (y)
     
  10. LondonDragon

    LondonDragon Active Member

    Hey guys, having the same issues with my import from PHPBB to XenForo, this tool no longer works, is there something similar? Cheers
     
  11. MattW

    MattW Well-Known Member

    Why do you say it no longer works? I only used it the other night after moving some images to d different domain name
     
    Jake Bunce likes this.
  12. LondonDragon

    LondonDragon Active Member

    Hi Matt, I installed it, place the install files in the library directory and installed the xml file, when I go to Tools and select "Replace in Posts" I get the following error:

    Error
    The requested page could not be found.
    Maybe I am not installing it correctly!!
    Thanks
     
  13. MattW

    MattW Well-Known Member

    Are you running any form of cache on the server, such as Xcache or APC?
     
    Jake Bunce likes this.
  14. LondonDragon

    LondonDragon Active Member

    No caching.
     
  15. MattW

    MattW Well-Known Member

    Hmm, anything in the server error logs? Does it show as an installed add-on on the front page of the admin control panel?
     
    Jake Bunce likes this.
  16. MattW

    MattW Well-Known Member

    I've just done a test installed on my test forum, and it's installed fine.
     
    Jake Bunce likes this.
  17. LondonDragon

    LondonDragon Active Member

    Unless its conflicting with another addon! I have installed around 35! :confused:
    Yes it did install fine and shows as installed.
     
  18. MattW

    MattW Well-Known Member

    I've got 24 installed on my main site.

    Just to double check, when you unzipped the archive, you should have had a folder called "PostReplace". Inside that, there is another folder also called "PostReplace". You then upload the second PostReplace folder into the library folder, and installed the it using the xml file?
     
    Jake Bunce likes this.
  19. LondonDragon

    LondonDragon Active Member

    Duh my bad, uploaded the PostReplace folder with the other PostReplace folder inside :( Corrected the directory structure and its all working now, many thanks and apologies :)
     
    Jake Bunce and MattW like this.
  20. MattW

    MattW Well-Known Member

    That's good, at least it's sorted now (y)
     

Share This Page