Previous Thread
Next Thread
Print Thread
Rating: 5
Page 2 of 3 1 2 3
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!

Sponsored Links
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[/]
Sponsored Links
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...

Sponsored Links
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

Page 2 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
hatter
hatter
USA
Posts: 69
Joined: January 2001
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)