XF 2.1 How do I replicate this code block

No. I mean what add-on is that page using for adding the code? Your example is different because you don't have the copy icon in the top right hand corner.
 
Ahem... I searched the Resources section for you :cool:
 
Possibly made by the site owners. Can't really tell but it doesn't look like Code 2.1.2 addon by @CMTV . We use his on our site and it works really well FYI.
 
Thanks @Steve F. One of my concerns on some of these plugins is that if I later remove them, does it mess up all the code that was previously entered using Code 2.1.2?
 
That's a understandable concern.

This is in the add-on overview
Unistallation

WARNING: after uninstalling all code blocks with custom titles/highlighting/class will not be rendered as code blocks!
  1. Uninstall the addon from ACP
  2. Go to forum root folder and remove js/CMTV/Code folder.

So some risk is involved I suppose though I will mention he has made this add-on open source so anyone could acquire the code to update it if need be.
 
Thanks for pointing that out for me. I was justified in considering this then. What to do, what to do...

Check the alternatives I posted :)

Seems the last two add to the current code block so if you removed it, the block would remain. But double check with the authors. The one that says "Copy to clipboard" you could style as an icon.
 
One of the reasons for me wanting to mimic the method used on the link I gave is actually not about functionality. When I put my site link through Googles Page Insights, it shows that when I have a code block on my page, it is classed as not mobile friendly. But, the website I linked to is mobile friendly, despite the code block. So, I figure something is going on there!
 
I haven't because of fear of it messing something up. Is it easy to uninstall these things cleanly, or do they leave stuff behind?

I wish I could add VBA to the code block provided by Xenforo, but I can't find anything about adding your own program or pruning the list that is given by default.
 
In an ideal world I would set up another board, but I am nearly done with customisations and don't want to go to that effort.

I might just have to take the risk on one of the add-ons.
 
You need a dev board, not just for customization, but what if you want to test a query? Or test... anything? It takes 5 minutes to install XF. Just create a folder and install.
 
Well your original question didn't mention your intent. That could have saved a couple hours. :ROFLMAO: You can follow what XF is/isn't doing about it here:
 
Back
Top Bottom