Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 3 1 2 3
#217917 06/05/2002 11:10 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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.
Attachments
48839-markuphack-1_0beta2.zip (0 Bytes, 261 downloads)

Last edited by Gardener; 11/15/2002 1:51 AM.
Sponsored Links
Joined: Apr 2002
Posts: 206
Member
Member
Offline
Joined: Apr 2002
Posts: 206
Cool!

c0bra #217919 06/06/2002 12:06 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Damn, I forgot to update one of the files, so here is a new file where the update is actually included. =]
Attachments
48856-markuphack-1.0alfa6.zip (0 Bytes, 57 downloads)

c0bra #217920 06/09/2002 11:11 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Do you happen to have a demo or screen shots of this one? A good bit involved, I'd like to see a little bit before getting knee-deep in it


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
OK, here is a zip with shots of all admin pages.

Didn't make a screenshot of the instant graemlin box since it looks exactly the same if no new graemlins are added. =]
Attachments
49365-markuphack-screenshots.zip (0 Bytes, 38 downloads)

Sponsored Links
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Wow! Sreenshots are impressive! shocked

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Thanks!

c0bra #217924 06/10/2002 12:08 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
oooo yes, nice work. Very requested in the ubb forums


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Wow! This looks very nice. Something very similar to what I'm wanting to do for 6.1. Would be great to get some feedback on this as everyone installs it because I don't think I'll be able to do a better job than what this looks like.


UBB.threads Developer
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Sounds great.

Feedback would be very welcome from anyone, both on the current functions and which of the things in the todo-list that is actually interesting for people.

Sponsored Links
Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
One question: how are the settings saved?
Right into the 3-4 standard THREADS php and tmp files?

If that was the case and I change things in an offline version of the file (hack or something) and then ftp upload it, it would overwrite the changes made online and confuse everything?


Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
Help?????????

Can figure out how to enter this markup string into Gardeners absolutly marvelous hack?

$Body =preg_replace("/\[flash=(.*?),(.*?)\](.*?)\[\/flash\]/is","<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width=\\1 height=\\2><param name=movie value=\\3><param name=play value=true><param name=loop value=true><param name=quality value=high><embed src=\\3 width=\\1 height=\\2 play=true loop=true quality=high></embed></object>",$Body);

I have tried with little success. It is the markup I had in 551 to add flash to sigs/posts. I have had a lot of pms asking for a v6 update but there just doesnt seem to be enough hours in a day at the moment

cheers

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
First of all I had some reason to make all regexps ungreedy, so you probably only need to have (.*) instead of (.*?) in the pattern.

But the real problem I would say is that your HTML part is 281 characters long. Both the Markup and HTML parts are limited to 255 characters, because I wanted to have the fields as VARCHAR in the database. I suppose I could change to TINYTEXT or something though if more people want to have long strings. I'm not sure how this affects speed and portability though, anyone has any ideas?

If you can trim the HTML part down 31 characters I guess that it would work. Don't know if that is possible though.

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Hmm. I haven't really looked at the hack yet, but I do have a question for you. Are the regex patterns pulled from the database each time do/undo markup is called? The reason I ask is because currently the Signatures are parsed for markup when the post is displayed, which on a typical showflat screen would be an extra 10 queries if everyone has a signature.


UBB.threads Developer
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Yes, that is how it works at the moment, which obviously isn't good on showflat. It will be more as well as each post which has UBBCode turned on will also call the do_markup once each.

I have been trying to think of a way to only do the query once but haven't decided on anything yet so any input would be welcome.

One way could be to put the array as a global variable in the html class and only read from the db if the array is empty. Would that be sufficient?

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
The post itself isn't too bad because these are parsed at the time the post is made in addpost.php. For some reason I had to do the signature at the time the post is displayed, can't remember why. So, it's only the sigs that will make the extra db calls.

Yeah, if you could grab all the patterns at the beginning of showflat.php and stuff them into an array then make the array global to do_markup there should only be 1 extra db call needed no matter how many times do_markup in the individual processing of that script.


UBB.threads Developer
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
OK, I got it confused with addpost where do_markup is called twice.

I'll make the changes necessary and repost as soon as it is finished.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
The new markups are in a table in the database, so you can change any files after adding new markups without doing any harm. There are changes to the files ubbt.inc.php and ubbt_instant_ubbcode.tmpl, which you of course have to keep in place in order for it to work, just as any hack. =]

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
New version of the script!

Changes:
  • Only uses one query to read markups from database on all pages.
  • Added a file with descriptions of the new markups to add to the FAQ.

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 Graemlins. All Markups and Graemlins from UBB.threads v6.0 are included in this package, as well as some new markups.

Instructions:
Just download the attached file and unzip it into your UBB.threads directory. Beware that the template file ubbt_instant_ubbcode.tmpl will be overwritten! Then follow the install instructions in the markuphack-README.txt file.

Screenshots:
Download zip file
Attachments
49688-markuphack-1.0alfa7.zip (0 Bytes, 29 downloads)

Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
If you separarted all virtual content (admin-organized code) and the hack insert (static pages) that sounds like a great idea. I am very impressed about the concept and will download and test the Components now. Thank you very much.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Now I know in your old version the files were not being added to the posting page. Is there fixed with the addition of 6.0 and the new update or will one have to go editing through multiple files to get a code added?

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
What do you mean? The Instant Graemlin list is updated automatically on the posting page, but the Instant UBBCode is a bit trickier, the same with the FAQ. I still haven't made up my mind about how to do that yet but I'll try to fix it soon.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Another new version of the script!

Changes:
  • Updated with changes from UBB.threads 6.0.1
  • Added [ quote = text ] so that the AutoQuote-hack will work. Note that the html will not be exactly the same as in that hack, this version won't use the new language string.
  • Did a small change to the color markup to remove the quotation marks when editing.

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 Graemlins. All Markups and Graemlins from UBB.threads v6.0.1 are included in this package, as well as some new markups.

Instructions:
Just download the attached file and unzip it into your UBB.threads directory. Beware that the template file ubbt_instant_ubbcode.tmpl will be overwritten! Then follow the install instructions in the markuphack-README.txt file.

Screenshots:
Download zip file
Attachments
50419-markuphack-1.0alfa8.zip (0 Bytes, 20 downloads)

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Thanks! This really is an impressive piece of work. I hope I can eventualy get my site updated so I can start using this... lol

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I like it too, nice work on it


- Allen wavey
- What Drives You?
Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Hrmm, installed the hack, but got an error when deleting an existing graemlin, see my attached gif file for an image of the error. The thing is, it did delete the ubbcode for it just fine, I tested a post and it was just plain text, but just gave me that error.
Attachments
50831-error.gif (0 Bytes, 52 downloads)

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
That is because the original Graemlin files are located directly under the images directory while the new ones are placed in the new graemlin directory.

I did it this way so that old posts with graemlins in them wouldn't suddenly stop working, which would happen if the old graemlins are moved into the graemlin dir. Also, the update would be a bit more inconvenient as you would have to move the old images.

That said, it shouldn't show an unlink error when the image isn't found of course. I thought that I had fixed this, since I've even mentioned it in the README under notes, but obviously I forgot about it. =P

It's been fixed and will be in the next version, but here is a fix which you can add yourself.

Edit the file admin/dodeletegraemlin.php
Find the following line (at line 92):
code:
unlink("{$config['imagepath']}/graemlins/{$imagefile}");


And exchange it with the following code:
code:
if (file_exists($imgfilepath)) {
unlink($imgfilepath);
} else {
$printinfo .= "<b>No image file found to delete for [{$Graemlin}]!</b><br>\n";
}


The find the following line (at 113):
code:
echo "<br />You will be returned to the main page shortly.";


And add the following right before:
code:
echo $printinfo;



Hope that helps. And thanks for the bug report!

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Thanks!

While we're pointing things out.. your hack is working wonderfully, but it has since caused a conflict with the auto quote hack by WrÅith. Its obviously because of the new string function changes. So, there are only two things I need to do to get it working, but not sure how exactally. This is the part:

code:
1. Open ubbt.inc.php

2a. Locate the following line:

// -------------
// Quote markup
$Body = str_replace("[{$ubbt_lang['TEXT_QUOTE']}]","</font><blockquote><font class="small">{$ubbt_lang['IN_REPLY']}:</font><hr /><br />",$Body);
$Body = str_replace("[/{$ubbt_lang['TEXT_QUOTE']}]","<br /><br /><hr /></blockquote>",$Body);

2b. Replace that with:

// -------------
// Quote markup
$Body = str_replace("[{$ubbt_lang['TEXT_QUOTE']}]","</font><blockquote><font class="small">{$ubbt_lang['IN_REPLY']}:</font><hr /><br />",$Body);
$Body = preg_replace("/\[{$ubbt_lang['TEXT_QUOTE']}(\s*)=(\s*)(.*?)\]/i", "<blockquote><font class="small">{$ubbt_lang['USER_QUOTE']} \\3:</font><hr>", $Body);
$Body = str_replace("[/{$ubbt_lang['TEXT_QUOTE']}]","<hr /></blockquote>",$Body);

3a. Locate the following line:

// -------------
// Quote markup
$Body = str_replace("</font><blockquote><font class="small">{$ubbt_lang['IN_REPLY']}:</font><hr /><br />","[{$ubbt_lang['TEXT_QUOTE']}]",$Body);
$Body = str_replace("<br /><br /><hr /></blockquote>","[/{$ubbt_lang['TEXT_QUOTE']}]",$Body);

3b. Replace that with:

// -------------
// Quote markup
$Body = str_replace("</font><blockquote><font class="small">{$ubbt_lang['IN_REPLY']}:</font><hr /><br />","[{$ubbt_lang['TEXT_QUOTE']}]",$Body);
$Body = preg_replace("/<blockquote><font class="small">{$ubbt_lang['USER_QUOTE']}(\s*)(.*?):<\/font><hr>/i", "[{$ubbt_lang['TEXT_QUOTE']}=\\2]", $Body);
$Body = str_replace("<hr /></blockquote>","[/{$ubbt_lang['TEXT_QUOTE']}]",$Body);



Now, can this be added into the ubbt.inc file like normal, or will the string have to be added with your system? I was about to go adding it myself but was confused by some of the options and formatting, and I'm no code monkey so I didn't do it

Maybe this has been brought up already? I dunno, but if you can help that would be great!

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
WrÅith who wrote the AutoQuote hack has posted a description on how to add those lines when my Markuphack is installed in this thread which should work just fine.

The new version of my MarkupHack, found in this thread already includes the conflicting lines so you don't have to bother with part 7 of the instructions for AutoQuote (where the conflicts are). Although the result in the actual posts won't look exactly the same since the markup in MarkupHack doesn't use the new language string in AutoQuote. But that shouldn't matter at all unless you already have posts using the markup from AutoQuote.

Hope this helps.

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Thanks, I don't know why I didn't download that one in the first place, argh! I'll do that tomorrow and let you know how it turns out.

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Worked great, thanks! I'll edit my one post so I can fix the post, oops

[EDIT]Hrmm, nevermind that, I can't, the edit time has expired [/EDIT]

Last edited by msula; 06/22/2002 7:25 AM.
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
You're welcome!

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Thanks for this hack! It works great on 6.0.1

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
You are welcome! And it's good to know that it works to install on 6.0.1 for other people.

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Any plans on adding a Post Icon addition/change option? I figured this out by editing the code by hand. It's pretty simple and may not really be worth the coding time. I'll write up a text on it when I get a chance....

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Just installed this today on 6.0.1 and it does work just great. My users loved all the new graemlins I added instantly.

Would love that same ease to add post icons!

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Since I don't use the posting icons myself it isn't at the top of the priority list but I do have plans on adding it. Or actually it would probably be a stand alone script since they don't really need to be in the database.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
A great source for graemlins:
http://www.web-kun.de/Forum-Smileys/bunt.htm

There are several categories to click along the left side too. Simply right-click and download, then add with this hack.

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
I just posted a text about adding the Post Icons to UBBT 6.0.1 since I didn't see it up here yet. It is only one template to edit, very easy! I think I got all the details covered.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Great resource JoshPet, thanks for sharing the URL!

More smilies can be found here: mysmilies.com

Joined: Jul 2002
Posts: 2
Lurker
Lurker
Offline
Joined: Jul 2002
Posts: 2
Hello............I have downloaded the files for the smilies. I am not a master hacker though. Can someone kinda give me some help as far as what and where to put these files? I'm not a total idiot, but I'm no rocket scientist either. I appreciate all help! Thanks!

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Do you only want the possibility to add/remove graemlins?

If so, there is no easy way to separate those files, since they make use of almost everything of the markup bit. So my suggestion is that you follow the instructions included to install everything. Then, if you really don't want to be able to change or add new markups, just remove those options from the admin menu.

Joined: May 2001
Posts: 33
Rio Offline
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 33
Anyone knows if this hack works with 6.02?

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I haven't upgraded to 6.0.2 myself yet so I haven't been able to check if it works, but by looking at the change list I can't see anything that should clash with this hack. Can't promise anything though, so it would be good to hear from someone who has tried.

Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
We've been running this on 6.0.2 with no problems.


[:"red"]Lisa[/]
Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Yep runs on my 6.0.2 just fine too

Joined: May 2001
Posts: 33
Rio Offline
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 33
Thank you guys....

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
How does this seem to be working for everyone? Does it seem easy enough for the general population to use? I'm thinking about putting this in for 6.1 but want to make sure it's simple enough for everyday admins to use properly.

Last edited by Scream; 07/16/2002 10:45 AM.

UBB.threads Developer
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
Adding smilies is way too easy with this -- if the users knew how easy I'd be bombarded with requests for new smilies. I was also able to easily add markup for underlining and for centering. Being able to add markup for basic html stuff was a major plus because that allowed us to turn html off on all forums without having anyone complain, since we can add markup for anything they wanted to do.


[:"red"]Lisa[/]
Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
This is a good hack, but I would suggest being able to re-arange the order of graemlins easilly would be a needed addition. Perhaps add this feature to the show graemlins page where it seems most useful. An up and down arrow button to move the selected item mayhaps? I've had issues with reordering them due to server caching the deleted item for several minutes and reinserting it back where it was when I added it. It should of been moved to the end but was put back where it was. Rather annoying but minor overall...

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
That is a nice idea, I'll get that added in the next release.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Working wonderfully.....
My users love the extra Graemlins!!!

Excellent Idea to include in next release.

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
I think when I added these two gramelins, my board usage increased by about 300% You think I'm joking too.. lol

[]http://www.michiganjeepers.com/forums/images/graemlins/finger.gif[/][]http://www.michiganjeepers.com/forums/images/graemlins/beer.gif[/]

But really, very easy to use, and it helps makes forums much more individual when users can add their own theme of smilies to their community.

Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
My 2 cents.

I would rather have seen this particular hack in two pieces, a graemlins hack and a markup hack.

As all I wanted and need is the graemlins part. As far as that part goes the hack is perfect, easy to use and works like a champ.

As for the markup part, dunno. wasn't that adventurous.


Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Ok. I've only added a few hacks in the past. What I normally do is add it but not exactly bit for bit. The reason being is I need to be completely comfortable with how the code works in order to program around it/support it. Since everyone is ok with the basics of how it works I'll try not to change to much. Not exactly sure if this will be in 6.1 yet but I'm looking at it anyways.


UBB.threads Developer
Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
Food for thought, if your gonna go this far, ya might want to just add in menu options and a page to add/edit the post icons too so people don't have to edit the template by hand. You could use a similar image upload page but make it ask for two images to allow for a yellow and orange image. Or people can just upload the same image twice if they don't have two versions to use. This seems to be the logical place/time to add such a hack into the original release since much of the way it would be done could overlap from what I can tell.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Actually a page for uploading new post icons would be a complete standalone script. The reason for this is that the Graemlin script is just a script to make it easier to add a graemlin markup and makes heavy use of the markup database and such. While the post icons would only need an image upload and some way to name them, which would probably be saved in the name of the file so that it wouldn't need a database or something just for one bit of information.

I have been thinking of adding this to the markuphack but I haven't really bothered since I don't use the post icons on my own forums. It wouldn't be that hard to do though, but it would be better off as a complete standalone script.

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
I just completed the option for uploading and removing post icons. So this part, at least, will be in for 6.1


UBB.threads Developer
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Actually, I think I better remove the portion that allows you to remove post icons. This could be a bad thing in that it would make it very easy to end up with alot of broken images on the main display. Best to keep this something they have to consciouscly do by ftp'ing into the server and removing the icons.


UBB.threads Developer
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Why not update the posts that use the post icon to be deleted and set it to book.gif instead? Might take a while on big boards of course.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
This hack looks kewl.

There's one potential concern.

In UBB.classic, it was necessary to loop over the regex replacement operations to ensure that nested tags were translated properly. The /g (replace-all)modifier doesn't deal adequately with nesting.

Some (maybe most) tags aren't nestable, and this wouldn't be a factor in those cases. But some tags, such as a UBB Code font extension I added, required it.

The UBB.threads code doesn't appear to loop, although I didn't study it all that closely. Could this be a problem?

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
What do you mean by looping? And in what way doesn't the nesting of tags work?

Many of the start and closing tags are exchanged separately, which might cause some problems if they aren't closed properly when writing the post. But on the other hand it makes it possible to nest them, so that text can be both centered and bold. Some of the tags have the start and stop tags connected together, in which case it isn't possible to have any other tags inside them. This is especially true for the url-tags and such, which should have anything else inside.

But I haven't changed the way the tags are handled, except for some minor tweakings here and there.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
By looping, I mean doing something like this:

do {
$count = 0;
if (preg_replace($pattern1, $repl1, $subject) != $subject) ++$count;
if (preg_replace($pattern2, $repl2, $subject) != $subject) ++$count;
if (preg_replace($pattern3, $repl3, $subject) != $subject) ++$count;
} while ($count > 0);

(In Perl, this can be done more concisely. I'm not sure if the above is the best way to do it in PHP.)

I found that approach necessary for certain nestable tags.

In later versions of UBB.classic, that approach was added for all of the markup translation.

I think that UBB.classic, unlike UBB.threads, always translates the opening and closing tags in a single regex replacement. Perhaps the advantage of the former approach is that it makes it harder for a user to mess up a post by using unmatched tags. There might also be security benefits, since by regex-ing the text between the opening and closing tags, you can make sure that nothing "sneaky" is being done.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Ah, OK, now I see. Only one of the each replacement is done for each loop. But isn't the same thing achieved by non-greedy regexps? That is one of the things I have changed in the markups, they are always non-greedy, which I think was because of something like this. Can't remember though... =]

But if Scream is going to change the markup system I'd say it is a good idea to look them over and make sure they work as good as possible and are as safe as possible. Changing [ b ] tags (etc) so that they are done with a single regexp is a good thing to start with, because if the user forgets a closing tag, the rest of the page will be bold. Not so good at all. =]

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Good idea.


UBB.threads Developer
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
And as a followup. I'll probably be adding the graemlin portion and then work on the markup portion for another version.


UBB.threads Developer
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I'm not sure that there's a problem with the way that threads does the markups now. I just thought I'd bring this up as long as this area is being worked on.

You might confer with Charles or Dave to see why UBB.classic does it that way.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
I don't think that the greedy/non-greedy feature is powerful enough to handle nested tags when you're trying to match the entire expression, including the opening and closing tags. When I was implementing my UBBCode font tag, I experimented with that, and had to resort to using a loop. I think the problem was that the inner tags were getting swallowed. But maybe I didn't try hard enough. Or maybe the more advanced regex features (look-ahead/look-behind assertions) would help.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I do think it is possible, although my knowledge isn't enough to create it I guess. I might try to do some reading and see if I can come up with anything.

But how much of a problem is there, are people having trouble with not being able to use markups? Are layout problems occurring that often? I've seen it once or twice maybe and fixed it in the post and I've got quite a busy board.

Joined: May 2001
Posts: 32
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 32
I just tried installing this hack and got an error message:

ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

Digging through FAQ files, I found the following fix:

On a UNIX system without sockets support you must always specify the hostname explicitly when connecting to the server. Try using this command to check the connection to the server:

shell> mysqladmin -h `hostname` version

If it works, then add "-h `hostname`" to the mysql command line.

It worked for me.

FC

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Changes:
  • Clarified the INSTALL instructions a bit.
  • Added [font:style], [size:X], [indent] and [right] markups.
  • It is now possible to change the order of the Graemlins.
  • Added a simpler form for adding new markups.

Mod Name / Version - MarkupHack 1.0alfa9
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 Graemlins. All Markups and Graemlins from UBB.threads v6.0 are included in this package, as well as some new markups.
Working under - UBB.threads 6.0.1, 6.0.2
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
Database Altered - Yes, new table: w3t_Markup
New Files - admin/editmarkup.php, admin/doeditmarkups.php, admin/addmarkup.php, admin/doaddmarkup.php, admin/addgraemlin.php, admin/doaddgraemlin.php, admin/showgraemlins.php, admin/dodeletegraemlins.php
Any other info - Just download the attached file and unzip it into your UBB.threads directory. Beware that the template file ubbt_instant_ubbcode.tmpl will be overwritten! Then follow the install instructions in the markuphack-README.txt file.
Attachments
52917-markuphack-1.0alfa9.zip (0 Bytes, 23 downloads)

c0bra #217988 07/20/2002 10:56 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Installs easily and you have finally solved the one draw back that I hated with your initial version. You now have the graemlins and code automatically update in the instant ubbcode. Cool!!

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
The Graemlins have updated in the instant graemlins box for quite a few versions. But new markups are still not shown in the Markup box, since that would need extra information to be added. But that is planned for the next release along with the FAQ information and then I will probably have a feature freeze for 1.0 and go into beta. =]

c0bra #217990 07/24/2002 12:29 AM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Hey Gardener:

Great hack! I've got it running on my testboard ready to move into production, but I have one question. Where would I change how the graemlins get written into the ubbt_instant_ubbcode.tmpl file? I'd like to increase the number of graemlins in the array from 5 per row to 6 in order to conserve space. I tried looking in the ubbt.inc.php file and I can't see where any variable is defined there.

Can you help me out with that?

SDS #217991 07/24/2002 2:46 AM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
One other thing I've noticed, the Reply w/Quote code isn't correctly translating HTML back to markup. My original hack worked fine, but the code used in this hack isn't replacing the HTML with the correct markup tags. It seems that some of the tags are conflicting with each other.

You can see what I'm talking about here and here.

Last edited by WrÅith; 07/24/2002 2:50 AM.
SDS #217992 07/24/2002 11:12 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
To have rows of six graemlins, you will need to change this row in ubbt_instant_ubbcode.tmpl:
code:
$instant_graemlins_here .= (($s + 1) % 5) ? "" : "<br />"; //UBBTREMARK



The number 5 is the number of graemlins per row, just change it into 6. I'll have a config option for this in the next version, I meant for it to be that way but I forgot about it.

Regarding the conflict with the AutoQuote hack I know about that. I thought I had mentioned it in the NOTES in the README file, but I hadn't, I had just hinted about it in the CHANGES file. Not good at all.

If you install this hack before the AutoQuote-hack, or haven't written any posts with the AutoQuote button all would be fine. But since I didn't want my hack to have to rely on the AutoQuote-hack I did some small changes to the html-code.

To fix this, I will create an extra insert statement to be installed for those who has the AutoQuote hack installed. I'll post it in this thread when it is finished, and I'll include it in the instructions for the next release.

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Thanks Gardener. I'll make that change.

As for the AutoQuote function, I think you're right. Quotes made prior to to the implementation of the hack don't seem to be translated correctly, but quoted posts made after the implementation of the MarkUp hack seem to be mostly o.k. There are a few that haven't come over correctly, but I think that will get worked out eventually.

Having the insert statement that will fix the old posts will really help.

SDS #217994 07/24/2002 7:25 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
The thing is that the AutoQuote adds a test string to the language files which it then uses when it creates the html- Since I didn't want to make the MarkupHack demand that language string I made it look like the original quote. And as I don't see the need for that new language string I don't want to add it to the MarkupHack as well.

But for those who has had posts done with only the AutoQuote-hack installed, I'll try to provide the code needed for it to make the transition easier.

Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
I was inspired today by a post I saw somewhere else on the board, and I rewrote the HTML for the quote boxes. I've attached a file with a screenshot and the revised code if anyone is interested.

Next up on my list is an addition to the markups for glowing text and marquee.

I just gotta say that this is by far my most favorite hack of any I've seen. The way that this makes it easy to modify the markup and/or add new graemlins has got to be the coolest thing ever.

Great job Gardener! You deserve a medal!
Attachments
53126-Quote.zip (0 Bytes, 20 downloads)

SDS #217996 07/25/2002 10:13 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Glowing text and Marquee? Those will never get it into the main distro of the hack for sure. =] I'm not much for colorful and moving things on webpages.

The Quote changes looks good, I think I'll add them to my own site. Don't know if it should be included in the hack though, since people might want the original look. What do you others think? Maybe changes like this could be included in an extra script, that changes the markups in the database, that can be run by those who wants it?

[]Great job Gardener! You deserve a medal!


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

c0bra #217997 07/25/2002 10:47 AM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
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.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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
  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]
  2. 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?
  3. Are the new tags (profile, post and PM) something that will be used?
  4. I've included the new look of the quote tag in this version, is this a good idea?
  5. The right and center tags could possibly be incorporated into one align-tag, what do you think about this?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Wow!
Great Work!!!


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.

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
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.

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

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

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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.
Attachments
53650-markuphack-1_0beta2.zip (0 Bytes, 32 downloads)

Last edited by Gardener; 11/14/2002 1:46 AM.
Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
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!


[:"red"]Lisa[/]
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
[]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.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
... 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.

Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
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?


[:"red"]Lisa[/]
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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.

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

Markup: \[marquee(:(up|down|left|right)(,(alternate))?)?\]
HTML: <marquee direction="\\2" behavior="\\4">

Markup: \[\/marquee\]
HTML: </marquee>



c0bra #218010 08/06/2002 4:29 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
There is a bug in the end markup for the [ big ] tag. To fix this, just change the tag with ID 71 to have the following markup:
code:

[/{$ubbt_lang['TAG_BIG']}]


c0bra #218011 08/16/2002 4:48 PM
Joined: Apr 2002
Posts: 30
User
User
Offline
Joined: Apr 2002
Posts: 30
Is anyone else having trouble adding graemlins here? I keep getting the error: "All required fields weren't filled"

v6.0.3


Paul Fries
Systems Administrator
CWIE LLC
Lupar_Drake #218012 08/16/2002 7:39 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I haven't tried this with 6.0.3 yet, but I'm guessing the security fix broke something. I'll check into it as soon as possible.

c0bra #218013 08/17/2002 2:24 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.


Daine #218014 08/17/2002 9:37 AM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Interesting. Have you also tried uploading new graemlins?

c0bra #218015 08/17/2002 11:40 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yes,
I was able to add a graemlin. It worked. Then I was able to removie it with the admin interface.
Guess I got lucky this time. <shrug>

Daine #218016 08/19/2002 3:05 PM
Joined: Apr 2002
Posts: 30
User
User
Offline
Joined: Apr 2002
Posts: 30
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.


Paul Fries
Systems Administrator
CWIE LLC
Lupar_Drake #218017 08/19/2002 3:33 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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);



Into this:
code:

$html -> not_right("All required fields weren't filled. Graemlin: $Graemlin Imagesize: {$HTTP_POST_FILES['Image']['size']}",$Cat);


c0bra #218018 08/19/2002 5:12 PM
Joined: Apr 2002
Posts: 30
User
User
Offline
Joined: Apr 2002
Posts: 30
Hmm. It is not seeing the file at all apparently. Here is what the error returned after modifying the doaddgraemlin.php file:

All required fields weren't filled. Graemlin: test Imagesize: 0


Paul Fries
Systems Administrator
CWIE LLC
Lupar_Drake #218019 08/19/2002 5:45 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Hmm. That's weird. For some reason the file isn't uploaded correctly.

If you have PHP 4.2.0+ you could add this to the error output: {$_FILES['Image']['error']}

If not, you could at least check if the filename is set by adding this to the error output: {$HTTP_POST_FILES['Image']['name']}

Otherwise I'm stumped... You haven't turned off file uploading in php.ini or set the max_file_size to 0 or something?

c0bra #218020 08/19/2002 6:18 PM
Joined: Apr 2002
Posts: 30
User
User
Offline
Joined: Apr 2002
Posts: 30
arrgh! I am such a bonehead.

The files I was uploading were corrupt. They really were 0 bytes.

Sorry about this. All is well now.


Paul Fries
Systems Administrator
CWIE LLC
Lupar_Drake #218021 08/19/2002 6:33 PM
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Well, that is a feature I can't add, fixing broken images. ;]

Glad that it worked out. =]

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


Joined: Sep 2001
Posts: 64
Junior Member
Junior Member
Offline
Joined: Sep 2001
Posts: 64
Is anyone using this hack with 6.2.3? Gardener - does it work?

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
bump

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Sorry, I must have missed that comment.

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.

Page 1 of 3 1 2 3

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
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 254
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 20240506)