Previous Thread
Next Thread
Print Thread
Rate Thread
#41494 02/26/2000 12:56 AM
Joined: Jan 2000
Posts: 32
Member
Member
Offline
Joined: Jan 2000
Posts: 32
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

Sponsored Links
Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
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

Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
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

Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
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.

Joined: Jan 2000
Posts: 32
Member
Member
Offline
Joined: Jan 2000
Posts: 32
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

Sponsored Links
Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
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.

Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
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.

Joined: Jan 2000
Posts: 32
Member
Member
Offline
Joined: Jan 2000
Posts: 32
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

Joined: Jan 2000
Posts: 32
Member
Member
Offline
Joined: Jan 2000
Posts: 32
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

Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
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.

Sponsored Links
Joined: Jan 2000
Posts: 32
Member
Member
Offline
Joined: Jan 2000
Posts: 32
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

Joined: Jan 2000
Posts: 32
Member
Member
Offline
Joined: Jan 2000
Posts: 32
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

Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
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.

Joined: Jan 2000
Posts: 64
Member
Member
Offline
Joined: Jan 2000
Posts: 64
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

Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
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

Joined: Jan 2000
Posts: 32
Member
Member
Offline
Joined: Jan 2000
Posts: 32
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

Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
Joined: Feb 2000
Posts: 4,625
bump!

Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Programmer
Offline
Joined: Feb 1999
Posts: 1,379
It's not being released - read Kutulus's thread in the beta section.

Just a thought [Linked Image]

Joined: Feb 2000
Posts: 116
Member
Member
Offline
Joined: Feb 2000
Posts: 116
where??

------------------
Did I just say that?
What was I thinking?

Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Programmer
Offline
Joined: Feb 1999
Posts: 1,379
Opps, wrong forum. hehe

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

Just a thought [Linked Image]

Joined: Jan 2000
Posts: 18
Member
Member
Offline
Joined: Jan 2000
Posts: 18
I got it to work but for some reason it is above the name, how do I get it back to old spot?

Joined: Feb 1999
Posts: 1,379
cal Offline
Programmer
Programmer
Offline
Joined: Feb 1999
Posts: 1,379
What was above what name?

Just a thought [Linked Image]

Joined: Jan 2001
Posts: 100
Member
Member
Offline
Joined: Jan 2001
Posts: 100
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..


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
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 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
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)