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

XF 1.4 Apostrophes Used as Quotation Marks

Discussion in 'XenForo Questions and Support' started by Amaury, Jul 20, 2015.

  1. Amaury

    Amaury Well-Known Member

    This might be impossible, but here goes. Many areas use apostrophes instead of quotation marks for quotes, such as, "Discussion in 'XenForo Questions and Support' started by Brogan, Feb 10, 2015."

    I'd like to change all of these, either removing them completely or changing them to actual quotation marks. However, searching for ' includes everything, obviously, such as "...control of this notice's appearance." Obviously, I don't want that and only want things like the example above.

    Is there a specific search I could do, similar to how Brogan had me search the templates for "troph" when I wanted to remove all instances of trophy points on our KH-Flare 2014 style, or will I have to comb through the 207 phrase search results, which I don't really mind if I have to?

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In terms of SQL search (not replace):

    SELECT *
    FROM xf_post
    WHERE message regexp '".*''.+''.*"'
    That's about as accurate as I can get with pattern matching. It will still over-identify a bit.
  3. Amaury

    Amaury Well-Known Member

    Just to make sure we're on the same page, here are a couple examples showing what I want to do:

    Phrases 1.PNG

    Phrases 2.PNG

    I know how to edit phrases, but my question is if there's a phrase search I could do to only find things of that pattern? (A word or words surrounded by apostrophes used as quotes.) Or will I need to comb through 207 phrase search results, ignoring things like this? Because if I do a search for just ', then that gets me 207 results and things like this, which I obviously don't want/need to edit:

    Phrases 3.PNG
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You could run this query:

    SELECT title, phrase_text
    FROM xf_phrase
    WHERE phrase_text regexp '.*''.+''.*'
    That will get you the phrase titles. Then you can search for those titles one at the time in the Admin CP.
    Amaury likes this.
  5. Amaury

    Amaury Well-Known Member

Share This Page