Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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.
Attachments
46865-markuphack-1.0alfa.zip (0 Bytes, 23 downloads)

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
thank you []/forum/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I fixed a few bugs and have also added a script to upload new Graemlins as well as the possibility to view/delete all old ones.

Don't know if anyone is interested in this hack, but I'll post it anyway.
Attachments
46948-markuphack-1.0alfa2.zip (0 Bytes, 21 downloads)

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
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.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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.

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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[/]


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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.
Attachments
46960-markuphack-1.0alfa3.zip (0 Bytes, 29 downloads)

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I'm happy to be able to give something back to the threads community since there are so many other good hacks out there.

Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
A very big thank you for this one Gardener.

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.




cheers and thanx again for this.

Last edited by dRiver; 05/01/2002 1:57 AM.
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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.

Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
The [line:color] tag that is included in the markup hack is not showing correctly on Mozilla 1.0RC1, for some reason it has the height of a text row.

I am using the following HTML to create a horizontal rule:
code:
<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td bgcolor="green" height="2"><img src="http://threads.theyard.org/images/hr.gif" width="2" height="2" border="0" alt="" /></td></tr></table>



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.

Anyone know how I can fix this?

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
height for the td probably doesn't validate, at least in xhtml 1.0

There is a fix to get mozilla to work correctly and keep the td looking correct, we discuss it here:

https://ubbdev.com/threads/php/...ew=collapsed&sb=5&o=&fpart=1

The actual fix can be found here: http://www.alistapart.com/stories/betterliving/ - unles I am misunderstanding the question


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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...

c0bra #215678 05/04/2002 4:39 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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?

c0bra #215679 05/04/2002 11:39 PM
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Well I dunno about the rest of those out here, but for me adding icon's and the online calendar are probably the two most important mods for me.


Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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.

c0bra #215681 05/05/2002 9:34 AM
Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
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

thanks for sharing your work.

lanet #215682 05/05/2002 10:18 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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. =]

c0bra #215683 05/05/2002 10:36 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I've been doing some changes to the script over the last few days. A list of the changes:

  • Updated to work with BR2 and some bug fixes.
  • The script tries to create the Graemlin dir if it doesn't exist, and prints an error if it can't.
  • Updated some Markup regexps to work better.
  • More info in the README, including descriptions of all Markups.
  • Priority setting of Markups so that the admin can decide the order they should be parsed.
  • Markup list can be shown by type and sort order is selectable.


I think that's it. I'll start looking at adding items to the instant boxes later.
Attachments
47292-markuphack-1.0alfa4.zip (0 Bytes, 241 downloads)

c0bra #215684 05/05/2002 11:03 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Excellent - thank you.

Ian


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)