UBB.Dev
Posted By: Ian Spence [6.7] [beta] DHTML Posting Icons - 04/08/2004 9:19 PM
Modification Name: DHTML Posting Icons

Author(s): Ian Spence

Description: This mod hides all of the icons except for first one, the user then clicks the icon, and the rest of the icons will appear, where the user will need to click the icon they wish to use. The other choices will disappear, and the selected icon will replace the icon originally clicked.

Demo: http://www.alforadmin.com/cgi-bin/ultimatebb.cgi?ubb=newtopic;f=2

Requirements: UBB.classic 6.7 - Wouldn't be suprised if it worked on 6.6 and earlier. Please test

Download Link: https://www.ubbdev.com/ubb/upload/00020028/messageicon67.txt

login: ubbdev
password: ubbdev


Please think of a better name for this mod
Posted By: AllenAyres Re: [6.7] [beta] DHTML Posting Icons - 04/08/2004 9:44 PM
Very nice work Ian thumbsup

Don't have a better name yet, maybe 'dhtml posting icons'?

One possibly cool modification would be for the box that opens up to just make one row to the right so that the layout doesn't change during selection. smile
Posted By: Gizmo Re: [6.7] [beta] DHTML Posting Icons - 04/08/2004 10:20 PM
Allen, that'd be a long row with added message icons lol...
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/08/2004 10:20 PM
Updated with an even better solution laugh
Posted By: Gizmo Re: [6.7] [beta] DHTML Posting Icons - 04/08/2004 10:32 PM
Lol, I guess that works :x...
Posted By: AllenAyres Re: [6.7] [beta] DHTML Posting Icons - 04/08/2004 10:47 PM
nice smile
Posted By: Charles Capps Re: [6.7] [beta] DHTML Posting Icons - 04/08/2004 11:38 PM
Very nice. I'd suggest making it so clicking on the body would collapse it, but then you get to deal with bubbling issues...
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/09/2004 2:13 AM
Updated with some "touchy feely" fixes. Made it so you get the 'pointer' cursor when hover over the images. It's the same pointer you would have seen if it was actually a link.

I also added a tiny link in the bottom of the icon field with "Close [x]" that allows you to hide the window without changing the icon.

Still haven't gotten a way to make it so clicking the body closes it, as there's a whole lot of onclick/bubbling going on on reply pages.
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/09/2004 3:48 AM
A little fyi, this allows for a very nice hack that allows you to choose icons with quick reply.

First, install this mod.

Code added to modEnd hack laugh Clear topic cache and enjoy
Posted By: Gizmo Re: [6.7] [beta] DHTML Posting Icons - 04/09/2004 3:50 AM
lol, my monkey 'eh?
Posted By: AllenAyres Re: [6.7] [beta] DHTML Posting Icons - 04/09/2004 6:02 AM
looking even betta thumbsup
Posted By: LK Re: [6.7] [beta] DHTML Posting Icons - 04/09/2004 11:55 AM
I think you can hide it by onUnFocus or something like that...
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/10/2004 6:39 PM
I've got bubbling under control in Mozilla firefox (I'll assume it's the same in Mozilla) and IE6. I'm getting someone to test it on Opera now, so I should be able to update this today
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/10/2004 7:33 PM
Updated with the following fixes/features.

Table no longer stretches as long as the page in Opera.
Clicking the body of the page hide the table.
It's now added to the quick reply for topics.
And yes, I removed all the bubbling
Posted By: Gizmo Re: [6.7] [beta] DHTML Posting Icons - 04/10/2004 8:35 PM
Looks awesome ian, thanks smile .
Posted By: Charles Capps Re: [6.7] [beta] DHTML Posting Icons - 04/10/2004 9:26 PM
The icon box is now showing up in the upper left corner for me rather than where it should. Firebird 0.7...
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/10/2004 9:41 PM
hmmm... Firefox shows it correctly, lemme try something
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/10/2004 11:02 PM
Charles, I'm becoming convinced that this was a bug with 0.7, as it works in 0.8.

I've added a check for firebird browsers that, instead of having the position absolute, will have it relative. Care to try it before I release it?
Posted By: Gizmo Re: [6.7] [beta] DHTML Posting Icons - 04/11/2004 5:23 AM
Agreed with Ian, I'm using 0.8 and it all shows up perfectly.
Posted By: ADWOFF Re: [6.7] [beta] DHTML Posting Icons - 04/12/2004 8:40 AM
I think I should start to take over Gizzy's title of being "code breaker" ... when I try to install this hack (on my test site tipsy ) ... I get white pages when I go from the front page of the board to a post ...

For now, I'll stick with Brett's quick fix for my message icon ... even though I think Ian's new hack looks way cool.
Posted By: LK Re: [6.7] [beta] DHTML Posting Icons - 04/12/2004 3:48 PM
Code
		document.getElementById('iconimage').alt = '$escaped_wordlet' + ' ' + iconnumber;
I think it should be
Code
		document.getElementById('iconimage').alt = unescape('$escaped_wordlet') + ' ' + iconnumber;
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/12/2004 4:33 PM
Sue, I retried it on a fresh 6.7.1 install and it went flawlessly.

Updated with LK's code
Posted By: ADWOFF Re: [6.7] [beta] DHTML Posting Icons - 04/12/2004 8:49 PM
Quote
Originally posted by Ian Spence:

Sue, I retried it on a fresh 6.7.1 install and it went flawlessly.

Updated with LK's code
I tried it again, Ian. Still get *nothing* when I go to access a page outside of the forum summary page. I'm really beginning to think I'm a jinx on hacks and upgrades! tipsy

Maybe I'll try it again down the road, but for now, I just gotta stick with what is working.
Posted By: ADWOFF Re: [6.7] [beta] DHTML Posting Icons - 04/18/2004 9:08 PM
Ian, I had made some mistakes on my end ... I finally figured them out, and now I have this very, very cool mod working on my site.

I do have a question, though ...

Because of my smilie pulldown menu, the first four or five message icons don't appear like they should ... here's a screen shot:

[Linked Image]

If you work really hard, you can still get them ...

I was wondering if there was an *easy fix* to have the icon box pop-up in a different direction. Does that make sense?

If it's not an *easy fix* -- don't worry about it. I'll live with it as it is. smile
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/18/2004 9:11 PM
the easiest fix is to move to Firefox.

The other easy fixes require editing a whole lot of templates
Posted By: ADWOFF Re: [6.7] [beta] DHTML Posting Icons - 04/18/2004 9:14 PM
Quote
Originally posted by Ian Spence:

the easiest fix is to move to Firefox.
Okay, what's *firefox*? confused
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/18/2004 9:19 PM
http://www.mozilla.org/products/firefox/

It's a browser tipsy
Posted By: ADWOFF Re: [6.7] [beta] DHTML Posting Icons - 04/18/2004 9:21 PM
Quote
Originally posted by Ian Spence:

http://www.mozilla.org/products/firefox/

It's a browser tipsy
Oh! LOL
Posted By: Gizmo Re: [6.7] [beta] DHTML Posting Icons - 04/18/2004 10:51 PM
Ian, think of her members wink ...
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 04/19/2004 12:02 AM
uh... link them all to firefox smile
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 05/28/2004 12:22 AM
Sue, in public_topic_page.pl

change
Code
$hf->[0] =~ s/<body/<body onclick="document.getElementById('icondiv').style.display = 'none';"/isg;
to

Code
$hf->[0] =~ s/<body/<body onclick="document.getElementById('icondiv').style.display = 'none';"/isg unless $stat_line[1] =~ m/X/;
That will fix that javascript error.

txt updated
Posted By: Nightcrawler Re: [6.7] [beta] DHTML Posting Icons - 06/16/2004 9:03 AM
Quote
Originally posted by Ian Spence:

Charles, I'm becoming convinced that this was a bug with 0.7, as it works in 0.8.

I've added a check for firebird browsers that, instead of having the position absolute, will have it relative. Care to try it before I release it?
This problem exists in Netscape 7.1 too.
Posted By: DocDoom Re: [6.7] [beta] DHTML Posting Icons - 06/17/2004 8:54 PM
I just installed it and it works great. Thanks laugh
Posted By: Nightcrawler Re: [6.7] [beta] DHTML Posting Icons - 05/25/2005 4:23 AM
Quote
Originally posted by Nightcrawler:

This problem exists in Netscape 7.1 too.
Has anyone come up with a solution to this one? Thanks in advance for any assistance.
Posted By: Ian Spence Re: [6.7] [beta] DHTML Posting Icons - 05/25/2005 4:35 AM
if only Netscape 8 was out.
Posted By: Nightcrawler Re: [6.7] [beta] DHTML Posting Icons - 05/25/2005 11:24 AM
Quote
Originally posted by Ian Spence:

if only Netscape 8 was out.
Actually, I agree with you. But, I had spent several hours trying to convince one of my users to upgrade and he refuses to use anything but that version of Netscape. If there isn't a solution on the UBB end of things, then I'll gladly tell him. laugh

He's been wanting me to remove this hack just for him for awhile now.
© UBB.Developers