04-30-2013, 02:40 AM
05-02-2013, 08:37 AM
Right now it's possible to display the inputs in UserCP main page (with another file) and EditProfile, the fields on the Profile/Postbit/Memberlist, right? Would it be possible to make it global, at least inputs?
And another suggestion - add minimum/limit for multiple selection.
And another suggestion - add minimum/limit for multiple selection.
05-03-2013, 02:46 AM
Adding code like this will display the fields (Display Format/Blank Replacement Value) globally:
PHP Code:
|
Changing the hooks in your xt_ucp_main.php file will display the inputs (Custom Input) on a page (depends on what hooks you use), including the other non custom profile fields (depends on whatever fields loaded/processed in that file).
05-03-2013, 06:58 AM
Thanks, xt_proffields_load($GLOBALS['mybb']->user); in global hook worked well.
However, I have already tried changing the UserCP hook to global, it shows the inputs but:
1) It gives warnings like: "Warning [2] Illegal string offset 'Manchester City' - Line: 581 - File: C:\xampp\htdocs\mybb\inc\plugins\xt_proffields.php PHP 5.4.7 (WINNT)". Manchester City is one of profile field values.
2) After clicking Update Profile value isn't changed, I'm only redirected to UserCP. Here's what I tried:
However, I have already tried changing the UserCP hook to global, it shows the inputs but:
1) It gives warnings like: "Warning [2] Illegal string offset 'Manchester City' - Line: 581 - File: C:\xampp\htdocs\mybb\inc\plugins\xt_proffields.php PHP 5.4.7 (WINNT)". Manchester City is one of profile field values.
2) After clicking Update Profile value isn't changed, I'm only redirected to UserCP. Here's what I tried:
Code:
|
Also what about min/max selection?
05-04-2013, 05:46 AM
(05-03-2013 06:58 AM)Destroy666 Wrote: [ -> ]However, I have already tried changing the UserCP hook to global, it shows the inputs but:Try downloading the file from the first post (I've updated it) so (hopefully) it "supports" PHP 5.4.
1) It gives warnings like: "Warning [2] Illegal string offset 'Manchester City' - Line: 581 - File: C:\xampp\htdocs\mybb\inc\plugins\xt_proffields.php PHP 5.4.7 (WINNT)". Manchester City is one of profile field values.
Use codes like this for displaying the value globally:
PHP Code:
|
(05-03-2013 06:58 AM)Destroy666 Wrote: [ -> ]2) After clicking Update Profile value isn't changed, I'm only redirected to UserCP.At least add the variable to display the inline_error in your template so you know why it isn't updated.
(05-03-2013 06:58 AM)Destroy666 Wrote: [ -> ]Also what about min/max selection?Maybe later.
05-04-2013, 07:05 AM
Making the xt_proffields_load global as $xptf fixed the warnings, thanks.
I don't really understand what you mean. The errors on the top of page? I have that enabled, they showed only the mentioned warning multiple times, now after clicking Update Profile nothing shows up. Or you mean the {$errors}? After adding it it says "Please correct the following errors before continuing: Please choose a valid birthday privacy option."
Ok, looking forward to it.
(05-04-2013 05:46 AM)RateU Wrote: [ -> ]At least add the variable to display the inline_error in your template so you know why it isn't updated.
I don't really understand what you mean. The errors on the top of page? I have that enabled, they showed only the mentioned warning multiple times, now after clicking Update Profile nothing shows up. Or you mean the {$errors}? After adding it it says "Please correct the following errors before continuing: Please choose a valid birthday privacy option."
(05-04-2013 05:46 AM)RateU Wrote: [ -> ]Maybe later.
Ok, looking forward to it.
05-24-2013, 03:49 PM
ooone more question: does the xt_ucp_main plugin allow the theme selector variable to be used -- {$stylelist}?
I tried that and it wasn't displaying so i think it's not in there unless its another variable.
thank you!
I tried that and it wasn't displaying so i think it's not in there unless its another variable.
thank you!
05-24-2013, 07:03 PM
I recently downloaded this plugin and I've noticed a few strange errors.
1) Custom Profile Fields Block doesn't work when Editable by Usergroup is disabled.
2) However, when Editable by Usergroup is enabled, I get an error when I try to update my Board Settings.
I have no idea why this is happening.
edit: I also should mention that fid18 is not even enabled at the moment. There is no reason it would be causing an error. Plus Board Settings is a completely different page.
1) Custom Profile Fields Block doesn't work when Editable by Usergroup is disabled.
2) However, when Editable by Usergroup is enabled, I get an error when I try to update my Board Settings.
Quote:MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'test, test test', `fid18`='Tiki Astrophel x Orion Astrophel (OTP)', `' at line 2
Query:
UPDATE mybb_userfields SET `fid1`='', `fid6`='', `fid9`='', `fid10`='', `fid11`='', `fid12`='', `fid13`='Andee Astrophel', `fid3`='Other', `fid14`='From The Ashes', `fid15`='type', `fid16`='more random stuff', `fid17`='He's Sexy and He knows it. ', `fid18`='Tiki Astrophel x Orion Astrophel (OTP)', `fid19`='history. blah blah blah', `fid20`='', `fid21`='4', `fid22`='10', `fid23`='May', `fid24`='8' WHERE ufid='16'
I have no idea why this is happening.
edit: I also should mention that fid18 is not even enabled at the moment. There is no reason it would be causing an error. Plus Board Settings is a completely different page.
05-24-2013, 07:56 PM
2) Looks like you have unescaped apostrophe in query, in "He's Sexy and He knows it" specifically. Try removing it as temporary solution
06-15-2013, 01:18 AM
As far as I know, it should be escaped by MyBB's datahandler (the plugin use MyBB's datahandler to save the info).