YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
Can the avatar be linked to a members details? (Read 3,166 times)
 Apr 16th, 2012 at 3:28am
There are no actions to perform.  

Miss Emily 
Junior Member
**
Offline
Posts: 93


None
Can the avatar be linked to a members details?
Is is possible to enable both the "avatar" and "display name" to link to a members details?

Also I would like the link to work for guests and members.

I'm using YaBB 2.5 AE.
 
 
IP Logged  
 Reply #1 - Apr 17th, 2012 at 1:29am
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Can the avatar be linked to a members details?
Hi Miss Emily,

I'm assuming that by "details" you mean the profile page?

To link the avatar to profiles, in Sources/Load.pl find:

Code (Perl)Select All
        ${$uid.$user}{'userpic'} = qq~<img src="~ .(${$uid.$user}{'userpic'} =~ m~\A[\s\n]*https?://~i ? ${$uid.$user}{'userpic'} : "$facesurl/${$uid.$user}{'userpic'}") . qq~" name="avatar_img_resize" alt="" border="0" style="display:none" /><br />~; 


And replace with:

Code (Perl)Select All
        ${$uid.$user}{'userpic'} = qq~<a href="$scripturl?action=viewprofile;username=$useraccount{$user}" rel="nofollow"><img src="~ .(${$uid.$user}{'userpic'} =~ m~\A[\s\n]*https?://~i ? ${$uid.$user}{'userpic'} : "$facesurl/${$uid.$user}{'userpic'}") . qq~" name="avatar_img_resize" alt="" border="0" style="display:none" /></a><br />~; 


As for profile pages being viewable to guests, I haven't really considered if this will cause any issues or not, so do so at your own risk. It will also mean a few unusable links being visible to guests like the PM link - it would take more edits than below to get it perfect.

First, to make the display name clickable to guests, in Sources/Load.pl find:

Code (Perl)Select All
    if ($iamguest) { return ($_[1] ? ${$uid.$user}{'realname'} : $format{$user}); } 


And replace with:

Code (Perl)Select All
    # if ($iamguest) { return ($_[1] ? ${$uid.$user}{'realname'} : $format{$user}); } 


And to make profiles viewable, in Sources/Profile.pl find:

Code (Perl)Select All
sub ViewProfile {
    if ($iamguest) { &fatal_error('members_only'); } 


And replace with:

Code (Perl)Select All
sub ViewProfile {
    # if ($iamguest) { &fatal_error('members_only'); } 


Then find:

Code (Perl)Select All
sub usersrecentposts {
    if ($iamguest) { &fatal_error("members_only"); } 


And replace with:

Code (Perl)Select All
sub usersrecentposts {
    # if ($iamguest) { &fatal_error("members_only"); } 


I've only tested that very quickly...
« Last Edit: Apr 17th, 2012 at 1:32am by Derek Barnstorm »  
 
IP Logged  
 Reply #2 - Apr 17th, 2012 at 3:47am
There are no actions to perform.  

Miss Emily 
Junior Member
**
Offline
Posts: 93


None
Re: Can the avatar be linked to a members details?
Thank you for your help Derek, it works beautifully, and yes the "profile" is what I meant.

I don't think the profile pages being viewable to guests will cause issues because they can't send a PM to members.

I guess the only concern is that members email addresses are visible for all, and may attract spam, but there's an option for them to hide it from public.
 
 
IP Logged  
 Reply #3 - Apr 17th, 2012 at 10:31am
There are no actions to perform.  

BloodyRue 
Junior Member
**
Offline
Posts: 83


YaBB 2.5
Re: Can the avatar be linked to a members details?
I see a lot of harvester type robots blasting away at the viewprofile function. I can only assume they are attempting to gather names and email accounts to add to their lists.

I even see legitimate search engines trying too like google.
 
...    ...
WWW MVMB1  
IP Logged  
 Reply #4 - Apr 17th, 2012 at 11:52am
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Can the avatar be linked to a members details?
I've got to nip out for a while now, but I'll post up the changes to hide the email and PM links to guests when I get back...
 
 
IP Logged  
 Reply #5 - Apr 17th, 2012 at 1:51pm
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Can the avatar be linked to a members details?
Okay, to hide the PM link to guests, in Sources/Profile.pl find:

Code (Perl)Select All
    if (!$view && $user ne $username && ($PM_level == 1 || ($PM_level == 2 && $UserPM_Level{$user} > 1 && ($iamadmin || $iamgmod || $iammod)) || ($PM_level == 3 && $UserPM_Level{$user} == 3 && ($iamadmin || $iamgmod)))) { 


And replace with:

Code (Perl)Select All
    if (!$iamguest && !$view && $user ne $username && ($PM_level == 1 || ($PM_level == 2 && $UserPM_Level{$user} > 1 && ($iamadmin || $iamgmod || $iammod)) || ($PM_level == 3 && $UserPM_Level{$user} == 3 && ($iamadmin || $iamgmod)))) { 


And for the email link, find:

Code (Perl)Select All
    if (!${$uid.$user}{'hidemail'} || $iamadmin || !$allow_hide_email || $view) { 


And replace with:

Code (Perl)Select All
    if (!$iamguest && (!${$uid.$user}{'hidemail'} || $iamadmin || !$allow_hide_email || $view)) { 


Email addresses are actually encrypted so they can't be harvested anyway, but I guess it still makes more sense to hide the link.

You'll probably want to hide the 'Reply, Quote and Get Notification' buttons on the users recent posts page too.

Find:

Code (Perl)Select All
        if ($tstate != 1) { 


And replace with:

Code (Perl)Select All
        if ($tstate != 1 && !$iamguest) { 


 
 
IP Logged  
 Reply #6 - Apr 17th, 2012 at 4:39pm
There are no actions to perform.  

Bill Myers 
God Member
Beta Testers
*****
Offline
Posts: 1,482
Los Angeles


YaBB 2.4
Re: Can the avatar be linked to a members details?
Wow! I wish I could swap out my brain for Derek's when it comes to this stuff.

Amazing!  Smiley
 
Morning, noon, or night, have a great one! ...
WWW BillHMyers  
IP Logged  
 Reply #7 - Apr 17th, 2012 at 9:38pm
There are no actions to perform.  

Miss Emily 
Junior Member
**
Offline
Posts: 93


None
Re: Can the avatar be linked to a members details?
He is a clever person.

In the "Edit my Profile" area, maybe YaBB should give members the option of providing more relevant details such as their favorite books, movies, music, and basic information about themselves. I see many fields for ICQ, AIM, YIM, MSN etc which most members tend to leave blank.

With all the changes I've made to the scripts, maybe it will be impossible to upgrade YaBB if they released a new version because many of the settings may be lost.
 
 
IP Logged  
 Reply #8 - Apr 17th, 2012 at 9:50pm
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Can the avatar be linked to a members details?
Miss Emily wrote on Apr 17th, 2012 at 9:38pm:
In the "Edit my Profile" area, maybe YaBB should give members the option of providing more relevant details such as their favorite books, movies, music, and basic information about themselves. I see many fields for ICQ, AIM, YIM, MSN etc which most members tend to leave blank.

Have you not tried Extended Profiles? It allows you to do just that.

Admin Center => Forum Settings - Members tab:

Quote:
Use Extended Profiles?
If enabled, an additional item called "Profile Fields" will be shown in the sidebar to the left. There, you can add functions to the users' profiles.
Leave this unchecked if you don't use this feature to save server load!
 
 
IP Logged  
 Reply #9 - Apr 17th, 2012 at 10:47pm
There are no actions to perform.  

Bill Myers 
God Member
Beta Testers
*****
Offline
Posts: 1,482
Los Angeles


YaBB 2.4
Re: Can the avatar be linked to a members details?
Miss Emily wrote on Apr 17th, 2012 at 9:38pm:
...
With all the changes I've made to the scripts, maybe it will be impossible to upgrade YaBB if they released a new version because many of the settings may be lost.

This bit of information starting with this post about how to restore extended profiles might be of help. Or rather, if you deal with an upgrade issue, there might be a clue someone in there.

I've wanted to change to updated profiles, but I heard it can be buggy. But what the heck, right? It's worth a go I guess.

Edited:
Okay, I changed over to extended profiles, and guess what? The profiles still look the same with no added information to include. Hmmmm.

Derek Barnstorm wrote on Apr 17th, 2012 at 11:08pm:
After you've enabled them, you'll need to create your own custom fields before anything will appear.

Admin Center => Forum Configuration => Profile Fields


« Last Edit: Apr 18th, 2012 at 1:17am by Bill Myers »  
Morning, noon, or night, have a great one! ...
WWW BillHMyers  
IP Logged  
 Reply #10 - Apr 17th, 2012 at 11:08pm
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Can the avatar be linked to a members details?
Bill Myers wrote on Apr 17th, 2012 at 10:47pm:
Edited:
Okay, I changed over to extended profiles, and guess what? The profiles still look the same with no added information to include. Hmmmm.


After you've enabled them, you'll need to create your own custom fields before anything will appear.

Admin Center => Forum Configuration => Profile Fields
 
 
IP Logged  
 Reply #11 - Apr 17th, 2012 at 11:42pm
There are no actions to perform.  

Miss Emily 
Junior Member
**
Offline
Posts: 93


None
Re: Can the avatar be linked to a members details?
You're joking? Another reason why I love YaBB!

I was lost like Bill, but I figured how to do it now.
 
 
IP Logged  
 Reply #12 - Apr 18th, 2012 at 1:15am
There are no actions to perform.  

Bill Myers 
God Member
Beta Testers
*****
Offline
Posts: 1,482
Los Angeles


YaBB 2.4
Re: Can the avatar be linked to a members details?
Smiley
Derek, you're the man!
 Smiley

Okay, so I've been using YaBB since 2002 and I wasn't actually aware of extended profiles; just kind of saw it as an option, and forgot about it.

Sheesh!  Roll Eyes
 
Morning, noon, or night, have a great one! ...
WWW BillHMyers  
IP Logged  
 Reply #13 - Apr 18th, 2012 at 1:26am
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Can the avatar be linked to a members details?
No problem, Bill. Smiley

Extended Profiles wasn't actually added until 2.3 (2008) - it only existed as a mod before that, and it can be easily missed unless you know it's there.
« Last Edit: Apr 18th, 2012 at 1:28am by Derek Barnstorm »  
 
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.