Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Cyb - Advanced Forum Rules Details »»
Cyb - Advanced Forum Rules
Version: 4.0.5, by Valter Valter is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.7.x Rating:
Released: 04-29-2008 Last Update: 05-16-2011 Installs: 687
DB Changes Uses Plugins Auto-Templates
 
No support by the author.

Info:
Advanced Forum Rules system for vBulletin.

Main Features:
-Rules shown on separate page (no file uploads required)
-Several sets of rules can be created and applied to individual forums
-Choose between BB codes and HTML in rules
-Options to force users to accept Forum Rules before can view forums or threads, post replies, PMs, or e-mails...
-Option to replace registration rules with this product ones
-Option to reset user acceptance status when infraction is received

View screenshots.


Installation:
1. Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product]
2. OPTIONAL (for some customized styles)
Open template "navbar" and add "$cyb_frules_link" after "vbphrase[faq]</a></td>".
3. OPTIONAL (to add 'reset acceptance status' to different place than default one)
Open template "MEMBERINFO" and add "$cyb_frules_force" wherever you wish.


To set options:
Go to: AdminCP > vBulletin Options > Cyb - Advanced Forum Rules


Versions:
v1.0 - Oct 06. 2005.
-First version
v1.5 - Apr 22. 2006.
-Navbar link is added automatically now (one installation step less)
-Navbar "Forum Rules" link can be disabled in hack settings
-"Manage Rules" link is on settings page now (no need for .xml menu file anymore - one file less to upload when installing)
-"Unknown Location" fixed
-Added function to enable/disable whole hack (predefined error message is displayed instead)
-Templates now goes to "Cybernetec" group in Style Manager
To upgrade from 1.0 to 1.5:
-Import product XML through AdminCP > Plugin System > Manage Products > [Add/Import Product] (Be sure "overwrite" is checked). Upload cfrules.php and cfrulesadmin.php (replace old files). Delete file \includes\xml\cpnav_cfrulesadmin.xml.
v1.6 - Aug 04. 2006.
-Release of this hack for vB v3.6
v1.7 - Aug 05. 2006.
-Uncached template bug fixed
v2.0 - Aug 07. 2006.
-Completely changed way this hack works. No more queries, no more file uploads. Now Rules can be exported because it's part of vB settings. Now you can use BB Codes, which means you can use all standard text formatting functions, smilies, etc. To upgrade: Uninstall old version > Import XML as product > Delete "cfrules.php" from your forums root > Delete "cfrulesadmin.php" from "admincp" folder of your forums
v2.1 - Aug 07. 2006.
-Fixed "Edit Forum Rules" link (didn't worked for some users)
v2.2 - Aug 25. 2006.
-If your forum's index.php file was renamed, for any reason, now you can enter new filename in ACP hack options to have this hack working properly
-Added "Product Version Checking" - https://vborg.vbsupport.ru/showthread.php?t=124679
v2.3 - Aug 26. 2006.
-New: User must accept Rules to be able to post on Forums (option can be disabled/enabled)
-Look improved (see screenshots)
-Codes improved
-Hack name changed to "Cyb - Advanced Forum Rules"
v2.4 - Aug 27. 2006.
-Fixed small javascript bug
-Removed redirection to forum index after Rules acceptance
-Note 1/2 lines replaced by boxes in hack settings
-Removed navbar link HTML Markup options
-Separate phrase created for navbar link
v2.5 - Aug 31. 2006.
-Added ability to reset read status for all users. After this they will need to accept the Forum Rules again
-Added note at the top of Forum Rules when user need to accept it to be able to post on forums
-Added explanation on how to check which users had (not) accepted Rules
v2.6 - Aug 31. 2006.
-Fixed bug (index file location/name setting doesn't work)
-Fixed bug (if user who haven't accepted Rules try to post via quick reply in IE he gets undefined error)
-Fixed bug (resetting the accepts doesn't work if index file was renamed)
-Added: Guests now also need to accept Forum Rules to be able to post (cookie-based)
-Added: redirection message for user who try to post but haven't accepted Rules
v2.6.1 - Aug 31. 2006.
-Fixed bug (if user has no permissions to post he will get standard "no permission" message, not redirection to Forum Rules)
v2.7 - Sep 11. 2006.
-After acceptance users are redirected to the page they were previously viewing
-No more need to set filename for "index.php" if it was renamed. Now misc.php is used, which nobody has need to rename.
NOTE: Don't forget to update the links to the Rules you were posted on your site - change it to YOURFORUMS/misc.php?do=cfrules
-Added confirmation dialog for resetting acceptance status for all registered users
v2.8 - Sep 14. 2006.
-Added option to exclude usergroups from accepting Rules
-Navbar link title moved from phrases to settings for easier translation/make-up
v2.9 - Sep 24. 2006.
-Added option to reset acceptance status for individual member
v3.0 - Oct 30. 2006.
-Whole code is now valid XHTML 1.0 Transitional
v3.1 - Nov 13. 2006.
-Option to force user to accept rules again in member profile can be turned off
-Added variable for above function that you can place it to another place in MEMBERINFO template ($cyb_frules_force)
-Bug fixed (if some user knows exact link for resetting acceptance status he can do it)
-Several other improvements/fixes
v3.2 - Mar 06. 2007.
-New: User must accept Rules before can send PMs
-New: Options to choose what user can't do before accepting Rules
-New: Option to replace Registration Rules with this hack's one
-New: Better counter (with miliseconds, improved browser compatibility)
-Fixed some "invisible" bugs in code and improved compatibility with the latest vB releases
v3.3 - Apr 21. 2007.
-New: Option to force user to accept Rules before can view forums
-Fixed bug where three queries are executed on places where not needed
-Fixed bug where blank rows are shown twice on registration rules page
-New in registration rules options (disable completely)
-Better redirection after Rules acceptance
-Some other optimizations in codes...
v3.4 - Apr 22. 2007.
-Fixed bug where PMs can not be sent even Rules are accepted
-Fixed bug where Quick Reply does not work even Rules are accepted
-Improved counter and added ability to completely disable it (tested and worked on IE, Firefox, and Opera)
-Improved compatibility with right-to-left styles (note: in Rules use [right] tags anyway)
-Fixed navbar link
v3.5 - Jul 22. 2007.
-Fixed bug (MySQL injection vulnerability - attacker can trick admin to reset rules acceptance status for all members)
-Group membership checking works now for supplementary usergroups too
-Several code improvements
v3.5.1 - Jul 22. 2007.
-Fixed bug (XSS Vulnerability)
v3.5.2 - Jul 23. 2007.
-Another security exploit fixed
v3.5.3 - Jul 25. 2007.
-Fixed bug where user is not properly redirected after accepting rules
v3.5.4 - Jul 25. 2007.
-Bug fixed where username info is not shown when going to reset acceptance status
v3.6 - Oct 14. 2007.
-Fixed bug where some mods are not able to reset acceptance status
-Improved javascript code to fix problems with the counter some users reported
-Minor bug fixes
v3.7 - Apr 30. 2008.
-CSRF protection added
-Compatible with vBulletin 3.7 Gold (may not work with Beta/RC releases)
-Fixed bug where "reset all" button in hack options does not work in IE
-Minor bugs fixed
v3.8 - Jun 19. 2008.
-Fixed bug where user is able to submit form without checking "agree"
-Option to disable BB Codes in Forum Rules
-Option to change "Forum Rules" link color or set to style's default
-Better placement of "Force User To Accept Forum Rules" link in user profiles
v3.9 - Apr 19. 2009.
-New: Ability to create several rules sets, and apply them to individual forums
-New: Exclude individual forums from restrictions
-New: Rules management page where rules sets can be easily added/deleted/edited/applied to forums
-'General Forum Rules' item can be changed but not deleted. Please use it always as general rules.
-Bug fix: Option to disable registration rules does not work on vB 3.8.x
-Bug fix: Counter on 'Accept rules' button does not work on some configs
-Forum Rules link in showthread now leads to this product's 'General Forum Rules'
-If user has not accepted rules, then 'Force to accept rules' link in their profile is not shown
-New: Option to reset user acceptance status when infraction is received
-Some minor bugs fixed
v3.9.1 - Apr 20. 2009.
-Fixed bug: Forum Permissions sometimes needs to be rebuild manually after upgrade
-Fixed bug: Redirection after accepting rules does not work properly in some cases
v3.9.2 - Apr 21. 2009.
-New: Drop-down menu with the rule set list on Rules page
-New: General Rules always shown at the top of table, requested Rules below it
-New: 'Forum Rules' link at the bottom of forumdisplay will lead user to that forum's rule set
-Fixed bug: Navbar link is not disabled when you disable product in options
-Fixed bug: Quick Reply hidden for users who have not accepted Rules even if forum is excluded from restrictions
-Forums better sorted on the list, now linked and some more details are shown
v3.9.3 - Apr 25. 2009.
-New: User can not view Rule sets applied to no-permissions-to-view forums
-Above works also with 'Cyb - Advanced Permissions Based on Post Count' add-on
-New: Choose if General Rules will be Always shown, Collapsed if there is another rule set requested, or Disabled when there are other rules shown
-'Forum Rules' links in showthread, newthread, and newreply are also now redirected to the Cyb Forum Rules
-New: "Rules NOT accepted" shown in user profiles when they have this status
v4.0 - Apr 28. 2009.
-New: User must accept Rules to be able to view thread content
-New: User must accept Rules to be able to send e-mails ('contact us' or 'e-mail user')
-New: Different Rule sets are accepted individually
-New: Reset acceptance status for individual Rule sets
-New: Rules acceptance date/time info shown in member profile
-Fixed bug: Quotes can not be used in Rule Set name
-Some minor bugs fixed
v4.0.1 - Apr 28. 2009.
-Fixed bug: Reply w/quote switches to basic reply after redirection
-Fixed bug: Forums exclusion does not work properly in v4.0
-New: When PM restrictions are enabled Quick Reply is hidden in ShowPM until General Rules are accepted
v4.0.2 - May 08. 2009.
-Fixed bug: In some cases wrong items are listed in 'Accepted Rules' drop-down
-Fixed bug: 'Reset user acceptance status when infraction received' does not work properly
v4.0.3 - May 04. 2011.
-Security bug fixed
v4.0.4 - May 06. 2011.
-Fixed: vbseo users not able to switch rules
v4.0.5 - May 18. 2011.
-Fixed: Security bug
-Improved rule acceptance check


If you like this hack please click INSTALL.

Show Your Support

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

Comments
  #132  
Old 07-13-2008, 12:32 PM
Chimpie's Avatar
Chimpie Chimpie is offline
 
Join Date: Nov 2007
Location: Sarasota, Florida
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ingress View Post
Which template do you mean exactly? I didn't alter any templates for this hack to work since it does everything automatically.
You said you changed " to ' or something like that.
Reply With Quote
  #133  
Old 07-13-2008, 01:48 PM
Ingress Ingress is offline
 
Join Date: Nov 2007
Location: Germany
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That was just in a translation of a phrase.

Ingress
Reply With Quote
  #134  
Old 07-13-2008, 05:40 PM
ShackMaster ShackMaster is offline
 
Join Date: Apr 2006
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ingress View Post
Which browser(s) do you use for your tests? Since it's yourself everytime that does the testing (that is what I understood) we should be certain about it's not a client issue.

Hey, 463 installs of this mod and it's only us three who observed the error. There must be something in common although I managed to fix it for my board.

Ingress
A member brought this to my attention. I then logged in as this member and it gave me the same problem. I logged in randomly as a couple of other members and still had the same problem. I decided then to register myself as a new member to test it. I have tested it in IE7 and FF from my laptop at home and my work computer in another city. I have reinstalled it twice. I am about out of options on what to do or try next.

For it to be working fine and then after PL1 it start acting up is strange to me.
Reply With Quote
  #135  
Old 07-14-2008, 02:39 AM
ShackMaster ShackMaster is offline
 
Join Date: Apr 2006
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still puzzling me.

I went back and disabled all of the plugins that I installed after this one and even a few before this one. Uninstalled this plugin and re-installed it. Still the Submit button does nothing and freezes if I place a countdown on it.

When I mouse over it shows the link, "misc.php?do=cfrulesagree"

The link is already "forums/misc.php?do=cfrules" ... if I add "agree" to the end and enter, all works well. So the problem is that the submit button is not acting as an enter click.
Reply With Quote
  #136  
Old 07-14-2008, 03:33 AM
ShackMaster ShackMaster is offline
 
Join Date: Apr 2006
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's a temporary fix, but could be permanent I suppose. I altered the cyb_frules as follows:

Code:
<td class="alt1" align="center" style="background-color:#DEF3BD;color:black;">
<phrase>$vbphrase[cybfrules_iagree_note]</phrase>
<a href="http://www.hometheatershack.com/forums/misc.php?do=cfrulesagree">
<img src="http://www.hometheatershack.com/images/submitbutton.gif" border="0" alt="Press this button!" />
</a>
</td>
I basically just made my own submit button with the link that clears the new member. So far it seems to be working okay.
Reply With Quote
  #137  
Old 07-14-2008, 10:24 AM
Xenofox Xenofox is offline
 
Join Date: May 2007
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think i have this working so that it doesn't require JS anymore.

This removes the countdown timer completly.

Code:
	$stylevar[htmldoctype]
	<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
	<head>
	$headinclude
	<title>$vboptions[bbtitle] - $vbphrase[cybfrules]</title>
	<if condition="(!$cfrulesagreed AND $cfrshowaccform)">
		<script language="JavaScript" type="text/javascript">
			function Cafr_checkAgree(form) {
				if (form.cafr_agree.checked)
				{
					form.submit();
				}
				else
				{
					alert("$vbphrase[cybfrules_not_agreed]");
				}
			}
			<if condition="($vboptions[cybfrules_time]!='')">
				var cyb_ms = 0;
				var cyb_s = $cyb_counter_time;
				function Cafr_buttonCounter() {
					cfrules_counter = fetch_object('cfrules_counter');
					if (cyb_ms <= 0)
					{
						cyb_ms = 9;
						cyb_s -= 1;
					}
					if (cyb_s <= -1)
					{
						cyb_ms = 0;
						cyb_s += 1;
						cfrules_counter.disabled = false;
						cfrules_counter.value = "$vbphrase[submit]";
					} else {
						cyb_ms -= 1;
						cfrules_counter.disabled = true;
						cfrules_counter.value = cyb_s + "." + cyb_ms;
						setTimeout("Cafr_buttonCounter()", 100);
					}
				}
			</if>
		</script>
	</if>
	</head>
	<body <if condition="(!$cfrulesagreed AND $cfrshowaccform)">onload="Cafr_buttonCounter();"</if>>
	$header
	$navbar

	<if condition="(!$cfrulesagreed AND $cfrshowaccform)">
		<form action="misc.php?do=cfrulesagree" name="agree_cfrules" id="agree_cfrules" method="post" onsubmit="return false;">
		<input type="hidden" name="securitytoken" value="$cybfr_sectok" />
	</if>
	<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
		<tr>
			<td class="tcat" align="$stylevar[left]"><if condition="($bbuserinfo[usergroupid]==6)"><a class="smallfont" style="float:$stylevar[right]" href="$admincpdir/options.php?do=options&dogroup=cfrules#editrules" title="$vbphrase[cybfrules_edit]" accesskey="E" target="_blank">$vbphrase[cybfrules_edit]</a></if>$vbphrase[cybfrules]</td>
		</tr>
		<if condition="(!$cfrulesagreed AND $cfrshowaccform)">
			<tr>
				<td class="alt1" align="center" valign="middle" style="background-color:#DEF3BD;color:black;"><phrase 1="$bbuserinfo[username]">$vbphrase[cybfrules_agree_note]</phrase></td>
			</tr>
		</if>
		<if condition="($vboptions['cybfrules_note1']!='')">					
			<tr>
				<td class="panelsurround" align="center">
					<div class="panel" align="$stylevar[left]">
						<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
							<tr>
								<td class="smallfont" align="$stylevar[left]">
									$vboptions[cybfrules_note1]
								</td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
		</if>
		<tr>
			<td class="panelsurround" align="center">
				<div class="panel" align="$stylevar[left]">
					<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
						<tr>
							<td class="smallfont" align="$stylevar[left]">
								$vboptions[cybfrules_rules]
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
		<if condition="($vboptions['cybfrules_note2']!='')">					
			<tr>
				<td class="panelsurround" align="center">
					<div class="panel" align="$stylevar[left]">
						<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
							<tr>
								<td class="smallfont" align="$stylevar[left]">
									$vboptions[cybfrules_note2]
								</td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
		</if>
		<if condition="(!$cfrulesagreed AND $cfrshowaccform)">
			<tr>
				<td class="alt1" align="center" valign="middle" style="background-color:#DEF3BD;color:black;"><input type="checkbox" name="cafr_agree" value="1" />&nbsp;<phrase 1="$vboptions[bbtitle]">$vbphrase[cybfrules_iagree_note]</phrase>&nbsp;&nbsp;<input type="submit" class="button" style="width:80px;" value="$vbphrase[submit]" onclick="Cafr_checkAgree(this.form);" /></td>
			</tr>
		</if>
	</table>
	<if condition="(!$cfrulesagreed AND $cfrshowaccform)">
		</form>
	</if>
	<br />
	$footer
	</body>
	</html>
Reply With Quote
  #138  
Old 07-18-2008, 04:30 PM
Crystal Shards Crystal Shards is offline
 
Join Date: Nov 2006
Location: Illinois
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am trying to edit the template for Blaze on my site (http://mercuryice.com)... If you change the template to Blaze you can see my problem--in the header the background is black, and I want to change that, but I can't find the right code anywhere.

http://img178.imageshack.us/img178/5...problemvf4.jpg

~Crystal
Reply With Quote
  #139  
Old 07-18-2008, 05:41 PM
Crystal Shards Crystal Shards is offline
 
Join Date: Nov 2006
Location: Illinois
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you.

~Crystal
Reply With Quote
  #140  
Old 07-18-2008, 05:41 PM
Ingress Ingress is offline
 
Join Date: Nov 2007
Location: Germany
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The upper link does use the same CSS as the lower one. You need to deactivate "Automatically add "Forum Rules" to Navbar" in the options and add the links manually. While doing this assign the according CSS classes to the links for them to be styled differently from each other.

For information about how to manually add the links have a look into info.txt. It's only a $cyb_frules_link that must be added to the templates.

Ingress
Reply With Quote
  #141  
Old 07-18-2008, 08:47 PM
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Location: MSK-RU
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cybernetec, 1st, thanks for "Option to change "Forum Rules" link color or set to style's default".
2nd, it will be nice if you move the phrase and the color to the new template.

Because for example on my forum every link in navtab has its own icon.
And every style has its icons.
So if your product had one more template with "Forum Rules" phrase it will be wonderfull.
Because in the current varinat of how the "Forums Rules" is coded it is not so easy to add some icon or decoration separate for every style.

If you didn't understand we, tell we I will try to say in other words.

Thank, Maxim
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 12:42 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.13963 seconds
  • Memory Usage 2,344KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (2)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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