Advertisement:

Author Topic: Custom Profile Field Mod  (Read 943171 times)

Offline sparky33

  • Jr. Member
  • **
  • Posts: 315
    • Renault Forums
Re: Custom Profile Field Mod
« Reply #740 on: December 24, 2006, 01:16:44 PM »
All sorted now.

Offline mark7144

  • Sophist Member
  • *****
  • Posts: 1,174
Re: Custom Profile Field Mod
« Reply #741 on: December 24, 2006, 03:39:31 PM »
Has anyone worked out a fix for the 'Remove Buddy' text going to the top of the profile?

Offline !Hachi!

  • SMF Hero
  • ******
  • Posts: 1,666
  • Gender: Male
    • pakurdu.net
Re: Custom Profile Field Mod
« Reply #742 on: December 25, 2006, 08:59:27 AM »
error is in sources/manageserver.php
  and line number 487 which is         
updateSettings
      updateSettings($setArray);
and whole code for this is
Code: [Select]
// 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

Offline avas

  • Newbie
  • *
  • Posts: 3
Re: Custom Profile Field Mod
« Reply #743 on: December 27, 2006, 12:04:24 AM »
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.)

Offline sparky33

  • Jr. Member
  • **
  • Posts: 315
    • Renault Forums
Re: Custom Profile Field Mod
« Reply #744 on: December 27, 2006, 12:37:49 AM »
I'm running 1.1.1 and it works for me

Offline Tapsa2

  • Jr. Member
  • **
  • Posts: 183
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #745 on: December 28, 2006, 03:18:59 PM »
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

Offline !Hachi!

  • SMF Hero
  • ******
  • Posts: 1,666
  • Gender: Male
    • pakurdu.net
Re: Custom Profile Field Mod
« Reply #746 on: December 28, 2006, 06:40:06 PM »
why i am unable to update CPF settings?any guess?
Happy Ramadan

Offline Gwydion Frost

  • Jr. Member
  • **
  • Posts: 172
  • Gender: Male
  • Third World Network
    • Third World Network
Re: Custom Profile Field Mod
« Reply #747 on: January 01, 2007, 04:08:51 AM »
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.

Offline mgaidia

  • Semi-Newbie
  • *
  • Posts: 69
Re: Custom Profile Field Mod
« Reply #748 on: January 01, 2007, 04:26:49 AM »
Can you please add statistics.
so we can see how many members chose a specific option.
please

Offline Vaidy

  • Semi-Newbie
  • *
  • Posts: 16
Re: Custom Profile Field Mod
« Reply #749 on: January 01, 2007, 06:26:27 PM »
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.

Offline sparky33

  • Jr. Member
  • **
  • Posts: 315
    • Renault Forums
Re: Custom Profile Field Mod
« Reply #750 on: January 01, 2007, 07:21:33 PM »
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?

Offline mark7144

  • Sophist Member
  • *****
  • Posts: 1,174
Re: Custom Profile Field Mod
« Reply #751 on: January 01, 2007, 07:50:11 PM »
mark7144 - I'll look into that.
Any luck?

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #752 on: January 01, 2007, 09:45:37 PM »
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.


Offline Vaidy

  • Semi-Newbie
  • *
  • Posts: 16
Re: Custom Profile Field Mod
« Reply #753 on: January 01, 2007, 11:00:13 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:
Code: [Select]
// Show how many posts they have made.
And Replace With:
Code: [Select]
global $sourcedir, $messagevars;
$messagevars = $message;
require_once($sourcedir . '/CustomProfile.php');
DisplayFieldPosts();

// Show how many posts they have made.

Find:
Code: [Select]
<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:
Code: [Select]
<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)?

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #754 on: January 02, 2007, 10:31:44 AM »
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.


Offline sparky33

  • Jr. Member
  • **
  • Posts: 315
    • Renault Forums
Re: Custom Profile Field Mod
« Reply #755 on: January 02, 2007, 11:45:04 AM »
Sorted, tried to apply this before asking the question but must have done something wrong.

Offline Gwydion Frost

  • Jr. Member
  • **
  • Posts: 172
  • Gender: Male
  • Third World Network
    • Third World Network
Re: Custom Profile Field Mod
« Reply #756 on: January 03, 2007, 05:12:19 AM »
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.

Offline Adamzon

  • Semi-Newbie
  • *
  • Posts: 57
Re: Custom Profile Field Mod
« Reply #757 on: January 03, 2007, 08:32:44 AM »
This mod is great...

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

(See my modded picture)
« Last Edit: January 03, 2007, 08:34:46 AM by Adamzon »

Offline drhamad

  • Sophist Member
  • *****
  • Posts: 1,358
  • Gender: Male
    • FMVperformance Automotive Communities
Re: Custom Profile Field Mod
« Reply #758 on: January 03, 2007, 09:40:13 AM »
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

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #759 on: January 03, 2007, 02:53:26 PM »
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.