Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-05-2002, 06:11 PM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Re-usable custom Permission Sets-Will pay if needed

Ok....this is a hack i think MANY admins here would LOVE to see created.

For those of us who have a large number of forums, and a tendency to add new ones frequently at the request of users...this would be a god-send.

I am think of a simple addition of a new table to store re-usable persmission sets. For example, our forums are grouped by Cities which serve as categories...but the subforums are often the same. Every time i add a new city, i have to spend large amounts of time setting the permissions for each forum...as different forums have different permissions for various usergroups.

It would be GREAT if I could instead set up once the usergroup permissions for one TYPE of forum, and then upon creation of it, have a drop down menu listing forum permission types or "Manual Edit", if it is does not fit any of them.

With over 280 forums, and over 30 usergroups....setting permissions is taking up WAYYYY too much of my time.

As always, if no one else sees the benefit in providing this hack based on how useful it would be....i can and will pay for someone to create it for me.
Reply With Quote
  #2  
Old 08-05-2002, 07:49 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1- Create your new forum in your Admin CP and note it's forum id (do NOT APPLY any permissions to your new forum after you created it)

2- Find the forum you want to apply(inherit) its permissions, note its forum id too.

3- Put this script into your Admin dir and call it like this

http://yoururl/board/admin/forumper.php?fromid=X&toid=Y

Replace X with the forumid of your existing forum whose permissions will be inherited and Y with the forumid of your new forum.

The script will handle the rest..

I know it's crude, but who needs "attractive user interface" anyway, it works.. I recommend applying it to your test board before you use it and backup your db just in case..
Attached Files
File Type: php forumper.php (1.6 KB, 17 views)
Reply With Quote
  #3  
Old 08-05-2002, 08:07 PM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TY TY TY Logician...am heading out to test it now.

Question: If I decide for some reason to change a usergroup's access or something, and wanted to apply it to all forums of that type, will this hack work even if the forum's permissions have already been set? In other words, can it be used to update as well as set???
Reply With Quote
  #4  
Old 08-05-2002, 08:24 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ladyfyre
Question: If I decide for some reason to change a usergroup's access or something, and wanted to apply it to all forums of that type, will this hack work even if the forum's permissions have already been set? In other words, can it be used to update as well as set???
well I didnt design it to make updates but it's not hard to adapt anyway. Copy the content of the script to another script with a different name and add line:
PHP Code:
$DB_site->query("DELETE * from forumpermission WHERE forumid='".$toid."'"); 
before

PHP Code:
$permission=$DB_site->query("SELECT usergroupid,canview, cansearch, canemail, canpostnew, canmove, canopenclose, candeletethread, canreplyown, canreplyothers,  canviewothers, caneditpost, candeletepost, canpostattachment, canpostpoll, canvote, cangetattachment FROM forumpermission WHERE forumid='".$fromid."'"); 
now when you call the script it will first delete the entire permissions for target (toid) forum and recreate them according to parent (fromid) forum..

Please do not apply this change to forumper.php, apply it to the second script you copy/pasted form forumper.php. Use forumper.php to copy permissions for a new forum and use the second script to update permissions for an existing forum..

I Hope it's clear.. :classic:
Reply With Quote
  #5  
Old 08-06-2002, 05:23 AM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

crystal clear

thanks a bunch.....it works like a charm

If I get the interface for it completed to make it all pretty, I will post it here for ya so you can release it if you want.
Reply With Quote
  #6  
Old 08-06-2002, 05:27 AM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

VB3 better have this
Reply With Quote
  #7  
Old 08-06-2002, 05:47 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ladyfyre
crystal clear

thanks a bunch.....it works like a charm

If I get the interface for it completed to make it all pretty, I will post it here for ya so you can release it if you want.
I prefer not to release hacks which I dont personally use/tested a long time so I'm not inclined to release it. But if you think it's appealing to others (which I doubt btw. ), you have my permission to release it..
Reply With Quote
  #8  
Old 08-06-2002, 05:53 AM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In that case, I guess once I have it all wrapped up I will do so, giving you full credit of course....

because I think MANY could stand to benefit from it...and because frankly, as large as my site is, if there was a bug in it's functionality, it would not take long at all for it to have popped up. But in the last several hours since it was installed, over 50,000 page views have occured in the areas it effected, and not one person has had a problem or sent in a help desk ticket....so it's definitely doing what it should be
Reply With Quote
  #9  
Old 10-01-2002, 10:26 AM
neocorteqz's Avatar
neocorteqz neocorteqz is offline
 
Join Date: May 2002
Location: Barefoot Bay Fl
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Logician

well I didnt design it to make updates but it's not hard to adapt anyway. Copy the content of the script to another script with a different name and add line:
PHP Code:
$DB_site->query("DELETE * from forumpermission WHERE forumid='".$toid."'"); 
before

PHP Code:
$permission=$DB_site->query("SELECT usergroupid,canview, cansearch, canemail, canpostnew, canmove, canopenclose, candeletethread, canreplyown, canreplyothers,  canviewothers, caneditpost, candeletepost, canpostattachment, canpostpoll, canvote, cangetattachment FROM forumpermission WHERE forumid='".$fromid."'"); 
now when you call the script it will first delete the entire permissions for target (toid) forum and recreate them according to parent (fromid) forum..

Please do not apply this change to forumper.php, apply it to the second script you copy/pasted form forumper.php. Use forumper.php to copy permissions for a new forum and use the second script to update permissions for an existing forum..

I Hope it's clear.. :classic:
I made a second file like you said. called up the script and got this error..

Invalid SQL: DELETE * from forumpermission WHERE forumid='12'
mysql error: You have an error in your SQL syntax near '* from forumpermission WHERE forumid='12'' at line 1
Reply With Quote
  #10  
Old 10-01-2002, 03:46 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My mistake..

The line

PHP Code:
$DB_site->query("DELETE * from forumpermission WHERE forumid='".$toid."'"); 
should be:

PHP Code:
$DB_site->query("DELETE from forumpermission WHERE forumid='".$toid."'"); 
Reply With Quote
Reply


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 06:40 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.04483 seconds
  • Memory Usage 2,299KB
  • Queries Executed 14 (?)
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
  • (6)bbcode_php
  • (3)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
  • (1)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete