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

Thauwa

Thanks Blue Dream...you are a GOD!!!!! (umm...not exatly, but someone like him  ;D). It WORKED!!!!!! Thanks!

[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

willj

Thanks for your reply Blue Dream, I will have a go at adding it to Ultimate Profile probably tomorrow and let you know how I get on!

drhamad

Quote from: drhamad on February 18, 2009, 01:48:57 PM
BINGO:

I've now figured out how to convert this mod's profile fields to 2.0 profile fields.  The data is stored the same exact way.  Therefore, all you need to do is change the variable in smf_themes.

Create the field in 2.0.  DO NOT ENTER ANY DATA.  Go into the database (using phpMyAdmin, or whatever your preferred method is), go into smf_themes and use this query:

UPDATE smf_themes
SET variable = "var1"
where variable = "var2"


Where var1 = the name of the field you just entered
and var2 = the name of the old (1.1) field.

THAT IS IT.

Also, if you need to figure out what var1 is, you can look in the db in the table smf_custom_fields.
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

willj

Got this working just fine with Ultimate Profile thanks to Blue Dream, so thank you!!!

rootkid

I made a german translation:
Code (CustomProfile.german.php) Select
<?php
// Don't translate FIELDNAME in the below string.
$txt['cp_enable'] = 'Feld "FIELDNAME" aktivieren';
$txt['cp_text'] = 'Text';
$txt['cp_textarea'] = 'Textfeld';
$txt['cp_checkbox'] = 'Checkbox';
$txt['cp_selectbox'] = 'Auswahlliste';
$txt['cp_type'] = 'Feldtyp';
$txt['cp_addfield'] = '[Neues Feld hinzufügen]';
$txt['cp_name'] = 'Name';
$txt['cp_profileshow'] = 'Im Profil anzeigen?';
$txt['cp_dontshow'] = 'Nicht zeigen';
$txt['cp_underpostcount'] = 'Unter Anz. Beiträge zeigen';
$txt['cp_underimages'] = 'Neben Bildern zeigen';
$txt['cp_showposts'] = 'In Beiträgen zeigen?';
$txt['cp_parsebbc'] = 'Bulletin Board Code (BBC) erlauben?';
$txt['cp_before'] = 'Text davor (BBC falls erlaubt)';
$txt['cp_after'] = 'Text dahinter (BBC falls erlaubt)';
$txt['cp_fieldid'] = 'Feld ID';
$txt['cp_hrule'] = 'Horizontale Linie vor Feld einfügen?';
$txt['co_optinput'] = 'Freiwillige Angabe';
$txt['cp_forceinput'] = 'Pflichtfeld';
$txt['cp_showreg'] = 'Feld bei Registrierung zeigen?';
$txt['cp_adminedit'] = 'Nur Admins das Ändern erlauben?';
$txt['cp_adminview'] = 'Nur für Admins sichtbar?';
$txt['cp_recreate'] = 'Feld neu erstellen';
$txt['cp_checked'] = 'Anzuzeigender Text wenn Checkbox aktiv';
$txt['cp_notchecked'] = '... wenn nicht aktiv';
$txt['cp_show'] = 'Zeigen';
// Don't translate OPTIONNUMBER in the below string
$txt['cp_option'] = 'Option OPTIONNUMBER';
$txt['cp_addoption'] = 'Option hinzufügen';
$txt['cp_cpfields'] = 'Mod: "Custom Profile"';
// Don't translate FIELDNUMBER in the below string
$txt['cp_fieldsettings'] = 'Mod: "Custom Profile" - Feld FIELDNUMBER';
// Don't translate FIELDNAME in the below string
$txt['cp_regerror'] = 'Bitte Feld "FIELDNAME" ausfüllen.';
$txt['cp_moveup'] = '[ Auf ]';
$txt['cp_movedown'] = '[ Ab ]';
$txt['cp_delete'] = '[ Entfernen ]';
$txt['cp_unnamed'] = 'Unbenanntes Feld';
$txt['cp_settings'] = '[ Einstellungen ]';
$txt['cp_hrsummary'] = 'In Profilzusammenfassung';
$txt['cp_hredit'] = 'Auf "Profil bearbeiten" - Seite';
$txt['cp_onboth'] = 'Auf beiden Seiten';
$txt['cp_desc'] = 'Beschreibung';
?>


Maybe it's not the best, but surely better than having no config tab in admin area while using german language pack.

wmcintosh

#2446
Same Sources/ModSettings.php error as others. Beyond me whats needed done.

Thanks

Fixed. From another topic used http://resourcez.biz/PackageParser/index.php and I was able to add the missing code.

Rumbaar

#2447
Quote from: wmcintosh on March 13, 2009, 12:23:27 PMFixed. From another topic used http://resourcez.biz/PackageParser/index.php and I was able to add the missing code.
You realize that feature is available in the download section of every mod on here?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

wmcintosh

Quote from: Rumbaar on March 13, 2009, 05:17:06 PM
You realize that feature is available in the download section of ever mod on here?

Not a clue, that link from another topic is first time ever seeing it.

drhamad

Quote from: wmcintosh on March 13, 2009, 07:53:49 PM
Quote from: Rumbaar on March 13, 2009, 05:17:06 PM
You realize that feature is available in the download section of ever mod on here?

Not a clue, that link from another topic is first time ever seeing it.

"Manual Install Instructions"
FMVperformance:  3.51m posts, 63k members, 11 boards, 1 database

Mazda3Forums - SmallVolvos - MazdaSpeeders Mazda Club - FordFusionClubMazda CX-7 Club - MyMazda6
Now introducing: MKSdrivers.com - FocusDrivers - TaurusDrivers

wmcintosh

Quote from: drhamad on March 13, 2009, 07:57:30 PM"Manual Install Instructions"

May be thats way I never seen it, never looked or used it.

gergely

#2451
I attach CustomProfile.hungarian.php (encoded in charset=ISO-8859-2).
Can that be included in the next release?

(The only function which I'm not sure of is cp_recreate.)

Kindred

there will not be another release.   This capability is built in standard to SMF 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."

gergely

Quote from: Kindred on March 15, 2009, 08:17:44 PM
there will not be another release.   This capability is built in standard to SMF 2.0

That's OK. But is this the right place to post the language file, anyway?

Garou

Go ahead. I'm sure other users might find it useful. Besides if SMF releases a 1.1.9 the mod might be updated for that.

forummaker

#2455
Sorry for asking this here. I'm not sure where to ask it though.
I'm also using Tiny Portal, and I would like to add some "Custom Profile Field" information in the block that I'm already currently using. I just can't figure out the code that pulls the information from the CPF that I want to show.
SMF 1.1.8
Here is the code I have now:
It's a PHP block:
global $memberContext;
echo '<div align="center"></div>';
$user_id = $context['common_stats']['latest_member']['id'];
loadMemberData(array($context['common_stats']['latest_member']['id']));
loadMemberContext($user_id);
if (!empty($memberContext[$user_id]['avatar']['image']))
echo '<div align="center">'.$memberContext[$user_id]['avatar']['image'].'<BR>'.$context['common_stats']['latest_member']['link'].'</div>';
else
echo '<div align="center">( No Avatar Yet )<BR><BR>'.$context['common_stats']['latest_member']['link'].'</div>';

global $memberContext;
echo '<div align="center"></div>';
$user_id = $context['common_stats']['latest_member']['id'];
loadMemberData(array($context['common_stats']['latest_member']['id']));
loadMemberContext($user_id);
if (!empty($memberContext[$user_id]['location']))
echo '<div align="center">'.$memberContext[$user_id]['location'].'</div>';


I've attached before and after images.
Thanks in advance for any advice.

smashedpumpkins

#2456
Hmm I installed this mod. The only other mod I have is Trader feedback. I get the following error when I click "Features and options"

"Fatal error: Cannot redeclare modifyprofilesettings() (previously declared in /home/mystical/public_html/forums/Sources/ModSettings.php:314) in /home/mystical/public_html/forums/Sources/ModSettings.php on line 324"

I then removed the mod. Now all PM's and posts say the following in the field below the username.

"Fatal error: require_once() [function.require]: Failed opening required '/home/mystical/public_html/forums/Sources/CustomProfile.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mystical/public_html/forums/Sources/Load.php(1726) : eval()'d code on line 311"


So I'm now stuck with errors. I'd like to use the custom profile field. What should I do? Thanks!

Rumbaar

First error means the code for the mod has been installed twice.  The section error means when you removed the mod all the code, most likely duplicate, wasn't removed.

Try a search of this thread for more answers.  Or try the parser and manually remove all mod specific code.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

SN

Can someone post a screen shot of the Mod in action please

smashedpumpkins

Quote from: Rumbaar on March 16, 2009, 11:57:46 PM
First error means the code for the mod has been installed twice.  The section error means when you removed the mod all the code, most likely duplicate, wasn't removed.

Try a search of this thread for more answers.  Or try the parser and manually remove all mod specific code.
Thank you, got it fixed!

Advertisement: