News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Title location

Started by Night09, February 22, 2008, 05:09:00 AM

Previous topic - Next topic

Night09

Does anyone know where the forum stores the 'custom title' data specifically the ref url ?

I am making a small addon which lists all the forum signatures in a block if you have one but i dont know where smf actually stores the link in ref to the user.

I have made the block and can manually add then but i want to try and make it automatic by looking at the sig data and linking using that.

Its just some smf practice tbh but i would like to know where to look to try. :)

Rumbaar

Taken from the Display.template.php file that generates the custom titles in post view:
// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
echo '
', $message['member']['title'], '<br />';
That should help you?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Night09

Thanks this should come in handy.

I knew which table the url was stored on but didnt know how to get the data out of it so i should be able to work something from this now i think.

Rumbaar

You might also want to look at the sources/Loads.php file


'title' => !empty($modSettings['titlesEnable']) ? $profile['usertitle'] : '',

and sources/Profile.php
'title' => !isset($user_profile[$memID]['usertitle']) || $user_profile[$memID]['usertitle'] == '' ? '' : $user_profile[$memID]['usertitle'],
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Night09

Thanks for posting that.

Im not the best with smf really but the main reason the data needs to be drawn on directly is each signature on the site has an automatic update from its link.

So if a characters stats change the link shows this as you most likely know anyway.

With guild members changing it will be acting as a call to the member list for the relevant urs's then using its link profile direct from the site.

I have the module working correctly if i manually add the right url but i want it to be autonomous generation based on current signatures stored.

I will also have to add a section of code to the admin profile so the x,y size can be set to suit the required size for the box width ect.

It isnt really going to be anything good but i am doing it just to build up some extra experience coding from scratch for php because since using smf i cant stop playing with it.  ;)

Advertisement: