Log in

View Full Version : Rules hack


HiDeo
08-12-2004, 10:00 PM
Rules hack [3.0.3]

???????????????????????????????????????????
vB Version: vBulletin 3.0.3
Author: HiDeo
Email: webmaster@programmation-web.org
Site: http://www.programmation-web.org
???????????????????????????????????????????

Hack Information

Administrator can create rules for a forum !
Members and guests can see the rules.

Hack Specifications


vbphrases
navbar link
add, edit or delete rules via admincp


Hack Test

I test this hack on vBulletin 3.0.3

Hack Support

The support will be given here in this thread and at Programmation Web (http://www.programmation-web.org).

Hack Demos

Here (in french) (http://www.programmation-web.org/rules.php)

Important


If you do install this hack, please click on the INSTALL button. There are going to be some updates for this which you're really not going to want to miss!
It's my first hack in vb.org !!

Polo
08-13-2004, 12:53 PM
Nice, great job, thanks for sharing!

*clicks install*

Polo
08-13-2004, 02:07 PM
Ok, this mod is great... loved it... anyways, for those who would like to have their rules listed by date, (oldest first instead of newest rules first) change the following around line 55 of rules.php:

$rules = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rules ORDER BY ruleid DESC");

to

$rules = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rules ORDER BY ruleid ASC");

TheComputerGuy
08-13-2004, 02:07 PM
Awesome hack! I like this alot

Polo
08-13-2004, 02:13 PM
Members can only see the rules.

What do i need to modify so that everyone, even guests can see the rules?

HiDeo
08-13-2004, 03:22 PM
Very nice modifications polo ! ;)

Members can only see the rules.

It's an error, first post edited

Koutaru
08-13-2004, 03:49 PM
Nice Hack :) I'll definately be using this probably with another rules hack

ranger2kxlt
08-13-2004, 07:04 PM
Whats the main purpose, seems like others seem to like it, but not really sure how it works or what it does....Some insight please :-D

turbidblue
08-14-2004, 12:52 AM
thanks!

* turbidblue clicks install :)

dndog
08-14-2004, 05:13 PM
Bravo! Excellent hack.

/me clicks install.

Battle_Ring
08-14-2004, 09:42 PM
Hmmm, I Click Rules, And A Blank Screen Shows Up!....Help Me Plz

Battle_Ring
08-14-2004, 09:49 PM
Oh Nvm, My Fault...Got It...Great Hack!

mrboz
08-15-2004, 02:10 PM
when i view the rules page the main section is too wide.

my forums have a width of 770, the main rules page sticks out, but if i view a rule it's back to the correct width

why is this?

(see attached picture)

daFish
08-15-2004, 05:55 PM
Wow.
I was looking for this and will install it in the next days.

Great work.

Polo
08-16-2004, 12:23 PM
when i view the rules page the main section is too wide.

my forums have a width of 770, the main rules page sticks out, but if i view a rule it's back to the correct width

why is this?

(see attached picture)

in the template "rules"

find

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="70%" align="center">

and change 70% to what fits you best ;)

mrboz
08-18-2004, 07:47 AM
in the template "rules"

find

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="70%" align="center">

and change 70% to what fits you best ;)no that affects the rule list table only, not the width of the page.
i found out what is was tho...

there was no $stylevar[htmldoctype] at the top of the rules template

Caiman
08-26-2004, 12:22 PM
Can't use HTML?

Mickie D
08-27-2004, 09:10 PM
i installed this great hack but its not the one i was after :(

i was sure i read that you could make your members agree to the rules or they would not be allowed to view the forums ?

HiDeo
08-27-2004, 09:34 PM
No, it's simply a display of your rules, but you can edit the rules in the register form ! Members have to agree this rules or they would not be allowed to view the forums

nelto
09-06-2004, 03:12 AM
I just installed this, but....
where do I go on the admin area to insert my rules?
I cant find anything there.

Mamochka
10-20-2004, 07:48 PM
I have a problem.
I have installed the hack,but i became an error from MySQL in init.php :
Line 517

What can i do?
I need this hack.

HiDeo
10-20-2004, 09:11 PM
I suggest you to desinstall and reinstall the hack because I can't see the bug and nobody tell me about this bug !

Mamochka
10-21-2004, 02:31 PM
Hallo!

Just now i have reinstall hack.
Here is error:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /www/includes/init.php on line 517

Database error in vBulletin :
Invalid SQL:
SELECT * FROM style
WHERE (styleid = 0 AND userselect = 1)
OR styleid =
ORDER BY styleid ASC
LIMIT 1
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY styleid ASC
LIMIT 1' at line 4
mysql error number: 1064

Script: http://www.*****/rules.php?
Referer: http://www.****/rules.php?

My init.php line 517:
), $specialtemplates);

OR styleid =
The value is empty.
Where is a problem?

rex_b
10-30-2004, 09:19 PM
I have a question.

I changed the name of the files to advertise.php and admincp/advertise.php and I changed the code where everytime I saw rules.php i put advertise.php

Now I got the hack all going I can access advertise.php and I can see the stuff in the admincp but when I try to add something in the admincp it just gives me a blank screen.

Did I miss something?

rex_b
10-31-2004, 06:53 PM
anybody ^^^^

HiDeo
10-31-2004, 08:28 PM
Do you edit the .php files ?

rex_b
10-31-2004, 10:01 PM
edited them everywhere it said rules.php I changed to advertise.php

X-Fan
11-13-2004, 04:01 AM
Cool hack, thanks!

I have a request, though, and that is to be able to select the order that the rules are displayed in. Is that possible to do?

rex_b
11-16-2004, 06:31 PM
edited them everywhere it said rules.php I changed to advertise.php

I figured it out. Just leave the admincp/rules.php the same. And it works!

shadiguy1
11-26-2004, 10:44 AM
for some reason everything works for the rules hack except the Button in the admincp is showing up blank then if u click the blank button it will show rules manager and add a rule. Any info would be greatly helpful and yes the hack is working otherwise i can ad rules and they will display on the forums if clicked just the title of the button in admincp is not working please help

Delphiprogrammi
12-16-2004, 03:41 PM
installation went fine but no rules i add them but they don't show up in the attached image you'll see what i mean

TwinsX2Dad
12-16-2004, 04:21 PM
Did you upload the rules.php files correctly?

One goes in your forum root directory, while the other (admin/rules.php) goe in your admincp folder.

My install went flawlessly, even though I did a little customizing on the fly.

*** install clicked ***

trevelyn1015
12-16-2004, 04:31 PM
Execute this request :

CREATE TABLE rules (
ruleid int(5) unsigned NOT NULL auto_increment,
title varchar(50) NOT NULL default '',
description mediumtext NOT NULL,
PRIMARY KEY (ruleid)
) TYPE=MyISAM;

?????????????????????

Delphiprogrammi
12-16-2004, 04:44 PM
hehe the database table is already there otherwise it wouldn't work at all i see that "nav groep" in my acp i can even add rules but ....

HiDeo
12-16-2004, 09:35 PM
TRy to reupload the rules.php files !

FlyingHammer
01-01-2005, 12:05 AM
aight, I know htis is a stupid mistake on my part some where. I have been at this for 2 pathetic hours, I have deleted and reinstalled, checked the list twice, 2 problems.

1. Rules is NOT showing up on the navbar --I bet this is a style error of somesort, I only have 2 styles default and HT I have done everything in HT.

2.The button in the admincp DOES NOT say Rules manager --I redid the phrases trying to correct this and looked in the rules.php.

Any help please, ohh and I have the forums shut off for this and about 4 other hacks, simply due to backing it up and haveing people post whaile I was working onit. I found it easier to tell em to wait thatn to deal with loosing their posts when ya have to restore from the backup so time is of the essance here.

THANKS, Hammer

FlyingHammer
01-01-2005, 09:58 PM
Alrighty then, I got #'s 1 and 2 fixed, now when I click on the "rules" in the nav dar I get a blank whit screen. I am able to add rules in the admincp, its on the navbar all is coolio but the blank whit screen.

I have uploaded rules.php twice to double check nd I have them in the right folders. Any help?

stevey
03-21-2005, 07:15 PM
Alrighty then, I got #'s 1 and 2 fixed, now when I click on the "rules" in the nav dar I get a blank whit screen. I am able to add rules in the admincp, its on the navbar all is coolio but the blank whit screen.

I have uploaded rules.php twice to double check nd I have them in the right folders. Any help?

i have just installed it and have the same problem, when you go to rules page its just a blank screen ? thanks

Polo
03-21-2005, 08:29 PM
you need to probably add the templates in step 4

stevey
03-21-2005, 11:47 PM
thanks :) i missed one of templates out. working now :D

Polo
03-22-2005, 01:40 AM
thanks :) i missed one of templates out. working now :D
glad you got your problem fixed :)

Blackbeard
04-22-2005, 11:57 AM
Is it posible to show all the rules in one list instead of each rule being a different page.

nnjj.net
05-14-2005, 12:54 PM
this is very nice, but its not like the one used here in VB.org, how I can have the same one?

italks
09-11-2005, 06:20 PM
I have done everything but there is only one problem.The vB code on rules page doesnt work for me for some reason please help me out.

http://www.italks.net/rules.php?

bigcurt
09-24-2005, 08:47 PM
Ok guys, I have a question...for some reason it auto CENTERS it, I dont want my rules centered..how do I "un center" them

~Curt

DS MrSinister
09-28-2005, 04:33 AM
any plans on porting this bad boy over to 3.5?

:D

jokerz
10-30-2005, 09:11 AM
Very easy to install but instruction is hard to understand... No problem so far but!

"Could not find phrase 'saved_rule_x_successfully'"

I did add that in phase (Type Help Control Panel Stop Message)

jokerz
10-30-2005, 10:40 AM
Nevermind. I upgraded to the latest version

vtx1800
12-07-2005, 07:14 AM
Anyone know if this or another rules page hack will run on 3.5.2?

chet
12-23-2005, 05:03 PM
any plans on porting this bad boy over to 3.5?

:D

*bump* or at least a slight nudge

In need
12-29-2005, 04:01 PM
Hi

The first step, which asks me to execute a request. Is that Execute SQL Query?

chet
12-29-2005, 04:02 PM
Anyone?

akanevsky
12-29-2005, 05:20 PM
This hack doesn't seem to be supported, use my vBRules hack instead ;)

chet
12-29-2005, 08:51 PM
Yep got it thanks

In need
12-29-2005, 09:56 PM
I just gotta know guys..

is executing a request and executing an SQL Query, the same thing?

akanevsky
12-29-2005, 09:59 PM
Depends on what you mean by executing a request.. ;)

In need
12-29-2005, 10:01 PM
Depends on what you mean by executing a request.. ;)
well it has to do with creating a table for the rules, please help.

Hasann
12-30-2005, 12:20 AM
i have updated to 3.5.1 but give error and show 0 :o where I made wrong

In need
12-30-2005, 12:24 PM
I just gotta know guys..

is executing a request and executing an SQL Query, the same thing?

can anyone help?

In need
01-01-2006, 10:40 AM
Fixed the problem :D