I've just finished a hack that allows admins to edit all markups from the admin page, as well as add new ones. It works quite well at my beta site and I have tried to write a complete installation guide but this is the first big hack I've done so something is probably missing. Feel free to try it out though. Any comments are much appreciated.
It is very easy to break the forums by adding markups with incorrect syntax but I haven't bothered to fix that yet. Admins should check that the new markups work anyway so I don't think it would be that big of a problem.
well I tested the hack out. It will add the markup for smilies so you can do like []/forum/images/icons/tongue.gif[/]uke: I tried three. two out of three took. However it does not add the image to the post template.
Yeah, since the :smilie: way of writing the graemlins are clashing with the short hand smilies which have a letter right after the colon it can show up wrong. But as long as you keep that in mind everything should be OK.
No, I haven't added it to the post template since I would have to put extra code in template to make that work and I don't really like that. But I will give it a shot, they really should show up there as well.
Nice work on this Gardener []/forum/images/icons/smile.gif[/] Will fill a big request by the .threads owners moving over from ubb []/forum/images/icons/smile.gif[/]
OK, so I have updated the hack once again so that all Graemlins are listed automatically on the post page. I had to add some code to the template for this, so make sure you have made a copy of ubbt_instant_ubbcode.tmpl before unpacking/uploading.
I also fixed some bugs in some of the markup tags, so the old table should be dropped if you are updating.
The ability to add Graemlins is very welcome and your hack works great.
I installed the alpha3 version
Two little glitches I found:
The sql commad adds two extra graemlins, holloween and another which are not out of the box for Ubbt6. Nothing major just letting you know.
Also the add graemlins looks to add new ones to /images/greamlins folder. Just need to add "make graemlins dir" to instructions if that is where you intend them to be added.
Nothing major!
The markup seems to work fine, have only tried adding underline and had no probs with this simple addition. I think I need some more confidence to play with the more complex markup......lol.
Thanks for the info, I'll get them fixed right away. I knew I would forget about adding the info on creating the graemlins directory when I added the code for it...
Adding complex regular expressions can be a bit tricky since you have to know how they work. But just adding new start and end tags are very easy and I'm thinking of making it even easier. But I would have to change the add form for that so I haven't really decided if I should do it yet.
This has been validated so the HTML is correct according to W3C.
The problem goes away when the DOCTYPE is removed, so for some reason it seems that Mozilla thinks a table must have the height of the text when using that DOCTYPE. Really strange.
Actually it does (at least for the transitional document used in the doctype), it doesn't on TR though. But that one isn't supposed to be there anyways, but I added it to see if it changed anything -- which it didn't.
Thanks for the info, I've got it working now. I thought I was going mad...
I'm wondering if anyone is interested in getting the markups automatically added to the Instant Markup box on the post page. To do this I would probably have to add 6 new fields, 4 if the URL-prompt is simplified.
It is a bit of work to get this to work, so I'm wondering if I should bother to this?
The graemlin icons are already put in the instant graemlin box, but since this hack mainly is hack for the Markup/UBBCode I was wondering if those should be added to the Instant box as well.
I think adding the markup code to the Instant box would be a good thing. I belive that anything to make a board easier for users has to be a good thing, so a user clicking on one button to achieve a result would be the preffered option.
Maybe the ability to add an image file as is done here with Alan's new templates would also be a nice addition.
As a wish list type scenario would it be possible to expand this hack to manage post icons as well and font colors displayed in the Font color instant box?
lol...........a complete admin management system for all ubbt images, including header the links, post, reply etc etc..........sorry got carried away...........lol
I've been thinking a bit more about this and it will have to be at leaste five new fields for this. If an image is to be added another field has to be added as well. But I could do it though.
But if font colors should be updateable as well I think it would be best if the information for the instant markup boxes are in a separate table. It doesn't have to be, but I don't really like the idea to have rows in the Markup table that are not Markups...
I haven't looked at how post icons work since I don't use them myself, but I guess it would be quite easy to add new ones so I'll look into that.
Changing images is just a matter of uploading them into the images directory, is a admin script for that really needed? It wouldn't be that hard to do, but it seems a bit overkill to me. =]
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.