Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Rules Page for users and moderators Details »»
Rules Page for users and moderators
Version: 1.00, by WhaLberg WhaLberg is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.6.4 Rating:
Released: 01-06-2007 Last Update: Never Installs: 10
Template Edits
Additional Files  
No support by the author.

You want to have a page which includes the rules that must be followed by the users and moderators / admins. But they must be seperated and drop downed from the navbar link "Rules". If so, here is what you need..

You must write your own rules of users for sections, and also you must write the rules of moderators.

What you need to install?
- Upload the rules.php, modrules.php and mods.php to your home directory.
- Do not forget to change the database name, user name and password in mods.php

PHP Code:
// ######################### SQL THINGS ############################

mysql_connect('localhost''username''password') or die("Cannot connect the database..");
mysql_select_db('databasename') or die("Cannot select the database.."); 
- Go to Styles & Templates -> Style Manager -> the Style that you use
- Click to Add New Template from the right top drop down menu.
- Change the title as "userrules" and copy the codes in userrules.txt .
- Click to Add New Template again.
- Change the title as "moderatorrules" and copy the codes in moderatorrules.txt.
- Click to Add New Template again.
- Change the title as "mods" and copy the code in mods.txt.
- Click to Add New Template again.
- Change the title as "supmods" and copy the code in supmods.txt.
- Go to Styles & Templates -> Style Manager -> the Style that you use
- Open the navbar template from Navbar Templates.
- Find (in navbar):
HTML Code:
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td> </if>
- After add:
HTML Code:
<td id="rules" class="vbmenu_control"><a href="$show[nojs_link]#rules">Board Rules</a> <script type="text/javascript"> vbmenu_register("rules"); </script></td>
- Find (in navbar):
HTML Code:
<!-- / user cp tools menu -->
</if>
- After add:
HTML Code:
<!-- rules menu -->
<if condition="$show['member']">
<div class="vbmenu_rulepopup" id="rules_menu" style="display:none">
		<table cellpadding="4" cellspacing="1" border="0">
		<tr><td class="thead">Board Rules</td></tr>		
		<tr><td class="vbmenu_option"><a href="rules.php">User Rules</a></td></tr>
		<if condition="is_member_of($bbuserinfo, array('5','6','7'))"><tr><td class="vbmenu_option"><a href="modrules.php">Moderator Rules</a></td></tr></if>
		</table>
	</div><else />
<div class="vbmenu_rulepopup" id="rules_menu" style="display:none">
		<table cellpadding="4" cellspacing="1" border="0">
		<tr><td class="thead">Board Rules</td></tr>		
		<tr><td class="vbmenu_option"><a href="rules.php">User Rules</a></td></tr>
		</table>
	</div>
	</if>	
	<!-- / rules menu -->
I hope this helps you and please don't be shy to ask any questions.

You can do anything you want to this addon.

Don't forget to click install.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-08-2007, 02:19 PM
WhaLberg's Avatar
WhaLberg WhaLberg is offline
 
Join Date: Nov 2006
Location: Dersaadet
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Brew View Post
When looking at the Board Management page I get this at the top of the page:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mods.php on line 27

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mods.php on line 40


Okey.. If you have prefix for tables like vb_something, then you should use like that:

PHP Code:
$smodquery "SELECT * FROM prefix_user WHERE usergroupid='5'"
PHP Code:
$modquery mysql_query("SELECT * FROM prefix_moderator"); 
and also

PHP Code:
$modquery_2 mysql_query("SELECT * FROM prefix_user WHERE userid='$useridd'"); 
Your sincerely.
Reply With Quote
  #13  
Old 01-08-2007, 02:21 PM
Brew's Avatar
Brew Brew is offline
 
Join Date: Sep 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's perfect man!

All is working according to plan now

Thank you for your great help with this!
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 09:18 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.04170 seconds
  • Memory Usage 2,240KB
  • Queries Executed 19 (?)
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
  • (4)bbcode_html
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)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