Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

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
  #2  
Old 01-07-2007, 10:33 AM
WhaLberg's Avatar
WhaLberg WhaLberg is offline
 
Join Date: Nov 2006
Location: Dersaadet
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have any recommendations about these modification or question(s) please let me know.
Reply With Quote
  #3  
Old 01-07-2007, 02:56 PM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reserved for future use

anyway interesting modification, right now i use CYB HACK, but yours include the moderating rules ...
Reply With Quote
  #4  
Old 01-07-2007, 03:34 PM
Brew's Avatar
Brew Brew is offline
 
Join Date: Sep 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Our forums really don't have any rules for members.

But the option for rules for the moderator seems to be a good idea.

[installed]

Thanks!
Reply With Quote
  #5  
Old 01-07-2007, 05:44 PM
Brew's Avatar
Brew Brew is offline
 
Join Date: Sep 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<if condition="is_member_of($bbuserinfo, array('5','6','7'))">
Doesn't seem to be working.

All users see the same link.

Thanks!

edit: I fixed the problem....somehow...
Reply With Quote
  #6  
Old 01-07-2007, 05:47 PM
Brew's Avatar
Brew Brew is offline
 
Join Date: Sep 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


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

Are you sure that you've changed the username, password and database?
Reply With Quote
  #8  
Old 01-07-2007, 06:22 PM
Brew's Avatar
Brew Brew is offline
 
Join Date: Sep 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea man.

If it couldn't connect than I should be getting "Cannot connect the database.." errors.

So I'm really not sure what is going on.
Reply With Quote
  #9  
Old 01-07-2007, 06:32 PM
WhaLberg's Avatar
WhaLberg WhaLberg is offline
 
Join Date: Nov 2006
Location: Dersaadet
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code is:
PHP Code:
$smodquery "SELECT * FROM user WHERE usergroupid='5'";
$runsmodquery mysql_query($smodquery);
while (
$smod=mysql_fetch_array($runsmodquery)) { 
And it works great with me.. Hmm.. Let me think..
Reply With Quote
  #10  
Old 01-08-2007, 04:04 AM
Discussions Discussions is offline
 
Join Date: Nov 2006
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, this will come in handy.
Reply With Quote
Reply

Thread Tools

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 10:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04418 seconds
  • Memory Usage 2,303KB
  • Queries Executed 23 (?)
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
  • (5)bbcode_html
  • (2)bbcode_php
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)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_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