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

XF 1.5 Edit img BBCode

Discussion in 'Styling and Customization Questions' started by tr1cky, Nov 12, 2015.

  1. tr1cky

    tr1cky Member

    Hello,

    I'm looking for a way to edit the default BBCode for the img tag.

    Here is what I want to do:

    Right now
    Code:
    [img]url[/img]
    is rewritten to
    Code:
    <img src="url">
    What I want to do is add something in between.

    I want to rewrite
    Code:
    [IMG]url[/IMG]
    to
    Code:
    <img src="http://example.org/url">
    Anyone who can help me?

    Regards

    tr1cky
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It would require custom development.
     
  3. tr1cky

    tr1cky Member

    That's bad. I simply want to proxy all images through a URL without using the xenforo image proxy since it exposes the origin server IP.
    All image URL's would change from http://url/image.jpg to http://imageproxy.com/url/image.jpg

    Any suggestions on how to do so? I already configured the external image proxy itself and it works fine.
     
  4. OUTL4W

    OUTL4W Active Member

    I created a custom [img] bbcode that when hovering over them causes 10px round corners...
    html replacement:
    Code:
    <img src="{text}" class="hvr-round-corners" />
    and apparently this overwrote the default bbcode

    don't see why you couldn't do the same thing by creating a new [img] custom bbcode..
    html replacement:
    Code:
    <img src="http://example.org/{text}">
    could give a try and see if it works...if not delete the bbcode...
     
  5. tr1cky

    tr1cky Member

    Right now I did this the most dirtiest way possible by editing the Base.php of the BBCode-Parser.
    Can a xenforo staff confirm that adding a custom img BBCode tag overwrites the default img bbcode tag?
    @Brogan @Jeremy
     

Share This Page