Profile -- Special Titles

15 years 10 months ago #65902 by zacharyyoung
Replied by zacharyyoung on topic Re:Profile -- Special Titles
Okay, got it. I tried out your meathod. I'm sorry top day that it didn't go exactlly, well, work, lol. I'll post some screenshots in a sec.

Please Log in to join the conversation.

15 years 10 months ago #65908 by zacharyyoung
Replied by zacharyyoung on topic Re:Profile -- Special Titles
Here we go. I'm not sure what happened or anything, but this is the result.

Please Log in to join the conversation.

15 years 10 months ago #65919 by dping28
Replied by dping28 on topic Re:Profile -- Special Titles
Hmmm I just realized that the field delimiter it self cant be changed per user. BUT I may have a work around.

Post edited by: dping28, at: 2008/06/17 07:44

-D

CB Testteam member

Please Log in to join the conversation.

15 years 10 months ago #65920 by dping28
Replied by dping28 on topic Re:Profile -- Special Titles
BTW That pic shows the CB 1.1 ver of the avatar are you running 1.1 or 1.2? This will only work with 1.2.

Ok first thing you need to do is download this file to your computer and open it in notepad:

/components/com_comprofiler/plugin/language/default_language/default_language.php

scroll all the way to the bottom and add the following line of code all by it self, with nothing infront or after it:
[code:1]DEFINE ('_UE_EMPTY_STRING','');[/code:1]

Save that file, now upload it back to your server to the same place.

Once that is done log into your admin backend and go to Components > Community Builder > Field Manager

Now you need to add 2 new fields. One that supplies the title and one to display it. Lets start with the Title supplier.

Create a New Field.
Type: Text Field
Tab: (Anywhere you want)
Name: cb_specialtitle
Title: Special Title
Default Value: _UE_EMPTY_STRING
(That will make everyone not have a title until you specify it)
Required: No
Show on Profile: No
Display Field Title on Profile: No
Searchable in User-lists: No
User Read-Only: Yes
(Very important as the user will see this field when updating thier profile but this prevents them from editting it)
Show at registration: No
Published: Yes

Now save that field. Ok now we need to make the last field - the display field.

Create a New Field.
Type: Fields Delimiter
Tab: (Anywhere you want)
Name: cb_displaytitle
Title: _UE_EMPTY_STRING
Description: [code:1]<span class="UserTitle1"> [cb_specialtitle] </span>[/code:1]
(The [cb_specialtitle] imports that users title from the previous field into the html)
Required: No
Show on Profile: Yes: On 2 lines
Display Field Title on Profile: No
Searchable in User-lists: No
User Read-Only: Yes
Show at registration: No
Published: Yes

Now it should display a blank line where you placed that field. You can now goto Components > Community Builder > User Management and click a specific user and edit the Special Title field and erase the _UE_EMPTY_STRING and set the title for that user.

Now to format that title open your templates CSS file (Do the same thing you did to edit the language file)
*For joomlas default template which is shown in your screen shot you want to download the file:
/templates/rhuk_milkyway/css/template.css

Open this file up with notepad, again scroll all the way to the bottom and paste the following code by it self:

[code:1] .UserTitle1 {
font-size:6px;
font-weight: bold;
color: #ffcb99;
}[/code:1]

Again you will want to research CSS to find the specific formatting you want for the title. Just replace everything between the { }'s with what you want. make sure each one is ended with a ;

Well that should get you your special titles. At least thats how I could figure to do them. Maybe someone a little more knowledgable may chime in and say a easier way. Hope this helps!

Post edited by: dping28, at: 2008/06/17 08:19

-D

CB Testteam member

Please Log in to join the conversation.

15 years 10 months ago #65935 by dping28
Replied by dping28 on topic Re:Profile -- Special Titles
Just realized theres a big flaw with that - When you are logged in as a user when they view other users profiles they see their own special title on all other profiles. so If your users can only see their profile its ok otherwise this wont work. If you allow them to see other profiles your only option i can think of is just a plain text field which means no formatting of html.

-D

CB Testteam member

Please Log in to join the conversation.

15 years 10 months ago #65963 by videoandfun
Replied by videoandfun on topic Re:Profile -- Special Titles
[code:1]
function getDisplayTab($tab,$user,$ui) {
global $ueConfig;
// Display user's name + "Profile Page"
$params
=
$this->params;
$title
=
cbReplaceVars( $params->get( 'title', '_UE_PROFILE_TITLE_TEXT' ), $user );
$name
=
getNameFormat( $user->name, $user->username, $ueConfig );
$usertype = $user->usertype;

$return
=
'<div class="contentheading" id="cbProfileTitle">' . sprintf( $title, $name ) . ' (' . $usertype . "«»)</div>\n";

$return
.=
$this->_writeTabDescription( $tab, $user );
return $return;
}
}
[/code:1]

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.194 seconds

Facebook Twitter LinkedIn