UBB.Dev
Posted By: JoshPet Beta-[6.2-6.3] Icon Select Pull Down Menu 1.4 - 06/14/2003 9:36 AM
Mod Name / Version: Icon Select Pull Down Menu 1.4

Description: Threads does come with an outdated ubbt_icon_select.tmpl file in the
ALTERNATE template directory. This gives you the option of selecting only from the standard threads icons. I have reworked that template as well as the showicons.php script and template to read the icons directory and give a true listing of all your post icons in a pull down menu. Also, when clicking the link to see the post icons, it will show them all, not just threads default. As you select a different item from the pulldown menu, the preview image will change.

Version 1.1 adds support for table wrappers - thanks Dalantech
Version 1.2 adds an image preview when you select an option from the pulldown.
Version 1.3 Supports the correct default selection during edit
Version 1.4 Fixes an Ommission in the instructions which causes post icons to be lost when posts were edited. 7/14/03


Working Under: UBB.Threads 6.2-6.3

Mod Status: Beta

Any pre-requisites: none

Author(s): JoshPet of www.joshuapettit.com

Date: 06/14/03

Credits: Commissioned by www.freeconservatives.com

Files Altered: addpost.php, showicons.php, showicons.tmpl

New Files: a replacement ubbt_icon_select.tmpl is included.

Database Altered: none

Info/Instructions:

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.




Attached File
84789-IconPulldown1.4.zip  (47 downloads)
nice josh, is this one similar to how the icons are selected for the quick reply?
Yes, exactly.

It's a "real time" pull down - so if you add icons it's accurate. (The pull down menu in the threads distro is just the standard list) and it previews the icon for you.
aahhh cool.... we have an old ubb.classic modification that does something like that.. I always liked it, it made the posting pages much cleaner
Josh - in the zip you have a showicons.php file, I notice in this that the line of $Cat = get_input("Cat","get"); is missing

and also you say to add

// ---------------------
// Grab the tablewrapper
$html = new html;
list($tbopen,$tbclose) = $html -> table_wrapper();

but

list($tbopen,$tbclose) = $html -> table_wrapper();

is already included in the original.

I don't think I have added these lines through any mods, so not sure that you need to duplicate the lines.
Ack - you know - when I updated this - I updated the template and left the other stuff alone. I'd forgotten that Rick revised the showicons.php script already (it never used to include the tablewrappers) so some of that older stuff needs to come out.

I'll revise the directions in a bit, for now you only need to do the addpost.php instructions and use the new icon select template.
OK - got this updated as well.

When I first wrote this they had forgotten to make the showicon script use the table wrappers and a template - so my instructions included adding that. That has since been included in the final release.

The showicons.php script shouldn't have been in the zip - just something I forgot to remove. This revision just really tweaked the icon select template working the glitches out of that from the previous release.. but since some of the rest is now included in threads - I've removed the unescessary steps from the instructions.

Thanks.
Posted By: TonyN Re: Beta-[6.2-6.3] Icon Select Pull Down Menu 1.3 - 07/14/2003 11:54 PM
Josh...I just made the facelift plus your pulldown mod to my main board. Soon after I went to edit a previous post, and when I looked afterwards, the icon had disappeared from the post...if I go back to edit again, this time trying to change the post icon (which I did not try to do in the previous edit of the post), you can select an icon, but it doesn't show next to the name, and when I hit "change this post", the post still doesn't have an icon.

There was some discussion of the disappearing icon in another thread, involving Dalantech, but I couldn't really understand your interchange, and I don't know if it was resolved. Any idea? Thanks - Tony
Posted By: Ian_W Re: Beta-[6.2-6.3] Icon Select Pull Down Menu 1.3 - 07/15/2003 12:17 AM
I am getting that as well - seems to be random. Can't pinpoint the problem yet.
Ian_W: thanks for the response...I had remarked on this problem in another thread a week or 2 ago, and then Josh and Dalantech had a complicated interchange regarding this, but I couldn't figure out what they were doing....

So you have the problem with facelift and the pulldown? I guess if it's just a little bug I shouldn't worry about it too much. Trouble is we're shortly going to announce our board to 4000 of our association members, and I'd rather not be screwing around with the general functionality of the board right after that happens...so I'm trying to decide whether to stick with the facelift, or to restore plain old 6.3. Any thoughts?

EDIT: I found the earlier discussion...maybe you can get something out of it. It's the lower half of this thread: thread about different facelift problem

Tony
I don't think it's got anything to do with facelift.

This is something that I solved.... but unfortunately I did the mod - then tried to come back and document it later.... so I may have missed a step in editpost.php to make the icon thing work right.

Give me some time to look at it and I'll get it settiled. I have this working on several boards.... but just may have messed up the instructions.

I go on vacation Wednesday though - and I'm really hussling to get everything done that I need to before I leave. So I'll try .... but it may not happen until I get back.
Josh - afraid we're overlapping posts here.

Yes, I noticed elsewhere you commented elsewhere about going on vacation. I suppose I could just take off your pulldown mod temporarily...as noted, I'd prefer to stick with the facelift as a whole during our opening up this board to real traffic and immediately afterwards, rather than going back to 6.3 and then later changing a lot of the look, etc, while we're getting (hopefully) heavy usage. So if you don't get to it before you leave, as sounds likely, I may just pull the mod temporarily. It's a real nice addition to the facelift, so we'll defintely be using it later, if not now.

In any case. have a good vacation - Tony
OK - here was the missing instruction:

Code
<br />####<br />#### Open modifypost.php<br />####<br /><br />#<br /># Find this:<br />#<br /><br />	$Icon		= get_input("Icon","post");<br /><br /><br />#<br /># Change to this:<br />#<br /><br />	$Icon		= get_input("Icon","post");<br />// strip off the URL<br />	$Icon = basename($Icon);<br />


That'll fix it so the icons don't get lost when the post is edited.
OK! Josh

I made that change, then went back and tried to edit the post that had lost the icon, and was able to put it back in! And it stayed the next time I edited the post, just as a test.

Guess that fixes it, and thanks! Tony

PS: you might want to date the changes in the mod, so that people can tell whether or not they have a current version. (I know...I shouldn't be telling you that!)
Glad that fixed it. Good idea. I added the date above.
I remeber that simillar icon pull down menu was in ver. 5.5
thanks for the update
[]Slawek_L said:
I remeber that simillar icon pull down menu was in ver. 5.5 [/]

Not quite like this - the "pull down" icon select menu is standard in threads - it's in the /templates/alternate directory - if you want to use it you just need to move it to the /templates/default directory.

However the one that comes with threads will not show any custom added post icons - and will not allow you to preview them. So it's really outdated and really needs to be updated, as it's pretty obsolete. All the icons are hard coded and not generated from the contents of the icon directory.
© UBB.Developers