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

GJ-tje

Quote from: winrules on April 25, 2006, 05:42:08 PM
Quote from: GJ-tje on April 24, 2006, 07:17:26 PM
Hello, here I am again, but I have a question.

Is it possible to give the custom profile fields a max width?
Because now there isn't and it can ****** the profiles up.
See also: http://www.appieskamertjuh.nl/smf/?action=profile;u=67
This occurs on any resolution a user has or can have...

Many thanks in advance!

P.S. Did you think about my suggestion which I told you some time ago?
Furthermore, I really like and appreciate this mod, with this mod, I do not have to modify SMF Profiles myself... :P
do you mean max lenght? I'll consider that.
about the other suggestion, It might be in 2.2 but I'm busy working on another mod right now.


parcley, Good idea, that'll be in 2.2.



perplexed, ok, figured out what's causing that, 2.1.4 will fix that too.
No, I was nog talking about a max length, but the width (horizontal, not height (vertical)) ;)

Let me explain: If I do not make a new sentence it will put everything on 1 row, until the end of what he can get has been reached... I mean something like:
<div style="width: 300px;">;)
"People cannot gain anything without sacrificing something of equal value.
To obtain, something of equal value must be lost.
That is alchemy's first law of Equivalent Exchange."

"People should not be afraid of their Goverments. Goverments should be afraid of their People."

Christian A. Herrnboeck

Hi,

Where exactly are the values of the custom profile fields stored? I can't find them in the members table...


Farmers:Producing food for the world!

Søren Bjerg

They are stored in the smf_themes table.
RUNE HORDES dot INFO - SMF 1.1.10 w/ Custom Profile Mod... and various permissions hooks and template changes (new topic form).

Christian A. Herrnboeck

Ok, I found them... now, to the mod Author, PLEASE! Use logical DB development... why don't you just add them to the member's table? I'd say that'd be a lot easier... not to mention faster!

-Christian


Farmers:Producing food for the world!

crazie

#224
Quote from: winrules on April 24, 2006, 03:55:43 PM
crazie, just to add on to what perplexed said, the error is probly caused by either the coding changes you made, the gmail mod or the auto sig mod. the data always stays there, with the field id. So actually if you were using "default_options[myfield]" before, if you gave a field in this mod an ID of "myfield" (without quotes) the data would stay there.

So, is there a particular way I should go about implementing the changes?  (i.e. uninstall autosig mod, then install this one, then re-install autosig mod).  Autosig is the only one I'd rather not get rid of.....if I had to eliminate one of them.

Or, can I just install it with the Failure in the test...and it should still work?

As for the coding changes I made, I can easily delete those to use this mod, since it would replace that anyways.

Perplexed and winrules- thanks for the info!!!

crazie

winrules,

Got it running just fine.  All I did was uninstall Auto-sig and gmail.  Then installed Custom Profile Field, and reinstalled the other two after.  Worked flawlessly!

Thanks for the help!  I didn't have to touch the coding I changed myself.

Piwaille

Quote from: winrules on April 24, 2006, 03:55:43 PM
piwaille, the skype name mod is probly interferring with this mod.

yes that's it !
8)

nice !
thanks
Piwaille
le chant du vario est motorisé par SMF 1.1.15

winrules

Quote from: GJ-tje on April 25, 2006, 05:54:10 PM
Quote from: winrules on April 25, 2006, 05:42:08 PM
Quote from: GJ-tje on April 24, 2006, 07:17:26 PM
Hello, here I am again, but I have a question.

Is it possible to give the custom profile fields a max width?
Because now there isn't and it can ****** the profiles up.
See also: http://www.appieskamertjuh.nl/smf/?action=profile;u=67
This occurs on any resolution a user has or can have...

Many thanks in advance!

P.S. Did you think about my suggestion which I told you some time ago?
Furthermore, I really like and appreciate this mod, with this mod, I do not have to modify SMF Profiles myself... :P
do you mean max lenght? I'll consider that.
about the other suggestion, It might be in 2.2 but I'm busy working on another mod right now.


parcley, Good idea, that'll be in 2.2.



perplexed, ok, figured out what's causing that, 2.1.4 will fix that too.
No, I was nog talking about a max length, but the width (horizontal, not height (vertical)) ;)

Let me explain: If I do not make a new sentence it will put everything on 1 row, until the end of what he can get has been reached... I mean something like:
<div style="width: 300px;">;)
Ok, I'll see what I can do.


Quote from: ChristianH. on April 26, 2006, 08:05:55 AM
Ok, I found them... now, to the mod Author, PLEASE! Use logical DB development... why don't you just add them to the member's table? I'd say that'd be a lot easier... not to mention faster!

-Christian
First off, this mod just provides an interface to creating fields unknown's way. I could have them be stored in the members table if I wanted, but I would have to be dynaically by creating tables, and it would be very complicated. Also I don't see how it would be faster, as the members table would grow very large and the values would be loaded on every page load.


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


perplexed

#228
hi winrules

I got a quick question...

remember a few pages back I said the CPF on posts was showing up double on my testforum after upgrade?

Well fields are still showing up on profile and posts on display but not to edit, even though I uninstalled the mod.

Here is the section where it appears in profile template:


// Some more information.
echo '
</td>
</tr><tr>
<td><b>', $txt[96], ': </b></td>
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>';
$i = 1;
while (isset($modSettings['enable_CP' . $i . '']))
{
if ($modSettings['enable_CP' . $i . ''] && isset($context['member']['options'][$modSettings['CP' . $i . '_id']]) && $modSettings['CP' . $i . '_profile'])
{
if ($modSettings['CP' . $i . '_view'] && !$context['user']['is_admin'])
{
$i++;
continue;
}
if ($modSettings['CP' . $i . '_type']=='text' || $modSettings['CP' . $i . '_type']=='textarea')
{
$modSettings['CP' . $i . '_data1'] = preg_replace('/%1/', $context['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data1']);
$modSettings['CP' . $i . '_data2'] = preg_replace('/%1/', $context['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data2']);
if ($modSettings['CP' . $i . '_bbc'])
{
$context['member']['options'][$modSettings['CP' . $i . '_id']] = parse_bbc($modSettings['CP' . $i . '_data1'] . $context['member']['options'][$modSettings['CP' . $i . '_id']] . $modSettings['CP' . $i . '_data2']);
}
echo '
</tr><tr>
<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b></td>
<td>' . $context['member']['options'][$modSettings['CP' . $i . '_id']] . '</td>';
}
if ($modSettings['CP' . $i . '_type']=='select')
{
if ($modSettings['CP' . $i . '_bbc'])
{
$field = parse_bbc($context['member']['options'][$modSettings['CP' . $i . '_id']]);
}
else
{
$field = $context['member']['options'][$modSettings['CP' . $i . '_id']];
}
echo '
</tr><tr>
<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b></td>
<td>' . $field . '</td>';
}
if ($modSettings['CP' . $i . '_type']=='check')
{
if ($modSettings['CP' . $i . '_bbc'])
{
$modSettings['CP' . $i . '_data1'] = parse_bbc($modSettings['CP' . $i . '_data1']);
$modSettings['CP' . $i . '_data2'] = parse_bbc($modSettings['CP' . $i . '_data2']);
}
if ($context['member']['options'][$modSettings['CP' . $i . '_id']])
{
echo '
</tr><tr>
<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b></td>
<td>' . $modSettings['CP' . $i . '_data1'] . '</td>';
}
else
{
echo '
</tr><tr>
<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b></td>
<td>' . $modSettings['CP' . $i . '_data2'] . '</td>';
}
}
}
$i++;
}

echo '
</tr><tr>
<td><b>', $txt[113], ' </b></td>
<td>
<i>', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" border="0" align="middle" />' : $context['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '', '</i>';

// Can they add this member as a buddy?
if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'])
echo '
&nbsp;&nbsp;<a href="', $scripturl, '?action=buddy;u=', $context['member']['id'], ';sesc=', $context['session_id'], '">[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']</a>';



would you mind telling me exactly which part to delete, so I can reinstall the mod again?

~thanks

winrules

Quote from: perplexed on April 26, 2006, 05:07:46 PM
hi winrules

I got a quick question...

remember a few pages back I said the CPF on posts was showing up double on my testforum after upgrade?

Well fields are still showing up on profile and posts on display but not to edit, even though I uninstalled the mod.

Here is the section where it appears in profile template:


// Some more information.
echo '
</td>
</tr><tr>
<td><b>', $txt[96], ': </b></td>
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>';
$i = 1;
while (isset($modSettings['enable_CP' . $i . '']))
{
if ($modSettings['enable_CP' . $i . ''] && isset($context['member']['options'][$modSettings['CP' . $i . '_id']]) && $modSettings['CP' . $i . '_profile'])
{
if ($modSettings['CP' . $i . '_view'] && !$context['user']['is_admin'])
{
$i++;
continue;
}
if ($modSettings['CP' . $i . '_type']=='text' || $modSettings['CP' . $i . '_type']=='textarea')
{
$modSettings['CP' . $i . '_data1'] = preg_replace('/%1/', $context['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data1']);
$modSettings['CP' . $i . '_data2'] = preg_replace('/%1/', $context['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data2']);
if ($modSettings['CP' . $i . '_bbc'])
{
$context['member']['options'][$modSettings['CP' . $i . '_id']] = parse_bbc($modSettings['CP' . $i . '_data1'] . $context['member']['options'][$modSettings['CP' . $i . '_id']] . $modSettings['CP' . $i . '_data2']);
}
echo '
</tr><tr>
<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b></td>
<td>' . $context['member']['options'][$modSettings['CP' . $i . '_id']] . '</td>';
}
if ($modSettings['CP' . $i . '_type']=='select')
{
if ($modSettings['CP' . $i . '_bbc'])
{
$field = parse_bbc($context['member']['options'][$modSettings['CP' . $i . '_id']]);
}
else
{
$field = $context['member']['options'][$modSettings['CP' . $i . '_id']];
}
echo '
</tr><tr>
<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b></td>
<td>' . $field . '</td>';
}
if ($modSettings['CP' . $i . '_type']=='check')
{
if ($modSettings['CP' . $i . '_bbc'])
{
$modSettings['CP' . $i . '_data1'] = parse_bbc($modSettings['CP' . $i . '_data1']);
$modSettings['CP' . $i . '_data2'] = parse_bbc($modSettings['CP' . $i . '_data2']);
}
if ($context['member']['options'][$modSettings['CP' . $i . '_id']])
{
echo '
</tr><tr>
<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b></td>
<td>' . $modSettings['CP' . $i . '_data1'] . '</td>';
}
else
{
echo '
</tr><tr>
<td><b>' . $modSettings['CP' . $i . '_name'] . ': </b></td>
<td>' . $modSettings['CP' . $i . '_data2'] . '</td>';
}
}
}
$i++;
}

echo '
</tr><tr>
<td><b>', $txt[113], ' </b></td>
<td>
<i>', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" border="0" align="middle" />' : $context['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '', '</i>';

// Can they add this member as a buddy?
if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'])
echo '
&nbsp;&nbsp;<a href="', $scripturl, '?action=buddy;u=', $context['member']['id'], ';sesc=', $context['session_id'], '">[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']</a>';



would you mind telling me exactly which part to delete, so I can reinstall the mod again?

~thanks

it should be:

// Some more information.
echo '
</td>
</tr><tr>
<td><b>', $txt[96], ': </b></td>
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>
</tr><tr>
<td><b>', $txt[113], ' </b></td>
<td>
<i>', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" border="0" align="middle" />' : $context['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '', '</i>';

// Can they add this member as a buddy?
if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'])
echo '
&nbsp;&nbsp;<a href="', $scripturl, '?action=buddy;u=', $context['member']['id'], ';sesc=', $context['session_id'], '">[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']</a>';



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


AlexJ

I installed the mod..but i don't know where to got to make the custom profile
All4U Forum http://forum.all4u.dyn.ro/ [nofollow] Powered by SMF 1.1 RC2

perplexed

Quote from: AlexJ on April 27, 2006, 06:44:37 AM
I installed the mod..but i don't know where to got to make the custom profile

go to your admin screen > features and options > custom profile fields will have a tab along the top of this section

perplexed


it should be:

// Some more information.
echo '
</td>
</tr><tr>
<td><b>', $txt[96], ': </b></td>
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>
</tr><tr>
<td><b>', $txt[113], ' </b></td>
<td>
<i>', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['label'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" border="0" align="middle" />' : $context['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '', '</i>';

// Can they add this member as a buddy?
if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'])
echo '
&nbsp;&nbsp;<a href="', $scripturl, '?action=buddy;u=', $context['member']['id'], ';sesc=', $context['session_id'], '">[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']</a>';


[/quote]

thanks, I dont know what happened, as it only did that on the testsite, I also had to take the code out of the display template too *shrug*


Speedster

Hi all,

winrules can help me with this?:

SMF Version :1.1 RC2 bridged with Mambo
MODS Installed:
1.     SMF 1.0.7 / 1.1 RC2 Update     1.0 
2.    Custom Profile Mod    2.13

Award Mod desinstalled

Using SMF Theme © Gaia

and can´t see the tab under features and options.

Tks...

winrules

Quote from: Speedster on April 28, 2006, 06:49:44 AM
Hi all,

winrules can help me with this?:

SMF Version :1.1 RC2 bridged with Mambo
MODS Installed:
1.     SMF 1.0.7 / 1.1 RC2 Update     1.0 
2.    Custom Profile Mod    2.13

Award Mod desinstalled

Using SMF Theme © Gaia

and can´t see the tab under features and options.

Tks...
any errors on the install?


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


Speedster

Quote from: winrules on April 28, 2006, 12:41:07 PM
Quote from: Speedster on April 28, 2006, 06:49:44 AM
Hi all,

winrules can help me with this?:

SMF Version :1.1 RC2 bridged with Mambo
MODS Installed:
1.     SMF 1.0.7 / 1.1 RC2 Update     1.0 
2.    Custom Profile Mod    2.13

Award Mod desinstalled

Using SMF Theme © Gaia

and can´t see the tab under features and options.

Tks...
any errors on the install?

nope all clean...

winrules

Quote from: Speedster on April 28, 2006, 01:03:51 PM
Quote from: winrules on April 28, 2006, 12:41:07 PM
Quote from: Speedster on April 28, 2006, 06:49:44 AM
Hi all,

winrules can help me with this?:

SMF Version :1.1 RC2 bridged with Mambo
MODS Installed:
1.     SMF 1.0.7 / 1.1 RC2 Update     1.0 
2.    Custom Profile Mod    2.13

Award Mod desinstalled

Using SMF Theme © Gaia

and can´t see the tab under features and options.

Tks...
any errors on the install?

nope all clean...
can you pm me your modsettings.php?


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


john109

Hi winrules!

I noticed I've been getting these errors whenever I add someone to a membergroup.  Do you know if it could be because of this mod?

2: Missing argument 2 for db_query()
File: /home/....../public_html/smf/Sources/Subs.php
Line: 237

2: Missing argument 3 for db_query()
File: /home/....../public_html/smf/Sources/Subs.php
Line: 237


Also when I click on Re-create field on any of the custom fields I have these errors come up in the error log.  I get this pair of errors 4 times each time I click on Re-create field.  I have 6 custom fields (4 text, 2 check boxes).

8: Undefined index: cp
File: /home/...../public_html/smf/Sources/ModSettings.php
Line: 317

8: Undefined index: CP_type
File: /home/...../public_html/smf/Sources/ModSettings.php
Line: 317



database404

#238
Hello, newbie popping in here  ;)

I'm using SMF 1.1RC2 and would like to find out how to display the profile fields in posts. I did the code changes in the first post but they don't work. I'm using Helios Multi and the latest version of Custom Profile Field.

Edit: I have no other mods installed.


Advertisement: