Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2004, 08:03 AM
BrAinZ's Avatar
BrAinZ BrAinZ is offline
 
Join Date: Dec 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Mods editing user accounts

Hiya,

I would like a bit of general help.

I'm trying to give my Mods very limited access to changing certain user account details. I've got it pretty much there, but I just can't get it to actually SAVE the data from the Mod panel

I'm guessing it's something to do with user.php.

I have the doformfooter("Save Changes"); line in there, but it doesn't do anything when you click the SAVE button.

It's it just cause they can't access the Admin Control Panel, as using the Mod Panel, I can't do it either as Admin

Any help or pointers in the right direction would be appreciated!
Reply With Quote
  #2  
Old 03-10-2004, 11:39 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you add the logic to update the database for those fields to the modcp/user.php file?
Reply With Quote
  #3  
Old 03-10-2004, 02:21 PM
BrAinZ's Avatar
BrAinZ BrAinZ is offline
 
Join Date: Dec 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Christine
Did you add the logic to update the database for those fields to the modcp/user.php file?
It's a very good question. To be honest, I'm not much of an expert in PHP, just trying to get by on what limited knowledge I have.

Which bit of the user.php would do that?

I don't really understand what the..
PHP Code:
  doformfooter("Save Changes"); 
bit does.
Reply With Quote
  #4  
Old 03-10-2004, 03:17 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The user.php file in the ModCP folder isn't set to take modifications to the user fields with the exception of pics, avatars, signatures and reputation (may be one or two others as well).

If you are going to add things that the mods can change (like birthdate, homepage, etc...), you will need to add the logic to the user.php file to update the database.

Without that, 'save changes' won't do anything.

:

If you want to see an example of how this would need to look, I have a hack that allows mods to change usergroups. Look at the changegroup.php file in the zip -- that will give you an idea of what all you need to add so that the interface and database pieces are both there.

Here is that thread:

https://vborg.vbsupport.ru/showthread.php?t=62018

Reply With Quote
  #5  
Old 03-10-2004, 04:24 PM
BrAinZ's Avatar
BrAinZ BrAinZ is offline
 
Join Date: Dec 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent.. I'll take a look.

I was hoping that I could "Borrow" the relevant code from the admin/user.php file It must be in there somewhere.
Reply With Quote
  #6  
Old 03-10-2004, 09:31 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It isn't that hard once you have all of the elements in place.

:
Reply With Quote
  #7  
Old 03-11-2004, 05:51 AM
BrAinZ's Avatar
BrAinZ BrAinZ is offline
 
Join Date: Dec 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Christine
It isn't that hard once you have all of the elements in place.

:
Yes... If I could just find that "other" element, then I'd be away
Reply With Quote
  #8  
Old 03-11-2004, 05:53 AM
BrAinZ's Avatar
BrAinZ BrAinZ is offline
 
Join Date: Dec 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I have so far...
Reply With Quote
  #9  
Old 03-11-2004, 11:09 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi BrAinZ,

Just a note -- you need to take that attachment out as it is against the rules to post vB's php files here. You can upload ones that you create from scratch, but not their source files (original or those that you have modified).

Easiest way to share your changes is to make a .txt document and put in it what you added to the file and where.

Reply With Quote
  #10  
Old 03-11-2004, 04:59 PM
BrAinZ's Avatar
BrAinZ BrAinZ is offline
 
Join Date: Dec 2001
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whoops.. sorry!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05150 seconds
  • Memory Usage 2,252KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete