UBB.Dev
Posted By: Kutulus Pulldown Message Icons (beta) - 02/26/2000 7:56 AM
This is a major hack that I have been busy working on. I will not post the code because it is only 1/2 complete. I am still having problems with displaying the icons on forumsdisplay.cgi and ubb_library2.pl

Screenshots:





Above are images from my site. As you can see, this hack would be perfect if you like to have many message icons. I also have added CP options for convinence.

Problems I need help with:

I am having trouble trying to find out how to correctly display the message icons. Currently they are displayed by calling on them in numeric order, but the pulldown requires that they be in alphabetic order. Nowhere can I find the code responsible for putting the icons in numerical order.

I know all this is hard to understand, but please bear with me. Below I will supply the code responsible for displaying the icons. (in forumsdisplay.cgi and ubb_library2.pl)

forumsdisplay.cgi

Quote
quote:
This basically just calls for data from $threadinfo[7] (which gives out the numerical number for the message icon). Also, I don't even know where this $threadinfo comes from [Linked Image]

ubb_library2.pl

Quote
quote:
This is similar to the code in forumsdisplay.cgi, but instead of $threadinfo it uses $thisline, again I have no idea where this comes from.

So, basically these two portions are what I am trying to fix (this is the last thing i need to get done for this hack). But as you see there is more to these pieces of code than meets the eye. They both revert to some code elsewhere, which boggles me.

I am so close to getting this hack completed so I am asking all you code hackers to try and help me with this. I'm sure many people will enjoy this hack.


------------------
Blizzard Domain - http://go.to/blizzdomain
Posted By: Mutt Re: Pulldown Message Icons (beta) - 02/26/2000 9:20 PM
I know I told ya about this before but hope this helps


this is the sub that builds the message icons
it in ubb_libary2.pl
Code
code:


this is the sub that builds the avatar dropdown
also in ubb_library2.pl
Code
code:

you need to combine these 2

real quick it looks like if you just changed the icon sub to this, you shouldn't have to change anything else other than the code that calls the msh icons on the post page.

Code
code:

forumdisplay.cgi and ubblibary2 should be unaffected by this change.

in postings, you'll have to change the av code that you've already installed for mesage icons to reflect these var names.

good luck
Posted By: Mutt Re: Pulldown Message Icons (beta) - 02/26/2000 9:47 PM
heres another piece

change
Code
code:

to this something like this. you'll have to change the specific table info to fit what you've made
Code
code:

make sure that the img is before the form tag and that the dropdown is in the form tag. or you'll get netscape errors. remember to do this you need to remove the form tag and let iconwording print it.

if you have the non javascript preveiw hack installed you'll have to move the $previewcode to before the the iconwording. not sure if works outside of the form tag. you'll have to play with it.

you'll have to check this

and make sure that this is the correct for your form. I think this was changed when i installed the preview hack. plus i think that new topic and reply have diff form names, so you'll have to do something like i did with the messagebox name in the ubbcode buttons mod to fix this.

I can't think of anything else but this info should be more than enough. you don't have to edit anything in ubb_library2.pl and forumdisplay.cgi as long as you don't rename the vars.

Sorry i didn't get this to you sooner but I've been real busy.
Mutt
Posted By: Mutt Re: Pulldown Message Icons (beta) - 02/26/2000 9:53 PM
Ok i take that last bit about ubblibrary2 and forumdislpay

In the code you've listed I'd change the instanvces of

$IconNumber = "1";

with

$IconNumber = "Default";

then upload a icon called Default.gif

this would obviously be the default message icon.

I'd probably change the new icon sub to set that icon to the default choice in the dropdown.
Posted By: Kutulus Re: Pulldown Message Icons (beta) - 02/27/2000 12:49 AM
The code you are suggesting will work, although the icons will still have to be in numberic order. I want to find the code responsible for numbering the icons and change it so that it retrieves the file name (allows for descriptions of the icons). Below are the subs i am using in ubb_library2.pl so you can get a feel for what i am doing. NOTE: Default Icon is set in the control panel, along with the default icon size.

Quote
quote:
Now that I have this whole part worked out, I am seaching for a way to simply display the icons correctly in forumsdisplay.cgi and ubb_library2.pl.


------------------
Blizzard Domain - http://www.blizzdomain.com
Posted By: Mutt Re: Pulldown Message Icons (beta) - 02/27/2000 7:43 AM
dude ignore the word number. this code will let you name em anything. i promise. I just left the vars called num and number so not to cause problems. I've never steared you wrong before. I'm telling you that you are way off on a tangent doing things that don't need to be done. I just wrote you hack for ya. use that code and 15min to 30min later you'll have all the little bull**** figured out.
Posted By: Mutt Re: Pulldown Message Icons (beta) - 02/27/2000 7:45 AM
there is no numbering code. the icons are caleed icon1, icon2 and the code reads the names and strips off the icon part leaving just 1, 2. this code reads the names and leaves em alone.
Posted By: Kutulus Re: Pulldown Message Icons (beta) - 02/27/2000 8:43 PM
Quote
quote:
Nope, your wrong. Yours DOESN'T allow icon descriptions. I tried it out, and the code completely ignored default.gif or any other icon. It only reconized icon#.gif's

The code I have works great, it just has a problem with displaying the icons. PLEASE help me figure out how to display them properly, thanks...


------------------
Blizzard Domain - http://www.blizzdomain.com
Posted By: Kutulus Re: Pulldown Message Icons (beta) - 02/27/2000 9:54 PM
DOCUMENTATION: http://tassadar.virtualave.net/icons.txt

Try out this hack, and see if you can help fix the two pieces of code that need fixing(they are shown at the bottom of the txt file). That goes for you too Mutt [Linked Image]

The code in the documentations allows you to set the default icon, default icon sizes, and it allows you to have descriptions of the icons. So i feel as i'm heading in the right direction with this hack. Mainly because only 2 little pieces need fixing


------------------
Blizzard Domain - http://www.blizzdomain.com
Posted By: Mutt Re: Pulldown Message Icons (beta) - 02/28/2000 6:33 AM
I guess you are on your own. you told me this same thing back when i tried helping you with the pulldown image hack. You said the code didn't work. I know this code works because i've used it in the av addon. i said it wasn't perfect and that you needed to iron out the little problems. I wrotew this off the top of my head but we are taliking a couple words out of place and thats it. I alreay spent a bunch of time writing this.

i know you made part of it work, but why reinvent the wheel and make a real short hack into some huge *** project the requires you edit all kinds of files. Of course it ignored the default gif. I told you that i didn't include any code to read the default because i haven't looked at you cp hack for this.
Posted By: Kutulus Re: Pulldown Message Icons (beta) - 02/28/2000 7:07 AM
Quote
quote:
My code isn't going to be as "big" as you mention. But it won't be a simple sub substitution. There will only be four files you will hafta edit.

cpanel2
forumsdisplay
postings
ubb_library2


if been working hard on this, and I am almost there. I have found the code that is responsible for numbering the icons, so it is only a matter of time before i figure out to retain the icons path and filename.



------------------
Blizzard Domain - http://www.blizzdomain.com
Posted By: Kutulus Re: Pulldown Message Icons (beta) - 02/28/2000 7:10 AM
The only negative effect of this hack is that netscape users won't be able to post. There seems to be a bug that causes netscape to screw up. Mutt, I know you fixed this for the av addon but I can't seem to get it to work with this hack. [Linked Image]

I am also thinking of adding an option "Allow users to edit their message icon" in the CP.

------------------
Blizzard Domain - http://www.blizzdomain.com
Posted By: Mutt Re: Pulldown Message Icons (beta) - 02/29/2000 3:53 AM
Hey

I already posted the fix for you netscape problem or icqed you or something. anyway heres the deal.

you need to switch the possitions of the dropdown and the icon. also, the form tag needs to be in between these 2.

icon
form tag
dropdown

this way the dropdown is in form but the div is before the form. netscape can't handle a div inside the form tag.

a very simple problem to sovle once you realixe what the **** the problem is. took me quite awhile.
Posted By: Mutt Re: Pulldown Message Icons (beta) - 03/01/2000 2:08 AM
tested my code for the message icon thingy. had to change a couple words but it works fine. you can see it on my site. only rewrote the reply page, so edit and new topic won't work. if you go reply you can see it. it works in forumdisplay and ubb_libray2.pl just fine. had to remove only 2 words and add a one word to each file.

this would work fine with your cp addon that you made and would still be able to use your default icon chooser thingy.

you can name em anything you want. i didn't bother renaming them so you'll see icon1, icon2, etc. I did upload an icon called a.gif so you could see that it does read the name. you it converts the spaces and alphabetizes the icons in the dropdown. you could remove that if you didn't like it. only one line of code.

the hack is no longer and is as easy to install as the ubbbuttons hack.

it loads the defaul icon. on an edit it would load the picked icon, and have the dropdown selected to the right item. works fine with the preview button. check it out.

http://heywebdesign.hypermart.net/ubb/Forum1/HTML/000027.html
Posted By: The Team Re: Pulldown Message Icons (beta) - 03/01/2000 4:08 AM
Then can you post your mods to the hack Mutt? So Kutulus can add them to the hack. Then we can start betatesting it.

------------------
President and Webmaster of UBB Hackers Hideout.

Contact Me at:

ICQ: 33326211
AIM:SpazJCC
Email: ubbmaster@ubbcodehacking.com
Posted By: Kutulus Re: Pulldown Message Icons (beta) - 03/01/2000 6:58 AM
Update:

I fixed the problems i was having (it was caused by a spelling error [Linked Image]) I don't really think Mutt's code is necessary unless he really really wants us to see it. The code I have now works great! I can't wait to release it...

*No beta testing required [Linked Image]

I want to add an option to "edit message icon" before i release the hack, so stay tuned.

------------------
Blizzard Domain - http://www.blizzdomain.com
Posted By: Greg Hard Re: Pulldown Message Icons (beta) - 04/17/2000 5:36 PM
bump!
Posted By: cal Re: Pulldown Message Icons (beta) - 04/18/2000 10:29 AM
It's not being released - read Kutulus's thread in the beta section.

Just a thought [Linked Image]
Posted By: Dr Dollarz Re: Pulldown Message Icons (beta) - 04/18/2000 5:32 PM
where??

------------------
Did I just say that?
What was I thinking?
Posted By: cal Re: Pulldown Message Icons (beta) - 04/18/2000 5:40 PM
Opps, wrong forum. hehe

it's here : http://ubbcodehacking.com/ubb/Forum7/HTML/000068-2.html

Just a thought [Linked Image]
Posted By: Highlander Re: Pulldown Message Icons (beta) - 04/27/2000 2:10 PM
I got it to work but for some reason it is above the name, how do I get it back to old spot?
Posted By: cal Re: Pulldown Message Icons (beta) - 04/27/2000 4:06 PM
What was above what name?

Just a thought [Linked Image]
Posted By: CARTOON Re: Pulldown Message Icons (beta) - 01/27/2001 12:18 AM
Someone fix this hack!!! I got it added, but it won't display the default icon, for when "No Icon" is chosen.... That and when editing a message the icon than turns into the dreaded X... Also in private messages it doesn't recognize the drop down and displays the "X" box as well... Any help?? I really like this hack..
© UBB.Developers