posted by Gardener: Heh, thanks. =] Will there be a parade too? I like parades. ;] I just did it because it would be a pain to add all markups from my old perl-version by hand... =P
Heh! That's the only reason why I create most of the stuff I do. I'm to lazy to do it the hard way.
Well, I've been busy finishing this hack and I'm just about ready to release it as beta (can't think of any new features to add). I'm way too tired to package it tonight (it's 3:21 AM here in Sweden), so that'll have to wait until tomorrow. I'll let you in on the changes for this version and ask some questions though.
Changes from alfa9 to beta1:
Added Post, Profile and PM tags. (See instructions for these tags below)
Created language strings for all new markups.
Added config options to set the number of graemlins, markups and fonts per row in the Instant boxes.
Wrote some information about how to work around the AutoQuote 2.0 hack conflict.
Changed the quote tag to look better (thanks WrÅith!).
Added admin scripts to insert/edit/delete entries in the Instant Markup boxes.
Confirmed that the hack works with v6.0.2.
The new tags: [post=Number] text [/post] = Creates a link to the post with the number Number. [profile=Username] text [/profile] = Creates a link to the profile of Username [PM=Username] text [/PM] = Creates a link to send a private message to Username
Some questions
Should the font and size tags be separate tags as they are now, or should they be incorporated into one, looking something like this: [font style=Arial size=4] or like this [font:arial,3]
The size tag can only use the sizes 1-7 allowed in the html font tag at the moment. Should it be extended to set the size by css to allow even bigger sizes?
Are the new tags (profile, post and PM) something that will be used?
I've included the new look of the quote tag in this version, is this a good idea?
The right and center tags could possibly be incorporated into one align-tag, what do you think about this?
1. Should the font and size tags be separate tags as they are now, or should they be incorporated into one, looking something like this: [font style=Arial size=4] or like this [font:arial,3] IMHO I think the separate tags will be easier for the user to understand.
3. Are the new tags (profile, post and PM) something that will be used? I think those tags are Cool and will come in handy.
4. I've included the new look of the quote tag in this version, is this a good idea? I like the new quote look.
5. The right and center tags could possibly be incorporated into one align-tag, what do you think about this? Again, IMHO I think the separate tags are easier for the non-tekkie user to understand.
I agree with JoshPet, very nice work! Seperating the tags will be easier for unexperienced users and it's easier for Admins to remove the tags, they don't want to have.
Sounds like I should keep the separate tags then, since easier is better.
I have another question, I think most users won't now a posts postnumber and probably will have problems finding it in the URL even if it is explained where it is. A suggestion is therefore to show the postnumber of all posts, to make it easy to know what to write in the tag. Does anyone have any ideas on how to show this? The best I've ocme up with is to put it below the time (and IP) in the post header.
Let's hope I can release this mod soon and so I can get on to other mods. It has taken a while to finish it, but then again, it is quite big. I will have to put some finishing touches to it but I'll probably release it in a couple of hours if nothing gets in the way.
Thanks for the input, I felt I've been coding on this mod for so long that I didn't have a clue if I was going in the right direction or not. =]
I feel that this hack now is mature enough to go into beta and from now there is a feature freeze. Until the final version is released I'll just fix bugs. If you have any trouble with this script, please let me know and I'll try to fix it.
Changes from 1.0beta1 to 1.0beta2
Small bug fixes for some tags.
Small fix for pages using both do_markup() and undo_markup()
Updated the script to work with UBB.threads v6.1.0
Mod Name / Version - MarkupHack 1.0beta2 Description - This is a hack that allows the admin to add/change/delete markup tags from the administration menu, as well as easily add or remove entries from the Instant Markup boxes. All Markups from UBB.threads v6.1.0 are included in this package, as well as quite a few new markups. Working under - UBB.threads 6.1.0 Any pre-requisites - PHP4 Author(s) - Gardener Credits - Dalar, WrÅith and others for help. Demo - Download zip file of screenshots Files Altered - ubbt.inc.php, admin/menu.php, ubbt_instant_ubbcode.tmpl, languages/generic.php Database Altered - Yes, new tables: w3t_Markup w3t_InstantList New Files - admin/editmarkup.php, admin/doeditmarkups.php, admin/addmarkup.php, admin/doaddmarkup.php, admin/addinstant.php, admin/doaddinstant.php, admin/editinstant.php, admin/doeditinstant.php, showpost.php Any other info - Download the attached file and unzip it. Follow the install instructions in the README file within.
I think the PM tag is cool, I have had PM links hardcoded on our "Contact Us" page for mods and admin for a while now, and people like it for convenience.
I have a question about this:
[]Changed the quote tag to look better (thanks WrÅith!)
I'm assuming you are talking about the additional section added to the stylesheets, that places the borders around the blockquote sections? I really liked that, so I put it in about 75% of our stylesheets (haven't had time to finish the rest yet), but I changed the colors of the borders and stuff depending on the stylesheet. So, will your new version override that, or create an additional box around the quote, or not affect it at all? If it changes it, can we just keep the current code for quotes so that it won't change? Thanks!
[]I'm assuming you are talking about the additional section added to the stylesheets, that places the borders around the blockquote sections? I really liked that, so I put it in about 75% of our stylesheets (haven't had time to finish the rest yet), but I changed the colors of the borders and stuff depending on the stylesheet. So, will your new version override that, or create an additional box around the quote, or not affect it at all? If it changes it, can we just keep the current code for quotes so that it won't change? Thanks!
The html for the new quotes is changed, and the quote looks a bit different than the one released by Maze. It also needs another set of extra stylesheet attributes. The existing quotes will look the same as before, but the new ones will have the new look.
If you want to keep the current code for quotes, that would probably work perfectly OK. Then you could skip step 10 of the install instructions that adds extra stylesheet code. But you would have to remove the new quote tags from the database unless the quote code from the AutoQuote is in the do/undo_markup functions.
Just found a problem with editing quote tags, if the user has another language than when writing the post, the quote tag won't parse properly. But since I believe this is a problem with vanilla threads as well, I don't think it will be a problem.
... editing quote tags, if the user has another language than when writing the post, the quote tag won't parse properly.
Hmmmm, I think making any of the markups language-specific is a problem. Another aspect is when a moderator edits another user's post, and they use different languages.
Thanks for the response! It should be fine then, because i have the AutoQuote already installed. I just really like the way it looks, and I wanted it to look good in every stylesheet, so I did them each separately.
Can I request a tag? Our users really love the marquee tag. We let them have html turned on in one forum only, and only because they want to use marquee. (Hey, us mom's need a cheap thrill sometimes. ) Personally, it gives me a headache, but who am I to deny them such simple pleasure? Anyway, I tried doing the markup and it just didn't work. I think it is because you can use several different tags with marquee, to make it crawl left, right, up, down, etc. Is there a way to allow the Markup tags to be nested to do that? Or would I have to create a Markup tag for each combination?
Quite true, but I only think it occurs on the quote tag, since it has the language dependent string "In reply to:"
I thought this would occur in a standard threads installation as well, but it is not. The language variable is written to the post so that it will show according to the user's settings. In the MarkupHack I do an eval of all strings before they are inserted into the post. Can't remember why this was needed now though, I must have had a reason for it. I will have to do some checks on this to see if I can solve it.
It sounds bad that you should need to have html turned on just for the marquee-tag. But I haven't got a clue as to how the html version of it works, and I don't personally like the use of it either. Because of this I will quite probably not include a marquee-tag in the hack. Although nothing hinders others from adding it.
From what I can find on the marquee-tag, it is the direction and behaviour attributes that you would be interested in. If you don't know how to do regular expressions you would probably have to do one start tag for each type. Don't know how a all-in-one tag would look anyway, maybe something like: [marquee:direction,alternate] Where direction can be up, down, left or right, and the optional alternate sets if the scroll should go back and forth.
Add these two (as "Perl Regexp /") and you should have a marquee tag that works as mentioned above.
when I used "beyond compare" the markup didn't work. The trouble was in the ubbt.inc.php file. I started fresh with that file (as I knew what hacks touched that file) and redid all the steps for this hack concerning the ubbt.inc.php file..... and all seems to be working fine under 6.0.3.
hmm. strange. You added the Graemlin through the admin interface on 6.0.3?
I wiped and re-installed the hack, but am still getting the same error. Everything else works fine, but doaddgraemlin.php is failing me.
I am using the auto-quote hack, but I dont believe this should be a problem. THey both worked fine together on 6.0.2.
Once I went to 6.0.3 I also upgraded the markup hack from alpha to beta, so I am dealing with new code in both places. Therefore I am not sure where the error is coming from.
Which version of PHP do you use? Which version of the MarkupHack did you upgrade from?
The hack works for me with 6.0.3, so I'm not quite sure what the problem can be.
If you could try changing this line in admin/doaddgraemlin.php I might get some insight into this problem: $html -> not_right("All required fields weren't filled.",$Cat);
I just released the second beta release of this hack and it's well on its way to go into final. I will start using this on my production site soon if no major issues are found on the test site.
This version is mainly to make it work properly with 6.1.0, had to remove the Graemlin bit (yay!) and rewrite some of the markups.
The new file is attached to the first post in this thread.
Changes from 1.0beta1 to 1.0beta2
Small bug fixes for some tags.
Small fix for pages using both do_markup() and undo_markup()
Updated the script to work with UBB.threads v6.1.0
No, this will most probably not work on 6.2.x since there has been quite a few changes to the do_markup()/undo_markup() functions as well as the templates for the markup.
I haven't tried it though, so I don't know exactly what changes are needed, with some luck the new additions only need to be merged (and some of the markusp in the db changed accordingly).
I do not have the time to fix this myself at the moment, but I will try to squeeze it in sometime.
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.