News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom Profile Field Mod

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

Previous topic - Next topic

Kindred

I don't know...   I didn't make the mod and have not looked closely enough at the code to determine that.   I just pointed out the common denominator in the error messages and hope the author of the mod can figure out what's different about utf-8 installations.
Сл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."

rlyons

I believe I fixed it simply by selecting "english" instead of "english-utf-8" in 'server settings'. Thanks for pointing me in the right direction.

onfulltilt

Quote from: rlyons on March 25, 2007, 12:59:51 PM
I believe I fixed it simply by selecting "english" instead of "english-utf-8" in 'server settings'. Thanks for pointing me in the right direction.

rlyons, you rock.  After banging my head against my computer for a couple of weeks now this simple fix actually worked.  I was able to install this mod as well as the ad management mod in a couple of minutes.  I haven't actually test them yet but at least I have access to their control panels.  It's absolutely great when things can be fixed so easily (at least once someone informs you what the fix is).
Thanks,
Alex

123kid

hello to all and to the mod creator

the mod works fine now but my theme which is black day has a profile.template.php which i couldnt edit previous joined members that still havent made used of this mod.

could you guyz point me out on what to edit in it!!! it seems that i had no idea on the modifications on where and what to put so i could edit members profile on my new added field

any help is highly appreciated

tia!!!

floydpink

#1084
Somehow, whilst reinstalling the mod afer a 1.1.2 upgrade, I have ended up with duplicate custom fields display.
In Features + Settings / Custom Profile Fields, there are only 2 custom fields displayed (name + school).
During registration, the user is asked to enter the fields twice (name, school, name , school) but the 2nd set of input is used to populate the custom fields.
In a user's profile the 2 custom fields are both displayed twice (name, school, name, school).

It look like only 1 set of data is being stored, but code is present to display the fields twice.

I can't track down where the display of the fields takes place - can anyone point me in the right direction so that I can check the code or tell me how I can I remove one set of display fields?
Many thanks

Kindred

floydpink -   profile.template.php and register.template.php.   If you have double installs in those, however, you likely have duplicated code in other files as well. The other duplicated code may cause more errors than just double-displaying the custom fields.

123kid,
Go to admin > packages ? list the files in this mod > Open the install.xml or other similarly named file...
In that file it lists the mode instructions on what needs to be added or replaced in what files.

please read here
Сл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."

alisoncc

#1086
Selecting "english" instead of "english-utf-8" in 'server settings' did it for me too, after lots of time spent digging around. So the fix has been highly appreciated.

Having now got Custom Profile Fields mod to work, would appreciate suggestions as how to increase vertical size of text box on registration form, so new applicants can enter their details. Making it a multiple line word-wrap style entry. Thanks

Is it also possible to change the permissions on Custom Profile Fields such that Global Moderators can view and edit besides just the Admins, without giving general access.

Alison

floydpink

#1087
Quote from: floydpink on March 27, 2007, 05:40:31 AM
Somehow, whilst reinstalling the mod afer a 1.1.2 upgrade, I have ended up with duplicate custom fields display.
In Features + Settings / Custom Profile Fields, there are only 2 custom fields displayed (name + school).
During registration, the user is asked to enter the fields twice (name, school, name , school) but the 2nd set of input is used to populate the custom fields.
In a user's profile the 2 custom fields are both displayed twice (name, school, name, school).
It look like only 1 set of data is being stored, but code is present to display the fields twice.
This was resolved by removing duplicate code in the following files (the search string needed to locate the duplication is in brackets - just in case anyone else needs to do the same thing later):
$sourcedir/ModSettings.php (modifyprofilesettings; cp_cpfields; customprofile)
$themedir/Profile.template.php (customprofile)
$themedir/Display.template.php (postspic; customprofile)
$themedir/PersonalMessage.template.php (postspic; customprofile)
$themedir/Register.template.php (customprofile)

I can only guess that the duplicate code was left behind when a mod uninstall was cancelled before it had finished. ::)

miken

Quote from: paulthai on March 13, 2007, 07:43:55 PM
Quote from: paulthai on March 12, 2007, 12:14:21 PM
How can I get the information creating by Custom Profile Field?

Such as, the value of field CP1

Please show me the code....

I try by created the ssi_showprofiles in SSI.php.

Thank you....


function ssi_getprofiles()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt , $sourcedir;

require_once($sourcedir . '/CustomProfile.php');


for ($i = 1; $i < 21; $i++)
{

             // This try to show the custom Profile Field.
echo ' ' . $modSettings['CP' . $i . '_name'] . ': ' . $modSettings['CP' . $i . '_???????] .  '<br>';

}



}


Help me Please.......

I've just been having the same problem. But from looking through it it seems it also needs $context['members']['options'] setting to global $options

function ssi_customfields()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt , $sourcedir;

require_once($sourcedir . '/CustomProfile.php');
$context['member']['options'] = $options;

for ($i = 1; $i < 21; $i++)
{
if ($modSettings['enable_CP' . $i . ''] && isset($context['member']['options'][$modSettings['CP' . $i . '_id']]) && !empty($context['member']['options'][$modSettings['CP' . $i . '_id']]) && $modSettings['CP' . $i . '_profile'])
{
echo $modSettings['CP' . $i . '_id'] . ': ';
echo $context['member']['options'][$modSettings['CP' . $i . '_id']];
}
}

}


Is working for me :D

paulthai

Thank you Mr.miken

I found that problem. The $context is my problem too. I fix it already but another way.

Thank you so much,
Paul

shumilica

Hellow everyone :)
Great mod this one... but I have a suggestion:


Can it be a check box in the search members option for each custom fields?
If i have a custom field named ,,year" to have the options to check ,,search by year"...
Can this be possible?

And one more suggestion...
Is it possible that some custom fields to appear in the sorting page of the member list so that I can sort by number or by alphabet?


Do you understand what are my suggestions?  :-\
Thanks in advance for any answers

Today, if you're not confused it means you're not thinking clear!

Kindred

adding this to the search would be fairly intensive...

and adding it to the member list is also difficult (among other reasons: because you don't necesarrily know the width of the fields...)
Adding it to the memberlist and sortable is even more complicated.
Сл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."

shumilica

 :o :o :(
ok...
what could be easy in this case?

Let me explain: my forum is for students from a faculty... and i let them choose, through custom fields, in what year they are (first custom field -dropdown) and what group they are(second custom field - dropdown). I want them to be able to search somebody from a year or from a specific group, so that they can find their colleagues from their year or group...
This is why I want this feature for this mod...
Do you suggest any other solution?

What kind of modifications will be? just php or php+sql? I am thinking to start learning php more instensive :)
Today, if you're not confused it means you're not thinking clear!

Kindred

adding searhc functions would have to be php + SQL...
Сл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."

perplexed

I am trying to add a CP field that displays a link to member gallery,
however the only way I can get it to work currently is to enter the member number.

That works but obviously members will have to find their member number, so it would be better if they could enter their name.  Plus on posts it only shows Gallery:  143 <--- member number,where I would like it to say name or just click here

any ideas how to achieve this?

http://www.mysite.com/forum/index.php?action=gallery;sa=myimages;u=%1

Or can I use CP field to just add a link on posts/profile that takes to the above url and requires no input?

I'm sure I'm missing something simple


Kindred

This is not a correct use of the Custom Profile fields, IMO

The link to a user's gallery is fixed, not information that a user should enter.

If I recall correctly, Goosemoose posted a way to modify display.template.php to add a gallery link to the user's coppermine gallery.
Сл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."

perplexed

actually I think I remember that, I will go search for it again. 

My thoughts for using it as a CP field were that if a member didnt enter the field then it wouldnt display on the posts/profile, rather than have the link display for everyone even if they have no gallery images

Thanks Kindred

calv

Hi,
May be a dumb q? Is it possible to use the exsisting field members."location" Id like to make this compulsory for new members. I already have is showing under the users details when they post, just like to make sure all new members fill the field in...

thanks!

Kindred

that is not what this mod does...

to modify an existing field, you will have ot modify the code on your own...
Сл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."

LowBear

Probably a silly question, but I installed the mod, no errors but I can't find a place to set settings or whatsoever, not under options and features or so, what do I do wrong here ?

thanks :)

Advertisement: