Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Mod Name / Version: Forum Avatar's Version 1.3

Description: Allows your user's to select from a list of Avatar's set up by you. All Avatars are added or removed by you through the admin panel.

Working Under: UBB.Threads 6.2-6.3

Mod Status: Finished

Any pre-requisites: A licensed copy of UBBThreads 6.2 or 6.3

Author(s): Omegatron

Date: 06/22/03

Credits: Steve Stout (Aglavalin) for the original version in 6.0-6.1 , Scream for the page break feature.

Files Altered: editbasic.tmpl and admin/menu.php

New Files: avatars.php, useavatar.php, addavatar.php, removeavatar.php, doaddavatar.php, doremoveavatar.php

Database Altered: No

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.


Attachments
86345-avatars.zip (0 Bytes, 114 downloads)

Sponsored Links
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Thanks Chuck. I missed that one!!


Nikos
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yeah Someone asked if It had been updated for 6.3 in the 6.2 version I did so about time I got it released here.

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Yeah! Thank you!

Any chance we could get it to break into multiple pages? I have 300 avatars to choose from, and the page takes forever to load.



-peter

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yeah I will look into it.

Sponsored Links
Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Thank you!


Joined: Oct 2002
Posts: 64
Power User
Power User
Offline
Joined: Oct 2002
Posts: 64
Its posible to deleta all user av from Mysql ? becouse I whant instal this

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You could but why would you want to?

Simply install this and upload what avatar's you want and then create a topic on your board that you have installed this. This places a link inside editbasic when they edit their profile to the avatar page. If you really want to delete all avatar's this should work.

UPDATE w3t_Users SET U_Picture = 'NULL'

Joined: Jul 2003
Posts: 9
Junior Member
Junior Member
Offline
Joined: Jul 2003
Posts: 9
Very nice Omegatron! Good work

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Zip has been updated to break Avatar's into pages of 36 images for user's with extensive large avatar directories. All credit to Scream for this one. Asked for idea's on this one and he was gratious to just write it out.

Sponsored Links
Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Thank you sooooo much!!

-peter

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
I ran into an old problem where my avatar is displaying as 13 x 11..... The real graphic is much larger than that.

I tried going into my profile and then submitting again. Didn't fix it. But, it seems like it's fine for everyone else. I tested a couple older users out, and then registered a new account.

Any places I should look?

-peter

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
The avatar is set to 80x80 in this hack if it is larger. Your avatar sounds like it has hard coded numbers that will not change in the database. This has nothing to do with this hack. You can manually set your picture height and width with the following commands and see if that helps

UPDATE w3t_Users WHERE U_Username ='YOURNAME' SET U_PicHeight = 'yourpicheight'

UPDATE w3t_Users WHERE U_Username ='YOURNAME' SET U_PicWidth = 'yourpicwidth'

Sounds like your specific avatar has a few glitches

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
So, I'm getting this error when running the first thing

"Unable to do_query: UPDATE w3t_Users WHERE U_Username ='Allusivekudos' SET U_PicHeight = '60'
You have an error in your SQL syntax near 'WHERE U_Username ='Allusivekudos' SET U_PicHeight = '60' ' at line 2 row(s) affected by your query. "

Sorry for being difficult

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
You have the syntax of the command wrong. First is the SET statement and then the WHERE. So the query should be:

UPDATE w3t_Users SET U_PicHeight = '60' WHERE U_Username = 'Allusivekudos';

If you want to do everything in one go you can use this command:

UPDATE w3t_Users SET U_PicHeight = '60', U_PicWidth = '80' WHERE U_Username = 'Allusivekudos';

(provided that the height is 60 and the width is 80 - just made those numbers up)


Nikos
Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
You're a peach! Gracias Senor!

-peter

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
LOL Yeah OOPS yeah I had it backwards. Off to get some coffee.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
No problem Peter.

He he Chuck. I already had a full cup that's why I caught that one


Nikos
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Yeah well I need another couple cups. I drink it all day long. My Problem was I was trying to answer his post before running out the door to take my daughter to Soccer Camp.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I don't know if he's a "peach". (We don't have one).

But he's an apple.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
ROTFL!!!!


Nikos
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Thats about as close to a peach we have the good ole orange.

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Someone needs to hunt down a peach graphic then dammit!



Yeah, well thanks to all of you guys. This community absolultely rocks. Seriously, I'm just amazed at how well it works and the spirit in which things get done around here.


Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
We pretty much help each other and work togther pretty well. Each of us have our various skills and we pretty much help where we can and sometimes overlap. I usually get a kick out of the posts where each of us will answer a question on an issue and post a response and there are two answers of the same thing when each did not realized the other was posting a response. I get a chuckle out of that. Thats for the kudos.

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715


I really don't like graemlins, but this one is so practical... =]

I was thinking, why not have the New post/reply/preview pages list the names of other people replying to the same thing? I don't like having to do unnecessary things, and I'm not about to check the Who's online every time I write a post. But if I'm starting to write an answer and see that Josh started writing a reply 3 minutes ago (well, that's usually the case =P) I'll just have another sip of coffee instead and wait for his reply. =]

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
You guys are a riot!

So, now I have an obnoxious question... Any chance we can get alt text for the avatars. One of my users spent some time putting together a set of avatars - famous people, and wants their name to be shown when people hover over the avatar, at least in the avatar gallery. Any possibility?

-peter

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay yeah Josh is usually the first to answer. Zip file has been updated. The file name will now be shown if you mouse over it

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
The way this script works is to read the avatars folder for all the files and then display them accordingly. What you can do is use the file name as the ALT text stripping the extension. I cannot see any other way of doing this unless the filenames and descriptions are stored in a table in the database like the graemlins do.


Nikos
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Doh!

Chuck assumed Josh's role now!!


Nikos
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I did not quite strip the extention now Nikos I just placed $file in the alt tag.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
There you go: You can use this function to grab the filename:

// Fet the file name
function Get_FileName($strFileName) {
$lngFileNameLength = strlen($strFileName) - 4;
$strReturn = substr($strFileName, 0, $lngFileNameLength);
return $strReturn;
}


Nikos
Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
See! You guys ROCK!

Thanks again!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I think I'm being made fun of in this thread. But I'm not sure.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Thanks for this


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
I just tried the mod and it works really well except the image name is missing when I view my http://www.neoitems.net/neohelp/editbasic.php?Cat= page All I see there is the path to the avatar directory (which does have all the right permissions). I am using UBB.threads™ 6.2.1.

Help?

Edit: I figured it out
Just added:

// -------------
// Get the input
$MyAvatar = get_input("MyAvatar","get");

in useavatar.php

Last edited by pootlecat; 07/09/2003 12:58 PM.
Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Hola again!

This one is soooooooo great, though I've found a little buglet. If a user wishes to not have an avatar, I'm unsure how they can change it off. Is there a way? Or is this a bug?

-peter

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Not sure if I've used this anywhere or not.... but if it rads the avatars from a directory.... try uploading a blank.gif (1x1 transparent gif)

not the most elegant... but probably a quick fix for you.

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Yep, just did that.. Thanks!

Is this avatar setup included in 6.4 ? If so, probably should have a cleaner way of working things...

Also, one thing I just did that's pretty nifty is to wrap the avatar displayed on the my home with a link to the avatar.php page. Pretty simple, especially for newbies just joining to quickly get an avatar selected.

-peter

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Peter sometimes in Threads we miss the obvious. All the Avatar script does is throw a picture into the person's picture field. While Josh's selection works the simpler more direct approach would be to edit your basic profile and clear the picture line and update your profile.


Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Totally!

I wasn't complaining really! I just thought this may be in 6.4.... And, I've just seen a lot of broken avatars lately and am not sure how that's happening... Then I noticed this and thought I should say something...


I still appreciate the hack muchly

Page 1 of 2 1 2

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
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
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-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)