News:

Wondering if this will always be free?  See why free is better.

Main Menu

Order Custom Profile Fields

Started by Nathaniel, August 14, 2008, 03:56:15 AM

Previous topic - Next topic

Alanar

This works fine for me in 2.0.9 using the install manager.

Night09

Quote from: Alanar on February 20, 2015, 08:14:31 PM
This works fine for me in 2.0.9 using the install manager.

Its always best to use the package manager over manual edits unless you have no choice because of other code edits. ;)

Gantry

Nathaniel hasn't been active in nearly 2 years, but I'm hoping he lurks these pages.... what's the chance of getting this mod to display in 2 columns instead of 1? Does anyone else know if it is easily accomplished? thx

Gantry

Quote from: Gantry on December 06, 2015, 12:48:55 PM
Nathaniel hasn't been active in nearly 2 years, but I'm hoping he lurks these pages.... what's the chance of getting this mod to display in 2 columns instead of 1? Does anyone else know if it is easily accomplished? thx

oops, just realized I posted in the wrong mod thread, plz ignore the above

GL700Wing

Quote from: steiger on January 11, 2013, 06:01:44 AM
Just installed this mod and it would be really great except that it does not save the position.
Drag and Drop works but there is no change to the position column in the smf_custom_fields table.

Any hints how I can debug this problem?
Finally had a go at fixing this issue and had a win!

In ./Sources/ManageSettings.php

Find:
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/ordercustomprofilefields/jquery.js?1.4.2"></script>
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/ordercustomprofilefields/jquery.tablednd.js?0.5"></script>';


Replace with:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="' . $settings['default_theme_url'] . '/scripts/ordercustomprofilefields/jquery.js"></script>
<script src="' . $settings['default_theme_url'] . '/scripts/ordercustomprofilefields/jquery.tablednd.js"></script>';

Life doesn't have to be perfect to be wonderful ...

GL700Wing

#65
Quote from: GL700Wing on October 18, 2018, 08:01:23 PM
Finally had a go at fixing this issue and had a win!
Just discovered the fix above could be made simpler ...

In ./Sources/ManageSettings.php

Find:
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/ordercustomprofilefields/jquery.js?1.4.2"></script>
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/ordercustomprofilefields/jquery.tablednd.js?0.5"></script>';


Replace with:
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/ordercustomprofilefields/jquery.js"></script>
<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/ordercustomprofilefields/jquery.tablednd.js"></script>';
Life doesn't have to be perfect to be wonderful ...

rcane

any way to make this work on 2.0.18?

Kindred

Looks like the only "failure" of the mod install is in ManageSettings.php --  but I notice significant differences which I believe are security and/or php 7.x updates.  So, it would seem that the mod needs a review by a coder to confirm the 2.0.18 source versus the mod update AND the mod new source throughout.

the biggest thing to note (other than the escaped single quotes -- ' versus /') is that the use of "create_function" was replaced.


for example:

Code (actual 2.0.18 code) Select
'data' => array(
'function' => function($rowData) use ($txt)
{

$textKey = sprintf('custom_profile_type_%1$s', $rowData['field_type']);
return isset($txt[$textKey]) ? $txt[$textKey] : $textKey;
},
'style' => 'width: 15%;',
),

Code ("mod searching for") Select
                'data' => array(
                    'function' => create_function('$rowData', '
                        global $scripturl;

                        return sprintf(\'<a href="%1$s?action=admin;area=featuresettings;sa=profileedit;fid=%2$d">%3$s</a><div class="smalltext">%4$s</div>\', $scripturl, $rowData[\'id_field\'], $rowData[\'field_name\'], $rowData[\'field_desc\']);
                    '),
                    'style' => 'width: 62%;',
                ),

Code ("mod replace with (NEEDS FIXING!)") Select
                'data' => array(
                    'function' => create_function('$rowData', '
                        global $txt;

                        $textKey = sprintf(\'custom_profile_type_%1$s\', $rowData[\'field_type\']);
                        return isset($txt[$textKey]) ? $txt[$textKey] : $textKey;
                    '),
                    'style' => 'width: 15%;',
                ),



there are other differences, but these (several) references to the deprecated create_function appear to be the biggest
Сл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."

rcane

Quote from: Kindred on December 20, 2021, 08:48:03 AMLooks like the only "failure" of the mod install is in ManageSettings.php --  but I notice significant differences which I believe are security and/or php 7.x updates.  So, it would seem that the mod needs a review by a coder to confirm the 2.0.18 source versus the mod update AND the mod new source throughout.

the biggest thing to note (other than the escaped single quotes -- ' versus /') is that the use of "create_function" was replaced.


for example:

Code (actual 2.0.18 code) Select
'data' => array(
'function' => function($rowData) use ($txt)
{

$textKey = sprintf('custom_profile_type_%1$s', $rowData['field_type']);
return isset($txt[$textKey]) ? $txt[$textKey] : $textKey;
},
'style' => 'width: 15%;',
),

Code ("mod searching for") Select
                'data' => array(
                    'function' => create_function('$rowData', '
                        global $scripturl;

                        return sprintf(\'<a href="%1$s?action=admin;area=featuresettings;sa=profileedit;fid=%2$d">%3$s</a><div class="smalltext">%4$s</div>\', $scripturl, $rowData[\'id_field\'], $rowData[\'field_name\'], $rowData[\'field_desc\']);
                    '),
                    'style' => 'width: 62%;',
                ),

Code ("mod replace with (NEEDS FIXING!)") Select
                'data' => array(
                    'function' => create_function('$rowData', '
                        global $txt;

                        $textKey = sprintf(\'custom_profile_type_%1$s\', $rowData[\'field_type\']);
                        return isset($txt[$textKey]) ? $txt[$textKey] : $textKey;
                    '),
                    'style' => 'width: 15%;',
                ),



there are other differences, but these (several) references to the deprecated create_function appear to be the biggest

Well, I suppose I could chop away at it and always uninstall .........  thanks.


Michael Vail

I sure wish the features this mod offers was part of SMF itself. I need to reorder my profile fields when I add new ones without deleting them all and starting over to do it. sadly I know nothing about coding and have no time to learn it, but I  would gladly pay a reasonable price for a coder to fix this mod for everyone. If anyone is interested, please PM me.

Arantor

The functionality is in the upcoming 2.1 release.

Michael Vail

Quote from: Arantor on January 08, 2022, 07:29:54 PMThe functionality is in the upcoming 2.1 release.
Thank you my friend. I suspected that might be the case so I literally just installed a 2.1 test forum and BOOM! there it is. Great News! I'm very excited for 2.1's release. I absolutely love my SMF forum and look forward to seeing the next version.

Happy New Year! 

Advertisement: