Quick Question About Ranks »  Show posts from    to     

Icy Phoenix


Old Support Topics - Quick Question About Ranks



Vortex [ Sat 28 Oct, 2006 12:47 ]
Post subject: Quick Question About Ranks
In my old forum (Invision) there was the possibility to let users choose a rank by themself. Withouth image, in personal cp they could set a "personal title" to appear just under the avatar.

In phpBB I didn't find this possibility, does anyone know a mod capable to do that?


Mighty Gorgon [ Sun 29 Oct, 2006 12:25 ]
Post subject: Re: Quick Question About Ranks
It is possible using Shop Mod... or more simply by creating a customized field in ACP and let the user fill it.


Vortex [ Sun 29 Oct, 2006 12:30 ]
Post subject: Re: Quick Question About Ranks
I tried adding a customized field, the only ugly thing is that it puts the title of the field... I'll try this shop mod and let you know


Mighty Gorgon [ Sun 29 Oct, 2006 17:49 ]
Post subject: Re: Quick Question About Ranks
Vortex wrote: [View Post]
I tried adding a customized field, the only ugly thing is that it puts the title of the field... I'll try this shop mod and let you know

He he he... but you may even create a new position for Custom Profile Fields and not inserting the Field description.

If you have a little knowledge of PHP you should be able to do this in few minutes.

Just copy what has been done for other positions.


Vortex [ Sun 29 Oct, 2006 18:03 ]
Post subject: Re: Quick Question About Ranks
I don't have any knowledge of php But if you give me a shot of what the code should be I can try


Mighty Gorgon [ Mon 30 Oct, 2006 21:43 ]
Post subject: Re: Quick Question About Ranks
Vortex wrote: [View Post]
I don't have any knowledge of php But if you give me a shot of what the code should be I can try

Dai uno sguardo a questo file: functions_profile_fields.php.

Qui vengono generati i campi personalizzati... basta rimuovere l'etichetta nel campo autore e spostarlo nel template dove vuoi tu!


Vortex [ Mon 30 Oct, 2006 23:50 ]
Post subject: Re: Quick Question About Ranks
Mighty Gorgon wrote: [View Post]
Vortex wrote: [View Post]
I don't have any knowledge of php But if you give me a shot of what the code should be I can try

Dai uno sguardo a questo file: functions_profile_fields.php.

Qui vengono generati i campi personalizzati... basta rimuovere l'etichetta nel campo autore e spostarlo nel template dove vuoi tu!


Uau addirittura in italiano


Scusami, ci ho provato, ma non sono riuscito a capire come fare... quale parte di codice devo eliminare? In quale file trovo il template che genera il profilo accanto al post?



Does anybody know which template generates user's informations next to the post?


Vortex [ Fri 03 Nov, 2006 10:45 ]
Post subject: Re: Quick Question About Ranks
Ok, solved as follows:


From includes/functions_profile_fields.php I found the function that generates profile fields:


Code: [Hide]
  1. if($location == AUTHOR)  
  2. {  
  3. //$cp_udata_cache[$id]['author'][] = ($profile_names[$name]) ? $name . ': ' . $profile_names[$name] : '';  
  4. $cp_udata_cache[$id]['author'][] = ($profile_names[$name]) ? $field_name . ': ' . $profile_names[$name] : '';  



And I cut the variable $field_name which shows the profile name:


Code: [Hide]
  1. if($location == AUTHOR)  
  2. {  
  3. //$cp_udata_cache[$id]['author'][] = ($profile_names[$name]) ? $name . ': ' . $profile_names[$name] : '';  
  4. $cp_udata_cache[$id]['author'][] = ($profile_names[$name]) ? $profile_names[$name] : '';  





Then in templates/ca_aphrodite/viewtopic_body.tpl I moved the code that generates the field, forcing it to appear just under the avatar. I took


Code: [Hide]
  1. <!-- BEGIN author_profile -->  
  2. {postrow.author_profile.AUTHOR_VAL}<br />  
  3. <!-- END author_profile -->  



and put it just after


Code: [Hide]
  1. <!-- BEGIN switch_showavatars -->  
  2. <span class="post-images"><a href="javascript:quotename('[b]{postrow.POSTER_NAME_QQ}[/b],')">{postrow.POSTER_AVATAR}</a></span>  
  3. <!-- END switch_showavatars -->  
  4. <div class="post-details">  




Then, in order to make it similar to Invision, I centered it and separated it from other informations just using html tags <center> e <br />


Code: [Hide]
  1. <!-- BEGIN author_profile -->  
  2. <center>{postrow.author_profile.AUTHOR_VAL}</center><br /><br />  
  3. <!-- END author_profile -->  





Wasn't so difficult, was it?


moreteavicar [ Fri 03 Nov, 2006 12:28 ]
Post subject: Re: Quick Question About Ranks
See... you could do it


Mighty Gorgon [ Sat 04 Nov, 2006 01:42 ]
Post subject: Re: Quick Question About Ranks
He he he... I think that someone helped him!


Vortex [ Sat 04 Nov, 2006 09:47 ]
Post subject: Re: Quick Question About Ranks




Powered by Icy Phoenix