Custom Profile Field Mod

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

Previous topic - Next topic

clintmyster

I'm having a problem where every time I try to change the name of the field, it remains as "unnamed field". Attached is my modsettings.php file.

AceTW

Quick question about this mod.  I see it's not listed as being compatible with 1.1.12, but I decided to go ahead and give it a shot.  (If it fails, just uninstall, right?) I backed up the files about to be modded, installed it (successfully) but do not get any indication in the admin section (Features and Options) that it's active or installed.

Has anyone come up with this before?

mcrat

^^ I just installed this mod fine, and I'm running 1.1.12. It should say "Custom Profile Fields" in the menu in Features and Options (or try this link - xxxxxx/index.php?action=featuresettings)

I just wanted to pop in and say thanks for the cool mod. I run a gaming forum and wanted something that let people choose what games they were playing at the moment and this mod seemed like it could do what I wanted. With a tiny bit of tweaking I was able to remove the bits I didn't want to see and customise the layout. Was a fun exercise trying not to break anything, and it worked :D

Thought I'd add some screens as well to maybe give people other ideas of what they could do-



Might become a bit of a nightmare as I keep adding games, but will cross that bridge when I come to it.

sharks

My problem is that i want to get rid of the ":" in front of the image in the profiles of some of my members without any title/description. Can anyone help? I am using SMF 1.1.12 with default theme.

mcrat

That's in the CustomProfile.php file.

Find the DisplayFieldPosts() function and then find the if statement which corresponds with the type of custom profile you chose. For example if you are using a select box and want to remove the ":", find the if statement that ends in =='select' within the DisplayFieldPosts() function. It looks like this-

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 />';
         }

Then simply delete the ":" which I've highlighted in red above (leave the quotation marks, just simply delete : ). You will then also need to do this within the DisplayFieldsProfile() function as well.

If you're not using select box, just find the if statement for the one you need. Hope that helps.

AceTW

Quote from: mcrat on January 19, 2011, 08:24:55 AM
^^ I just installed this mod fine, and I'm running 1.1.12. It should say "Custom Profile Fields" in the menu in Features and Options (or try this link - xxxxxx/index.php?action=featuresettings)

Well this is just odd.  I uninstalled and reinstalled and everything went smoothly, but still nothing in the "Features and Options" section of the admin.  I've tried all of the installed themes (thought the core theme would be a shoe-in) and it's just not there.

Frustrating I tell ya....

hcfwesker

Quote from: AceTW on January 21, 2011, 08:45:24 PM
Quote from: mcrat on January 19, 2011, 08:24:55 AM
^^ I just installed this mod fine, and I'm running 1.1.12. It should say "Custom Profile Fields" in the menu in Features and Options (or try this link - xxxxxx/index.php?action=featuresettings)

Well this is just odd.  I uninstalled and reinstalled and everything went smoothly, but still nothing in the "Features and Options" section of the admin.  I've tried all of the installed themes (thought the core theme would be a shoe-in) and it's just not there.

Frustrating I tell ya....

Try changing your forum language under  Admin > Server Settings > "Default Forum Language".  Make sure the default is set to English, not English-utf8 (something like that).

I had this problem awhile back, and that fixed it.  Not sure if it'll do the same for you.  but worth a try.  Unless your default language is already set to English.

AceTW

Ok, stranger still.  It's set to English-UTF8, but the only options in there are English, French and German, all UTF8 versions....

Quote from: hcfwesker on January 21, 2011, 08:51:14 PM
Try changing your forum language under  Admin > Server Settings > "Default Forum Language".  Make sure the default is set to English, not English-utf8 (something like that).

I had this problem awhile back, and that fixed it.  Not sure if it'll do the same for you.  but worth a try.  Unless your default language is already set to English.

hcfwesker

There is "no" option for just plain "English"????

That's going to be the problem, since the language file for this MOD,  CustomProfile.english.php , is looking for the "English" file.

You can rename the file name to, under  themes/default/languages/CustomProfile.english.php    to   CustomProfile.english-utf8.php  <--- try that ;)

AceTW

^^ And you are officially the "Helper of the Hour"!  Changing the filename took care of it!  WooT! :)

Now to figure out where the regular English stuff is...   Many thanks hcfwesker!

hcfwesker

Your welcome :)  Might want to contact your host, or ask here on SMF about getting "English" on your server settings.  You're gonna run into more problems like this later on.

Quote from: sharks on January 19, 2011, 11:08:26 AM
My problem is that i want to get rid of the ":" in front of the image in the profiles of some of my members without any title/description. Can anyone help? I am using SMF 1.1.12 with default theme.

This one's a tricky fix.  I removed this on mine, but don't have the original file, and can't exactly remember how it looked before.  Can you attach your  Sources/CustomProfile.php file.

Are you talking about on the profile pages, or in the mini-profiles with posts/messages?






roan3105

i have version 1.1.12 and i installed that mod but it doesn't show in my Features and Option WHY?

Mari-chi

Has anyone managed to install this on 2.0 RC4? Will this mod be updated for it? Dx This looks like a really great mod. >_< *has RC4*

Arantor

...it's a core feature in 2.0. Go to Core Features and turn on Advanced Profile Fields.

Mari-chi

Oh yeah, I am using that, but doesn't this one allow a person to section off each profile field with a horizontal line? Currently my custom profile fields are lumped together, and I can't seem to get a horizontal line to divide them. :S

Edit:



^ It shows up like that. I want a horizontal line between the RPP and Biography section.

Arantor

Don't know, but I really don't see this mod being ported to 2.0 seeing how the guy who wrote this mod later became a dev for SMF and was the one who implemented it in the core...

Kindred

you could modify profile.template.php to add the HR  before the start of the custom fields.
Сл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

Quote from: Kindred on January 28, 2011, 09:36:04 AM
you could modify profile.template.php to add the HR  before the start of the custom fields.

^That.  Or you could use the Show Enclosed Within Text (Optional): box when modifying custom profile fields ... and add this in the box.

<hr>{INPUT}

And, the very bottom/last of your custom profile fields in profiles, use this, to add a horizontal line underneath

<hr>{INPUT}<hr>

I think that could also work.

Mari-chi

Thanks for the tips, guys! :3 Caltan ended up having to help me with inserting the horizontal rule between the custom profile fields. XD

sharks

Quote from: mcrat on January 20, 2011, 06:34:26 AM
That's in the CustomProfile.php file.

Find the DisplayFieldPosts() function and then find the if statement which corresponds with the type of custom profile you chose. For example if you are using a select box and want to remove the ":", find the if statement that ends in =='select' within the DisplayFieldPosts() function. It looks like this-

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 />';
         }

Then simply delete the ":" which I've highlighted in red above (leave the quotation marks, just simply delete : ). You will then also need to do this within the DisplayFieldsProfile() function as well.

If you're not using select box, just find the if statement for the one you need. Hope that helps.

Hi hcfwesker

I would not like to completely get rid of the ":" but only when i have no description for the image link. Otherwise the ":" should be visible.
Maybe you could use an "if" statement to fix that? I'm not good with PHP, so i only have a very vague idea of what could be done, but i honestly don't know how.

Advertisement: