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

you can not set it on a per field basis...   you would need to make the changes to both locations and it would affect all fields of that type.
Сл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."

gastan

Bummer.  But thanks for the quick reply.

J-Bird

Quote from: J-Bird on August 22, 2009, 04:52:06 PM
There is the option for fields to be viewable only to admin, I would like to extend that view to Global Moderators as well. How can this be done?

Thanks!

Garou was able to assist me with the code changes successfully.
WTG Garou!!



In customprofile.php find
if ($modSettings['CP' . $i . '_view'] && !$context['user']['is_admin'])

and replace with
if ($modSettings['CP' . $i . '_view'] && (!allowedto('edit_news')))

Then make sure whatever membergroup you want to have access, you give them access to the task of "edit news".
This can be changed to work with any membergroup, and any task.
Love, often

Garou

Dont forget that here are three instances of the line in the functions of that script...
function DisplayFieldsProfile()
function DisplayFieldPostsPictures()
function DisplayFieldPosts()
Depending on your exact needs you'll probably need to change it in all three.

The key is to tie it to a permission that you wouldn't give to just any user but you wouldn't mind allowing a few certain people to use. The one for the news was the one I thought fit that criteria best but you cant tie just about any permission that way.

PurpleCrow

I'm really stuck... I installed this (I have 1.1.10) but I cant find anywhere where you can actually add the custom profile feilds... Help!
SMF 2.0 RC3

Looking for staff!

Forums Galore, a brand new Admin Forum is looking for staff to help with the launch. Send me a PM or sign up to Forums Galore if you're interested!

Add your forum to the Forums Galore Community Showcase

Kyrna

Quote from: PurpleCrow on October 23, 2009, 11:48:07 AM
I'm really stuck... I installed this (I have 1.1.10) but I cant find anywhere where you can actually add the custom profile feilds... Help!
Are you using a custom theme or the default theme?

PurpleCrow

SMF 2.0 RC3

Looking for staff!

Forums Galore, a brand new Admin Forum is looking for staff to help with the launch. Send me a PM or sign up to Forums Galore if you're interested!

Add your forum to the Forums Galore Community Showcase

Kyrna

Quote from: PurpleCrow on October 23, 2009, 01:38:20 PM
Custom theme - CS Classic
That I can't help with, then, other than to say that if the Custom Profile Fields section doesn't show up under Features and Options in the Admin section, then go the mod link, parse it for 1.10.0, and then make the listed changes to the files that are in your custom theme. Change the files that start ./Themes/default/, as those are the ones that aren't being changed by the mod installation. If that doesn't work, one of the more knowledgeable folks can probably help. :)

Kardell

#2768
After installation files seems ok (have changed), but I don't see the difference, same thing with other mods.
I use default theme.  :o

@edit
It was because of different language.  :P

Kyrna

Quote from: Kardell on October 27, 2009, 05:55:55 PM
After installation files seems ok (have changed), but I don't see the difference, same thing with other mods.
I use default theme.  :o
Go to the main Features and Options page in Administration. There should be a  tab that says CUSTOM PROFILE FIELDS (for mine, it's the third tab out of four). It should look like this:

Kardell

I agree, but if I change language this tab dissapears.
Thank you for your efforts :)

Kyrna

Quote from: Kardell on October 27, 2009, 06:33:53 PM
I agree, but if I change language this tab dissapears.
Thank you for your efforts :)
Ah, I certainly can't help with that. Good luck. :)

Garou

Hmm When you are changing languages do you mean just changing the languages in SMF or have you created a language file based on the original? Something like...
/Themes/default/languages/CustomProfile.your language.php

If you are converting the language file yourself how are you changing it?
For exapmple  language string like this in CustomProfile.english.php...
$txt['cp_enable'] = 'Enable FIELDNAME';

would need to be changed in CustomProfile.spanish.php to...
$txt['cp_enable'] = 'Habilitar el CAMPO NOMBRE';



Kardell

So Garou I just do switch to other original language downloaded from SMF website (default board language -> Server settings).
I see changes in profile and reg. form, but I cannot access this tab in options, so I have to toggle back to english everytime. Same thing with Ranks for time online mod.
:)

Garou

I'm not familiar with the other mod but with most any mod if it doesn't contain support for a given language then you with have to write the translation file yourself or find someone else that knows both languages well to write the file.

For this mod you will want to make a copy of the CustomProfile.english.php and rename the copy to, CustomProfile.your language.php. Open it up in notepad then for every line in the file that says something like...
$txt['tag'] = 'tag description;
The tag description would need to be changed to your language.

Once everything has been translated, drop your file in the /Themes/default/languages folder and it should work.

clearblue

Hi,

I am new to SMF so please use small words in short sentences.  ;)

I am running SMF 1.1.10 with the Default theme in English.  I have installed the package and the admin panel tells me the install is fine and that I have the current version of the mod in place.  However, I do not see the tab to configure the Mod in the Features and Options panel. 

I see the Mod page does not list 1.1.10 as a compatible version, so I went through the listed files and found that the edits that are called for have already been made.

What am I missing?  I am about cross-eyed from checking and double checking, so I am certain that whatever it is, will be painfully obvious in the end.

Thanks for helping a newb.

Kindred

are you running English or English UTF-8 (which is different from English)
Сл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."

clearblue

Quote from: Kindred on November 04, 2009, 09:27:20 PM
are you running English or English UTF-8 (which is different from English)

Woo hoo!  You are my hero. 

I am NOW running plain ol' English and all is well.

Thank you!

shane is my name

I installed 3.2 but It wil not show me the new tab under FEATURES & OPTIONS.
im using smf 1.1.10 and the default core theme.

Kindred

and are you running in English?  (hint english utf-8 is not english_
Сл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."

Advertisement: