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

sparky33

www.dublinforums.org

www.renaultforums.co

mark7144

Has anyone worked out a fix for the 'Remove Buddy' text going to the top of the profile?

!Hachi!

error is in sources/manageserver.php
  and line number 487 which is         
updateSettings
      updateSettings($setArray);
and whole code for this is
// Helper function for saving database settings.
function saveDBSettings(&$config_vars)
{
foreach ($config_vars as $var)
{
if (!isset($var[1]) || !isset($_POST[$var[1]]))
continue;

// Checkboxes!
elseif ($var[0] == 'check')
$setArray[$var[1]] = !empty($_POST[$var[1]]) ? '1' : '0';
// Select boxes!
elseif ($var[0] == 'select' && in_array($_POST[$var[1]], array_keys($var[2])))
$setArray[$var[1]] = $_POST[$var[1]];
// Integers!
elseif ($var[0] == 'int')
$setArray[$var[1]] = (int) $_POST[$var[1]];
// Floating point!
elseif ($var[0] == 'float')
$setArray[$var[1]] = (float) $_POST[$var[1]];
// Text!
elseif ($var[0] == 'text' || $var[0] == 'large_text')
$setArray[$var[1]] = $_POST[$var[1]];
// Passwords!
elseif ($var[0] == 'password')
{
if (isset($_POST[$var[1]][1]) && $_POST[$var[1]][0] == $_POST[$var[1]][1])
$setArray[$var[1]] = $_POST[$var[1]][0];
}
}

updateSettings($setArray);
}

any suggestions?
Happy Ramadan

avas

Hello,   :(

I upgraded to SMF 1.1 Final and use the Custom Profile Field Mod (won't live without it).
However when I updated to 1.1.1 the  Custom Profile Fields disappeared!  I freaked out and
immediately deleted the new 1.1.1 (which took me 3-4 hours to copy into my account, not being
able to figure out the webinstall thing) and reverted to the 1.1 final backup.

Is this mod going to be updated to run with 1.1.1?  how will I know when?  Does it have to be reinstalled or do I just wait til you tell me it works, then I re-do the update?

Thank you.  (I am not a programmer, so please keep it simple for me.)

sparky33

I'm running 1.1.1 and it works for me
www.dublinforums.org

www.renaultforums.co

Tapsa2

Just a simple question.
Is there a limit to the number of "select box" options?
I would need at least 114 options to select from. (all the cities in Finland)
This mod seems to work fine with SMF 1.1.1 and is just what i need.
Suomi - Finland

!Hachi!

why i am unable to update CPF settings?any guess?
Happy Ramadan

Gwydion Frost

Fatal error: template_main(): Failed opening required '/hsphere/local/home/gwydionf/thirdworldnetwork.org/devcom/Sources/CustomProfile.php' (include_path='.:/usr/local/lib/php:/usr/local/lib/php/PEAR:/usr/local/share/pear') in /hsphere/local/home/gwydionf/thirdworldnetwork.org/devcom/Sources/Load.php(1724) : eval()'d code on line 343

This is what it gives me...when I go to look at a post, after the install. SMF 1.1.1.

mgaidia

Quote from: mgaidia on December 20, 2006, 06:49:08 AM
Can you please add statistics.
so we can see how many members chose a specific option.
please

Vaidy

Hi,

I am running version 1.1.1 with a template neutron. I was able to install this mod alright. It shows during register. However, it doesnt show in the profile, when I review the profile before deciding to approve a registration.

Has anyone else had this problem?

Non appearance of the information defeats the purpose of this mod.

sparky33

I installed a couple of extra mods, and now this one isn't diplaying in posts, even though I've selected it to, I uninstalled the later mods but it didn't fix it?
www.dublinforums.org

www.renaultforums.co

mark7144


winrules

First off, sorry for letting this thread kind of get out of hand.
Second off, it should install fine on 1.1.1.
Now, for individual support:

Regarding all feature requests - I plan to include many of these in a new version that will hopefully come out in not too, too long.

Kindred - There will be a limit in the next version of the mod. Your solution won't do that much, as users can always remove that maxlenght and it isn't validated on the server side.

Livethefire - That is a different mod.

hassan - What is the exact error you are getting?

Tapsa2 - No there isn't a limit.

Gwydion Frost - When do you get that error (the URL)?

Vaidy - Look at the first post of this topic.

sparky33 - Look at the first post of this topic.

mark7144 - I might patch that in a few days.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


Vaidy

Quote from: winrules on March 30, 2006, 02:21:25 PM
Link to Mod

.......
How to Make "Show in posts?" Work With Custom Themes (last updated for version 3.16):

In Display.template.php
Find:

// Show how many posts they have made.

And Replace With:

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

// Show how many posts they have made.


Find:

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

And Replace With:

<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();

Note: If your theme has it's own Profile.template.php or PersonalMessage.template.php or Register.template.php you will have to make changes to those but most themes don't. Also note that this isn't necessary on all themes, but most have their own Display.template.php.


Download Latest Version (3.16)

I now understand that I have to edit a couple of individual files in the template I am using.

err, sorry to be such a newbie. Are these suggested changes are applicable only to "Show in Posts" or are they applicable to when I view the profile of the person who has registered and waiting for approval. If I indeed have to change the code for all the 3 files, do I make the same changes or is the code different for different pages (display.template, profile.php and register.template.php)?

winrules

You'll need to also manually apply the changes to Profile.template.php.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


sparky33

Sorted, tried to apply this before asking the question but must have done something wrong.
www.dublinforums.org

www.renaultforums.co

Gwydion Frost

Ok, so... figured out one of the problems... The CustomProfile.php file was a name only... reloaded it, no problem...except one.

My avatars have all disappeared.

Adamzon

#757
This mod is great...

One question: Is it posible to make one of the fields bigger?

(See my modded picture)

drhamad

Out of curiosity, any reason you chose to store the data in smf_themes, instead of smf_members?
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

winrules

Gwydion Frost - Where did they disappear from?

Adamzon - Use a textarea.

drhamad - Because if they were stored in the members table, columns would have to dynamically added and removed when you add and remove fields, which is a bad idea and can take forever on large forums.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


Advertisement: