miniBB ®

miniBB

®
Support Forums
  
 · Start · Sign in · Register · Search · Statistics · File Bank · Manual ·
Bugs miniBB Support Forums / Bugs /  
 

activity field may be not properly updated if it's called not like by default

 
Author Anonymous
Guest
#1 · Posted: 16 Jan 2008 11:25Reply Quote
bb_func_usernfo.php

line 17,

update fails if the value of $dbUserAct (setup_options.php) is not 'activity'

Author tom322
Active Member
#2 · Posted: 16 Jan 2008 18:37Reply Quote
Why would you want to change that in the first place? :}

Author Paul
Lead Lead Developer
#3 · Posted: 17 Jan 2008 04:01Reply Quote
Why would you want to change that in the first place?

- I think it is because he uses external users table where this field may be called differently...

Ok I agree such bug exists and for fixing it you will need to put:

$$dbUserAct=$_GET['activity'];
updateArray(array($dbUserAct),$Tu,$dbUserId,$user);


Will be fixed in the next miniBB release.

Thanks!

Author Anonymous
Guest
#4 · Posted: 17 Jan 2008 05:52Reply Quote
Same thing on line 76: (bb_func_usernfo.php)

call_user_func('parseUserInfo_'.$ix,$row[$i])

$ix has value of user defined field. The functions above line 76 are defined by the keys of $dbUserSheme.

Author Paul
Lead Lead Developer
#5 · Posted: 17 Jan 2008 08:38Reply Quote
Regarding your last post: that's absolutely right because we can't create the function which in its name uses the dynamic variable.

You would need to redefine such function yourself in bb_plugins.php, for example

if($action=='userinfo'){
function parseUserInfo_customActivityField($val){
/* code here */
}
}

However I am in doubt why would you need the function for activity field? It's displayed only for admin/moderator and there can't be anything custom to display.

For other fields follow my advice.

Author Anonymous
Guest
#6 · Posted: 17 Jan 2008 09:29Reply Quote
I was wondering why you do not use the keys of $dbUserSheme instead of the user defined values to create the function names.

Anyway, I will refine the functions,
Thanks.

Author Paul
Lead Lead Developer
#7 · Posted: 17 Jan 2008 10:28Reply Quote
If you know the way how the function can be defined using a dynamic variable in it's name, I would be happy to know ;-)

Author Anonymous
Guest
#8 · Posted: 17 Jan 2008 11:36Reply Quote
I ment the function name you define in the

call_user_func('parseUserInfo_'.$ix,$row[$i])

part.

If you use the key of $dbUserSheme instead of $ix, you don't need to redefine the function itself.
But maybe I'm missing something here.

I added the redefined function to bb_plugins and all works well!
Thanks again

Author Paul
Lead Lead Developer
#9 · Posted: 17 Jan 2008 12:30Reply Quote
I think if it works with re-defining, it's good :-) I don't remember already why I have programmed it that way (with the value of $dbUserSheme not the key), but probably there was some reason which I am not supposed to remember ;-)

[and usually if I can't remember the reason it flows up in the future bringing new bug, so let's leave it for a while... it anyway should work in all aspects and is universal approach like now]

Author tom322
Active Member
#10 · Posted: 18 Jan 2008 22:48Reply Quote
usually if I can't remember the reason it flows up in the future bringing new bug

I find this statement true almost every day so I learned not to change too much if not needed ;).

Bugs miniBB Support Forums / Bugs /
 activity field may be not properly updated if it's called not like by default
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

BB code for the Bold StyleBB code for the Italic StyleBB Code for the PictureBB code for the URLUpload a File

  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the File and Picture Attachments add-on: extend your miniBB-forums, attaching images and files.