Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic User Age in Message View V1.1 for YaBB 2.4 (Read 6156 times)
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
User Age in Message View V1.1 for YaBB 2.4
Apr 15th, 2009 at 2:55am
Print Post  
User Age in Message View V1.1

Description:
This mod will add users age in message view if the birthdate field is filled out.
You can enable/disable this option in Admin Center.

Credits:
Thanks to pyragony for the German and German_Du tranlations.

Screenshots:
Message View:


User CP:


Admin Center - Forum Settings - Show / Hide Items:


Zip package:
User_Age_in_Message_View_V1_1.mod
User_Age_in_Message_View_V1_1_German.mod
User_Age_in_Message_View_V1_1_German_Du.mod

Installation:
1) Modify YaBB files using BoardMod or manually.
2) Load modified files to your server in ASCII mode.

Files to edit:
Admin/ModList.pl
Admin/NewSettings.pl
Admin/Settings_Main.pl
Languages/English/Admin.lng
Languages/English/Display.lng
Sources/Display.pl
Sources/MyCenter.pl
Templates/default/Display.template
Templates/default/MyCenter.template
Templates/yabb21/Display.template
Templates/yabb21/MyCenter.template

Mod History:
Version 1.0 - User Age in Message View - First Release - 6th January 2009
Version 1.1 - Upated for YaBB 2.4 - 15th April 2009
  
Back to top
 
IP Logged
 
Greydane
New Member
*
Offline


I Love YaBB 2!

Posts: 18
Joined: Feb 22nd, 2012
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #1 - Jan 14th, 2013 at 8:15pm
Print Post  
Hi Derek:  I seem to be having an issue with the user age mod.  The age does not appear in the messgae view, but does appear in the user cp.  Initially, I had a problem with step 9, MyCenter.pl in boardmod (attachment Error_step_9); however, I changed the search text as per (attachment MyCentre_search).  The mod loaded properly, but the issue remains.  If you have time, it be great if you could lead me in the right direction.  Attachment (Installed_mods ) lists the mods that are on the forum version 2.4.  Perhaps, one of them is causing an issue.

Thanks Bruce Hall
  

MyCente_search_changet.txt ( 0 KB | Downloads )
Intalled_Mods_Yabb_24.JPG ( 216 KB | Downloads )
Intalled_Mods_Yabb_24.JPG
Error_Step_9.JPG ( 54 KB | Downloads )
Error_Step_9.JPG
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #2 - Jan 23rd, 2013 at 4:19am
Print Post  
Hi Bruce,

Sorry about the late reply - I was distracted with 'life stuff' last week.

It's hard to tell. If you attach your MyCenter.pl here for me, I'll take a look for you.
  
Back to top
 
IP Logged
 
Greydane
New Member
*
Offline


I Love YaBB 2!

Posts: 18
Joined: Feb 22nd, 2012
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #3 - Jan 24th, 2013 at 2:59am
Print Post  
Hi Derek:  Thanks for the help.  Attached is a copy of the MyCentre.pl file from the Sources dir.  The Capture attachment shows that age is displaying in the user CP.

Bruce Hall
  

MyCenter.txt ( 100 KB | Downloads )
Capture.JPG ( 115 KB | Downloads )
Capture.JPG
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #4 - Jan 24th, 2013 at 4:11am
Print Post  
Oops, sorry - I read your post wrong. I thought you meant the other way around, that it wasn't displaying in the User CP and was in the Message View.

Did you add the YaBB tag '{yabb age}' to your Display.template file? The mod only adds it to the included templates (yabb21 and default), so if you are using a different template it will need to be added to that too:

Code
Select All
<edit file>
Templates/default/Display.template
</edit file>

<search for>
       {yabb gender}
</search for>

<add before>
       {yabb age}
</add before> 

  
Back to top
 
IP Logged
 
Greydane
New Member
*
Offline


I Love YaBB 2!

Posts: 18
Joined: Feb 22nd, 2012
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #5 - Jan 24th, 2013 at 4:52am
Print Post  
Hi Derek:  Wow! thanks for the quick reply.  I appreciate it. Yes, I am using the default Template.  I have attached it for your perusal.

Thanks Bruce
  

DisplayTemplate.txt ( 6 KB | Downloads )
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #6 - Jan 24th, 2013 at 5:11am
Print Post  
That all looks okay, so it must be an issue with Display.pl - double check all of the edits or attach it here - bed time here in the UK now though, so I won't get chance to look at it until tomorrow...
  
Back to top
 
IP Logged
 
Greydane
New Member
*
Offline


I Love YaBB 2!

Posts: 18
Joined: Feb 22nd, 2012
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #7 - Jan 24th, 2013 at 5:36am
Print Post  
Hi Derek:  I checked the edits and it looks good.  I have attached as a txt file.

Thanks Bruce
  

Display_Sources.txt ( 63 KB | Downloads )
Back to top
 
IP Logged
 
Greydane
New Member
*
Offline


I Love YaBB 2!

Posts: 18
Joined: Feb 22nd, 2012
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #8 - Jan 24th, 2013 at 3:37pm
Print Post  
Hi Derek:  I got it figured out with your guidance. The original script put the code in Display.pl like this:

Code
Select All
template_postinfo = qq~$display_txt{'21'}: ${$uid.$musername}{'postcount'}<br />~;
			&CalcAge($musername, "calc");
			$template_age = qq~$display_txt{'userage'}: $age<br />~ if $age && $showuserage;
			} else {
			$template_postinfo = qq~$display_txt{'21'}: <a href="$scripturl?action=usersrecentposts;username=$useraccount{$musername}" title="$display_txt{'22'}">${$uid.$musername}{'postcount'}</a><br />~;
			} 



When I modified the placement like this, all was good.

Code
Select All
$template_postinfo = qq~$display_txt{'21'}: ${$uid.$musername}{'postcount'}<br />~;
			} else {
			$template_postinfo = qq~$display_txt{'21'}: <a href="$scripturl?action=usersrecentposts;username=$useraccount{$musername}" title="$display_txt{'22'}">${$uid.$musername}{'postcount'}</a><br />~;
			&CalcAge($musername, "calc");
			$template_age = qq~$display_txt{'userage'}: $age<br />~ if $age && $showuserage; 



I guess one of the other Mods screwed something up.  It was just a trial and error thing.  Really don't have a clue what's going on.  I think I may have a similiar problem with Carsten's Add/Delete Moderator Mod, so it gives me an area to check.

Thanks very much for the help Derek.  I really appreciate your great Mods.

Bruce
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: User Age in Message View V1.1 for YaBB 2.4
Reply #9 - Jan 24th, 2013 at 3:59pm
Print Post  
Glad you sorted it, Bruce, and you're very welcome.

It looks like it was the 'Last 5 Posts in Message View' mod which was conflicting with it, but you've fixed it correctly. Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint