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

XF 1.5 Modifying built-in phrases with add-on?

Discussion in 'Styling and Customization Questions' started by Beanjam, Jun 3, 2016.

  1. Beanjam

    Beanjam Active Member

    Is it possible to modify built-in phrases via an add-on?

    I'm trying to modify the requested_user_x_not_found and incorrect_password phrases but it's not working.

    I also tried searching the templates but can't find them referred to anywhere, does anybody know where I might find them?
     
  2. Bob

    Bob Well-Known Member

    Both those phrases are used in php files.

    Selection_268.png


    Selection_266.png
     
    Beanjam likes this.
  3. Beanjam

    Beanjam Active Member

    Thanks for that, it seems more trouble than it's worth then.

    I was trying to change the phrases via an add-on to make it easier to keep customisations between my forums in sync.

    However it looks like I'm better off just manually editing the phrases in this case.
     
  4. Lawrence

    Lawrence Well-Known Member

    You'll need to make the changes again after each XF update as the phrases are rebuilt, so keeping a list of the phrases you have changed and their new text may be a good idea.
     
  5. Beanjam

    Beanjam Active Member

    I ended up taking a different approach, creating a new custom phrase and modifying the helper_login_form to replace the built-in phrase output with my new one.
     
    Lawrence likes this.
  6. Steve F

    Steve F Well-Known Member

    You could create an add-on, then make those edits using template modifications tied to the addon you created. Then you can export that and install on your other sites. Nice thing about template modifications is they generally survive upgrades where as template edits can cause outdated templates with loss of functionality.
     
  7. Lawrence

    Lawrence Well-Known Member

    There is nothing wrong with that approach thanks to XF's built in template merging function on upgrading, :)

    I have got to disagree here. The site in my signature is heavily modified, it has 112 edited XenForo templates, and not once did a merge fail nor messed up my style (the only issue I encountered was the merging system reported a template edit date was newer than the date of the template being updated, or something like that).

    The only issue I had when upgrading XenForo was a template modification that had stopped working on the admin side of things (I think that was going from 1.3.x to 1.4).
     
  8. Steve F

    Steve F Well-Known Member

    I didn't say the merge function failed or would, what I did mean was that there is potential loss of functionality if the outdated template remains outdated until there is some manual intervention.

    Obviously it can be done however I just gave an alternative way to do it with likely zero manual intervention in the future for all his sites.

    Edit: Also would like to say the merge function is okay, just not my most favorite feature.
     

Share This Page