News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Custom Profile Field Mod

Started by winrules, March 30, 2006, 02:21:25 PM

Previous topic - Next topic

hcfwesker

I'm having no trouble with this mod, but I know there's a way to edit something.

I'm on SMF1.1.11

I want it so the NAME of the custom profile field, and the colon " :  "  do not show up in mini profiles.

EX.  The NAME of one of mine is Brawl Friend Code

So, naturally, it displays in mini-profile as  ...

Brawl Friend Code:  ####-####-####

I just want the title NAME of the profile field removed from the mini profile, so it only display what the member put into that field.


hcfwesker

Quote from: hcfwesker on March 12, 2010, 01:18:45 AM
I'm having no trouble with this mod, but I know there's a way to edit something.

I'm on SMF1.1.11

I want it so the NAME of the custom profile field, and the colon " :  "  do not show up in mini profiles.

EX.  The NAME of one of mine is Brawl Friend Code

So, naturally, it displays in mini-profile as  ...

Brawl Friend Code:  ####-####-####

I just want the title NAME of the profile field removed from the mini profile, so it only display what the member put into that field.

Not sure what the bump rule is, but I know it's been over 24 hours.  Really need help on this :(

hcfwesker

#2882
Ok.  I got the above to work, so disregard my posts before this one.   I'm on SMF 1.1.11

How can I change this option ... Text to display before field (BBC is ok if enabled above)

I want the text or BBC image to display ABOVE the field members input.  So what they enter in their edit profiles, Actually Displays below the text (BBC image)

And, also, the "Selection" option does not work in my AdminCP for this feature.  ( for drop down box options)  I've checked and rechecked my php files, and didn't find an errors.





Kindred

you would have to edit the display.template.php code that reads out the custom field
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hcfwesker

Well, I'm kinda brand new at this :(  I attached the codes that this package adds, if you could please tell me what line needs to be edited.  I tried randomnly placing a <br /> tag throughout, but always came back with errors.


<a href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['label'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . $message['member']['online']['label'] . '" border="0" />' : $message['member']['online']['label'], '</a>';
DisplayFieldPostsPictures();



global $sourcedir, $messagevars;
$messagevars = $message;
require_once($sourcedir . '/CustomProfile.php');
DisplayFieldPosts();

// Show how many posts they have made.

web5

Quote from: bhaveshtolia on February 28, 2010, 11:05:54 AM
Hi All,

Shttp://www.simplemachines.org/community/Smileys/default/smiley.giforry to seem naive and all but i have installed this mod and am unable to find the option where it has been enabled.

It has been installed successfully on my website. However i am unable to find the option under Features and Options.

Advise where to activate it ...

Hi there

Having the same problem as several other users. Have installed mod in version 1.1.11. (Have also manually checked each file) - all installed correctly. Using Default Theme and English Language.

Tab is not showing under 'Features and Options'. Using direct link to tab...

index.php?action=featuresettings;sa=profile

...opens the tab, but it is blank with only a SAVE button.

Sounds like a great mod - would really like to use. Does anyone have a fix?

Thanks
Tim

Kindred

I am betting you are not actually using English, but rather are using English UTF-8 (which is not the same thing)


hcfwesker, I was wrong... you'll have to edit DisplayFieldPosts in CustomProfile.php'
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hcfwesker

I've looked, and I'm lost :(  Here's that portion of the code, though.  If you, or anyone can help me on this.


function DisplayFieldPosts()

{
global $context, $modSettings, $messagevars;
$i = 1;
while (isset($modSettings['enable_CP' . $i . '']))
{
if ($modSettings['enable_CP' . $i . ''] && isset($messagevars['member']['options'][$modSettings['CP' . $i . '_id']]) && !empty($messagevars['member']['options'][$modSettings['CP' . $i . '_id']]) && $modSettings['CP' . $i . '_post'])
{
if ($modSettings['CP' . $i . '_view'] && !$context['user']['is_admin'])
{
$i++;
continue;
}
if ($modSettings['CP' . $i . '_type']=='text' || $modSettings['CP' . $i . '_type']=='textarea')
{
if ($modSettings['CP' . $i . '_post']!='text')
{
$i++;
continue;
}
$before = preg_replace('/%1/', $messagevars['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data1']);
$after = preg_replace('/%1/', $messagevars['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data2']);
if ($modSettings['CP' . $i . '_bbc'])
{
$field = parse_bbc($before . $messagevars['member']['options'][$modSettings['CP' . $i . '_id']] . $after);
}
else
{
$field = $before . $messagevars['member']['options'][$modSettings['CP' . $i . '_id']] . $after;
}
echo '
' . $field . '<br />';
}
if ($modSettings['CP' . $i . '_type']=='select')
{
if ($modSettings['CP' . $i . '_bbc'])
{
$field = parse_bbc($messagevars['member']['options'][$modSettings['CP' . $i . '_id']]);
}
else
{
$field = $messagevars['member']['options'][$modSettings['CP' . $i . '_id']];
}
echo '
' . $modSettings['CP' . $i . '_name'] . ': ' . $field . '<br />';
}
if ($modSettings['CP' . $i . '_type']=='check')
{
if ($modSettings['CP' . $i . '_bbc'])
{
$modSettings['CP' . $i . '_data1'] = parse_bbc($modSettings['CP' . $i . '_data1']);
$modSettings['CP' . $i . '_data2'] = parse_bbc($modSettings['CP' . $i . '_data2']);
}
if ($messagevars['member']['options'][$modSettings['CP' . $i . '_id']])
{
echo '
' . $modSettings['CP' . $i . '_name'] . ': ' . $modSettings['CP' . $i . '_data1'] . '<br />';
}
else
{
echo '
' . $modSettings['CP' . $i . '_name'] . ': ' . $modSettings['CP' . $i . '_data2'] . '<br />';
}
}
}
$i++;
}
}


hcfwesker

#2888
Yay, I found it through so much Trial & Error

Under CustumProfile.php  , under the heading DisplayFieldPosts

            }
            $before = preg_replace('/%1/', $messagevars['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data1']) . '<br />';
            $after = preg_replace('/%1/', $messagevars['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data2']);
            if ($modSettings['CP' . $i . '_bbc'])

I seen that  . '<br />'  used elsewhere and gave it a shot anywhere I seen CP1, or data 1, since that's the first field I customized.

Kindred

you could also put it here
echo '                  ' . $modSettings['CP' . $i . '_name'] . ':<br />' . $modSettings['CP' . $i . '_data1'] . '<br />';
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

nza2k

Hi,

I installed this mod on my SMF and the configuration panel disappeared from the options and settings admin page when I upgraded SMF from 1.1.5 to 1.1.11.

I guess I have to replace some code in the sources or themes files, but where ?

Thanks for your help
Avis sur les voyagistes dans le forum de Voyage-Net, propulsé par SMF depuis des années :)

Storm3y

Greetings,

I'm currently using this on my forums and I'm wondering if it's posable to have different sections in the profile for example;

Game Usernames:
Battlefiled Username: TextBox
Call of Duty Username: TextBox

Other Usernames:
Tournament Users TextBox

I'm running RC2

Thansk :)

Kindred

why are you using this with 2.0?   The functionality is standard in 2.0
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Storm3y

I think it came with it actually. If I remember correctly I just had to enable it.

Kindred

if that is so, then the smf 2.0 basic feature is NOT the same as this mod.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hcfwesker

#2895
I'm on SMF 1.1.11

The fields work great and all, but none of the added custom field appear in the member's profile page.  they work fine on all pages, excect being displayed on that member's profile summary page.

Anything extra I need to do?

EDIT: 

Just realized the Ultimate Profile code may have conflicted with the regular profile display. 




-Thorworx-

There is a problem with the modification.xml script.

<add><![CDATA[
'profile' => 'ModifyProfileSettings',
);


You need to get rid of the trailing comma after 'ModifyProfileSettings',  because you are inserting this as the LAST item of the array - otherwise ModSettings.php will not display at all.

Ideally, you want to include the CR/LF in your search and replace it with ,CR/LF then the code if possible (I'm not a php guy).

There are several places where this was an issue in my ModSettings.php file after I installed, so I had to go in and edit the file by hand.

I think this is also why the button is not showing up for some people.

After I fixed the comma, the mod is now working fine.

HTH

euroslob

Just tried installing this mod by uploading the file to 1.1.11.

Although Package Manager states it was successful it doesn't seem to have altered anything!

Do I have to load this manually?



euroslob

Just sorted it!  :) Language to English!

Next question: can I now add another field in the registration page?

Rgds E.S

perplexed

Quote from: euroslob on March 25, 2010, 11:07:10 AM
Just sorted it!  :) Language to English!

Next question: can I now add another field in the registration page?

Rgds E.S

do you mean in general?  Then yes.  Just select that you want to add the field to the registration page and indicate whether you want it to be compulsory or not :)

Advertisement: