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

CTA Float BB Code 1.0.0

It's a wrap!

  1. Brogan

    Brogan XenForo Moderator Staff Member

    Neutral Singh likes this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    1/10 for effort on the witty tag line...
     
    Neutral Singh and Amaury like this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    :D

    Could. Not. Be. Bothered.
     
    Amaury likes this.
  4. Bionic Rooster

    Bionic Rooster Well-Known Member

    @Brogan Thanks for the code. :)
    What am I doing wrong? As per examples
    Code:
    [FLOAT_LEFT][BOX=50]This content is floated left.
    Adjacent text will wrap
    around it.[/BOX][/FLOAT_LEFT]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur erat nibh, varius vitae consequat ut, pulvinar varius ante. Vestibulum auctor mattis elit, a sodales nisi. Pellentesque quis enim quam.
    [FLOAT_RIGHT][BOX=50]This content is floated right.
    Adjacent text will wrap
    around it.[/BOX][/FLOAT_RIGHT]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur erat nibh, varius vitae consequat ut, pulvinar varius ante. Vestibulum auctor mattis elit, a sodales nisi. Pellentesque quis enim quam.
    Output
    Test float.png
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Remove the [box] tags from the example usage fields.
    That's an additional bb code I use on my site.

    I have just uploaded new versions.

    Also note that you will need to define the CSS classes for each float: .ctaBbcodeFloatLeft and .ctaBbcodeFloatRight.

    Just add to EXTRA.css and style them so suit.

    This is what I use:
    Code:
    .ctaBbcodeFloatLeft
    {
        float: left;
        margin-right: 8px;
        clear: both;
    }
    
    .ctaBbcodeFloatRight
    {
        float: right;
        margin-left: 8px;
        clear: both;
    }
     
  6. Bionic Rooster

    Bionic Rooster Well-Known Member

    @Brogan That works much better, thanks bud.
    Oh and I just noticed the buttons aren't showing.
    Create Thread.png
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Change the path to your own style in the Advanced Options tab.
     
  8. Bionic Rooster

    Bionic Rooster Well-Known Member

    @Brogan Thanks bud, she's a FLOAT now (y)
     
  9. KVMG

    KVMG Member

    Implemented this and it works well when the post is viewed in the forum.

    However, the text does not wrap around the image in the email the user gets with the content of the post in the email.

    Am I missing something?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    The CSS required to float the content is unlikely to be compiled with the email.
     
  11. TheSalt

    TheSalt Active Member

    Hello @Brogan,

    I have been struggling with the idea of using add-on's lately. When I first started my XF forum back if February I was like a kid in a candy store when I saw all the great add-ons here. Now I know some of the problems that come with using add-on's. My biggest concern has been support going on into the future with the add-ons and there is no insurance there and I completely understand why.

    I want to start making an effort to remove a few add-ons that will leave content messed up before it becomes a big problem. As of late I have been looking for a better thread editor and I ended up using TinyMCE and BbCodes & Buttons Manager. It turns out that there is an issue with Tiny and Tappatalk that I'm not sure will get resolved. I disabled TinyMCE and it leaves the posts made with TinyMCE with some bbcode exposed. I haven't made a whole bunch of posts with TinyMCE but it will take some time to correct them. This leaves me to my concern. I would like to add things like the float, justify, tables, and anchore bbcode to my forum but I'm afraid of using something that can possibly cause a problem down the road when XF gets ungraded and add-ons are no longer supported.

    Do you feel that CTA Float BB Code is a safe recourse that will function into the future more so then using an add-on? As always, I dont have an understanding of coding and everything require a lot of research on my end which is fine I'm just not sure if I can actually avoid the above issue into the future and add bbcodes. What are you thoughts?

    Many Thanks,
    Nick
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    If you start using float bb code tags and then remove the custom bb code in the future, the plain tags will show in the post content.

    That applies to any custom bb code.
     
    TheSalt likes this.
  13. TheSalt

    TheSalt Active Member

    Do you feel that this resource will continue to work on XF into the future without the need of any of support? I don't fully understand the use of a resource over an add-on.
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    If you're concerned about installing add-ons, you can create this bb code yourself.
    Just copy how it is done in the xml.
     
    TheSalt likes this.
  15. Digital Doctor

    Digital Doctor Well-Known Member

  16. TheSalt

    TheSalt Active Member

    Thank you, I decided against using extra bbcodes right now. I noticed they are not supported in tapatalk so the problem still remains on tapatalk. I personally prefer the forum on the mobile browser but I know lots of members use tapatalk for related forums so I had to choose tapatalk.

    Thank you, that is a great little add-on. It works well for replacing code but not for completely removing bbcode. I did use it for searching out the code I wanted to delete and then I manually edited each post. It was only 17 in total so not so bad. Thank you again!
     
  17. Brogan

    Brogan XenForo Moderator Staff Member

    That add-on can be used for any post content, including BB code.
     
  18. TheSalt

    TheSalt Active Member

    Yes it is very handy! I was just having a problem when searching and removing "[float]" it leaves "[]" behind. Then when I searched and deleted "[]" it messed up some threads as "[" and "]" are used for other bbcode. It just wasn't meant to do what I needed. I can see how useful it would be for replacing/adjusting bbcode. I highly recommend it.:)
     
  19. Jake B.

    Jake B. Well-Known Member

    Now if only it would format the float in the editor:whistle:
     
  20. Thanks for the add-on. But is the sprite location correct on this? I don't see any icons.
    Screen Shot 2014-11-15 at Sat, Nov 15, 9.12 PM.png
    Screen Shot 2014-11-15 at Sat, Nov 15, 9.11 PM.png
     

Share This Page