|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Hi,
I'm wondering if there is a hack or a little code change to make possible to display a small text next to each avatar, not custom titles but a predefined text, so under the avatar on each post, it shows a text bellow it, something like:
Username _________ |*******| |*******| |*******| ---------- avatar name 1 ________________________ Username _________ |*******| |*******| |*******| ----------- avatar name 2
Is there any hack for it? It would be a cool feature. Thanks for any help!
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Do you mean for all people with avatars or just a few?
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
I believe he means for all
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Thanks for your reply, i mean for all people with avatar. Sort of a description for the avatar bellow it.
|
|
|
|
Joined: Oct 2002
Posts: 394
Enthusiast
|
Enthusiast
Joined: Oct 2002
Posts: 394 |
I read alot around here but never anything about this. It is possible for you as an admin to do it manualy, but that implies to add a line on each member .cgi and then in the public_topic_page to add something in this string:
$linkname
$user_status
$AvatarBits $rating_line
|
your routine might look different, I removed $member_number
and reversed $user_status
with $AvatarBits
and I am also running an older.
good luck
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Thanks for writting that code Felix 10 but i'm a bit lost. Which files do i need to change? I'm planning to do something like an rpg, for example, bellow the avatar image, a text that reads "Human - Jedi" or "Human - Stormtrooper". Thanks for all again.
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
try this. In public_topic_page.pl FIND: if(avline) { document.writeln(avline + " ") } // end if // --> </script> ~; } # end if After, add: if($AvatarBits ne "") { $title_from_avy = $Avatar; if($title_from_avy =~ /^(S+)Avatars/(S+).(S+)$/) { $title_from_avy = $2; $title_from_avy =~ s/_/ /isg; $title_from_avy =~ s/(s+)/ /isg; } else { $title_from_avy = ""; } } then, FIND: ADD BEFORE The only thing you need to do is rename your avatars. If you want an avatar to have "Human - Jedi" under it, name the avatar "Human_-_Jedi.(extension)"
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
F-A-N-T-A-S-T-I-C It works beatifully, it's really cool and easy to add more avatars with text, so many thanks Ian, i really appreciate your help. WOW! One more question: Could be the text centered and displayed in bold?
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
do you want everything in the left column to be centered, or just that text?
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Hi Ian, just that text "Human - Jedi" centered and bold would be fine.
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
change to <center><b>$title_from_avy</b></center>
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
THANKS SO MUCH IAN, That was exactly what my website ubb needed, just take a look how cool it looks right now. click here I really appreciate your help, thanks ubbdev for existing!
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
Wow, now that does actually look pretty interesting...
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Hi, i have one more question. Could the avatar and the text next to it be added to the user profile? I would like to show an extra row above the first one (the member rank) with the text "Avatar" in the first cell and the avatar image with the text (like Human - Jedi) on the second one, when you enter to someone profile. Thanks for any help!!
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
Untested: In public_display_profile.pl FIND: $user_profile[7] ||= 0; ADD AFTER: my $AvatarBits = $user_profile[37]; my $title_from_avy; my $avatar_field = ""; if($AvatarBits ne "") { $title_from_avy = $AvatarBits; if($title_from_avy =~ /^(S+)Avatars/(S+).(S+)$/) { $title_from_avy = $2; $title_from_avy =~ s/_/ /isg; $title_from_avy =~ s/(s+)/ /isg; } else { $title_from_avy = ""; } $avatar_field = qq~ <tr bgcolor="$vars_style{AltColumnColor1}"> <td> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> <b>$vars_wordlets{avatar_title}</b>: </font> </td> <td> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> <img src="$AvatarBits" alt="$vars_wordlets{avatar_title}" /> $title_from_avy </font> </td> </tr>~; } FIND: <font color="$vars_style{TableStripTextColor}" size="$vars_style{TextSize}" face="$vars_style{FontFace}"><b> $rating_line </b> </font> </td> </tr> ADD AFTER: Give that a shot and tell me how it works out
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Thanks Ian, that worked out great. It seems it doesn't show the text bellow the avatar.
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
could you just post the screenshot of someone's profile? (who has an avatar selected)
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Sure you can check this profile: here I believe it's better for the design itself to create a new row bellow the one containing the avatar image with some text like "Race / Occupation" on the first cell, and the avatar name (Human - Jedi) on the second one. It's much better than just place the name under the image. I really appreciate your help (i'll open the forums for public access tomorrow!)
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
try changing if($title_from_avy =~ /^(S+)Avatars/(S+).(S+)$/) { to if($title_from_avy =~ /^(S*)Avatars/(S+).(S+)$/) {
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Great, that fixed the problem and now shows under the avatar image its text! I have two more questions Ian:
-Could that text be in a cell bellow, where the first cell say sommething like "Race - Ocuppation:" and the second one that text?
-Now that the forums are open. It seems there is an error in the posts. When someone with an avatar selected make a post, the following messages posted by other users keep showing the avatar text if they don't have selected an avatar. For example. If i post a message and i have the avatar with the text "Human - Jedi" selected, someone with no avatar post a reply after it and bellow his/her username keep showing "Human - Jedi". I think male users with no avatar don't want "Human - Princess" bellow their username!!
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
try this. in public_topic_page.pl ADD ABOVE: the in public_display_profile.pl CHANGE: $avatar_field = qq~ <tr bgcolor="$vars_style{AltColumnColor1}"> <td> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> <b>$vars_wordlets{avatar_title}</b>: </font> </td> <td> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> <img src="$AvatarBits" alt="$vars_wordlets{avatar_title}" /> $title_from_avy </font> </td> </tr>~; to $avatar_field = qq~ <tr bgcolor="$vars_style{AltColumnColor1}"> <td> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> <b>$vars_wordlets{avatar_title}</b>: </font> </td> <td> <img src="$AvatarBits" alt="$vars_wordlets{avatar_title}" /></td></tr> <tr bgcolor="$vars_style{AltColumnColor1}"> <td> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}"> <b>Race - Occupation</b>: </font> </td> <td align="left"> <font size="$vars_style{TextSize}" face="$vars_style{FontFace}">$title_from_avy </font> </td> </tr>~; and change Race - Occupation to whatever you want
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
That worked perfect, it's just the way i wanted it. You must document this cool little hack Ian! I really appreciate all the help you gave me. I have a little problem, but i guess it's far from being related to this hack. In the registration form the avatar selection field doesn't show. I've made 2 little modifications to the public_register_form: I removed the "public name" field and i set to "yes" the "Allow the admin to email me" field. But when i left the file to its original state, the problem persits. How could i fix this problem? (i didn't want to open a new topic just for this question) Thank you for all the help you give to all this people over here.
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Hi i discovered a little problem, when you are logged out if you enter to someone profile, the avatar doesn't appear (like the missing image rectangle in the browser), when i saw the code i find out that the avatar image address is pointing to the ubbcgi directory instead of the ubb one where the actual avatars are stored. When you are logged in, the avatar appears without any problem. What change do i have to make to fix it? Thanks
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
hmmm, try this. FIND: $title_from_avy =~ s/(s+)/ /isg; ADD AFTER: $AvatarBits = qq~$vars_config{NonCGIURL}~ . $AvatarBits;
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Great!, that fixed the problem, include "/" here: $AvatarBits = qq~$vars_config{NonCGIURL}/~ . $AvatarBits; Thanks again Ian
|
|
|
|
Joined: May 2001
Posts: 43
User
|
User
Joined: May 2001
Posts: 43 |
Ian, i would like to add to the avatar selection pop-up window the race and ocupation of that particular avatar under the avatar image (above the "Select this Avatar" button) so the user knows which race and ocupation they select, something like this:
Race and Ocupation: Human - Master Jedi
Is there a way to display an alt text with the race and ocuppation, so the user know it when the move the mouse cursor above the image?
Thanks so much
|
|
|
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.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|
|
|