PDA

View Full Version : Easier editing of the forum rules upon registration


Dean C
04-06-2003, 10:00 PM
<font size="3">
Easier editing of the forum rules upon registration</font>

Now this isn't much of a hack but what always annoyed me about the forum rules is that they were in a template. Being lazy it was just a pain navigating through the ACP to the signupadult template. So i wanted a way of editing it via the vbulletin options section of the ACP. This hack basically gives you a new option in the ACP to edit the forum rules. It is compatible with all your html and by default uses the standard forum rules set in the signupadult template. However one advantage is that you only edit the text. There is no html tables or anything to muck up if your a html newbie.

Attachment:

Dean C
04-07-2003, 12:12 PM
<i>Space reserved for any rules that people use on the forums that they may wish to share</i>

Dean C
04-07-2003, 12:14 PM
Screenshot in the ACP:

NuclioN
04-07-2003, 01:26 PM
Nice, click install ;)

Lord Man
04-07-2003, 06:12 PM
Very nice ! ;)

Xyphen
04-07-2003, 06:58 PM
Nice thinking Mist, i wish i could've thought of that...

partang2
04-07-2003, 08:08 PM
Nothing shows up in admin cp... only the header of the hack..??!!

The rules are showing up all wrong too like $bbtitle etc...

Zelda-King
04-07-2003, 10:11 PM
I'm having the same trouble... with the 'header only' thing anyway. I see nowhere to edit rules though the query shows as having been executed successfully.

ZenithRS
04-08-2003, 06:13 AM
I had the same trouble too.

settinggroupid in the second query must match the settinggroupid generated by the first query. It won't necessarily be 42 as listed in the second query... in my case it should have been 33. Run both queries then edit the new entry in the "setting" table... set settinggroupid accordingly.

Or run the first query, check the settinggroupid generated, and change "42" in the second query to match before running it.

Zelda-King
04-08-2003, 07:06 AM
Ah right! Sorted that out. I have that $bbtitle problem now. It says $bbtitle instead of the name of my forums.

I just altered $bbtitle to the actual name though. :D

ZenithRS
04-08-2003, 07:48 AM
Yeah, same for me... and same solution. Just changed it manually :)

Dean C
04-08-2003, 07:55 AM
Darn forgot to match the query's up :)

I've updated the text file. If any one could englighten me as to why $bbtitle which is a global var is not being parsed correctly i'd be most interested?

- miSt

Kars10
04-08-2003, 05:43 PM
This is exactly what i was looking for!!! :)

Thanks Dean

* Kars10 licks install!

Dean C
04-09-2003, 08:26 AM
Your Welcome Karsten :)!

- miSt

Holidazed
04-14-2003, 07:33 PM
Where do I go to edit the forum rules now? There is not a link in the ACP that refers to rules. There is nothing in the instructions that refers to making the link or how to edit the rules.

Dean C
04-15-2003, 02:07 PM
You go into the 'vbulletin options' section of the Admin CP and its right down the bottom of the page ;)

- miSt

Holidazed
04-15-2003, 02:21 PM
Well, I see the section, but I do not have a field to type into. It just says "Forum Rules".

What did I miss?

Dean C
04-15-2003, 03:32 PM
Sounds like you didn't run all the queries ;)

Holidazed
04-15-2003, 04:23 PM
According to the instructions, I had to run the following queries.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INSERT INTO settinggroup (settinggroupid,title,displayorder) VALUES (NULL,'Forum Rules','78');

and

INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorde r) VALUES (NULL,42,'Rules','forumrules',' <p><normalfont>Registration to this forum is free!
We do insist that you abide by the rules and policies detailed below.
If you agree to the terms, please press the Agree button at the end of the page.
Note: By pressing the button you declare that you are over the age of 13.
If you are 13 or under, please use
<a href="register.php?s=$session[sessionhash]&action=signup&who=coppa&url=$url">this registration form</a>.</normalfont></p>

<p><normalfont>Although the administrators and moderators of $bbtitle will attempt to keep all objectionable messages off this forum,
it is impossible for us to review all messages. All messages express the views of the author,
and neither the owners of $bbtitle or Jelsoft Enterprises Limited (developers of vBulletin)
will be held responsible for the content of any message.</normalfont></p>

<p><normalfont>By clicking the Agree button, you warrant that you will not post any messages that are obscene,
vulgar, sexually-orientated, hateful, threatening, or otherwise violative of any laws.</normalfont></p>

<p><normalfont>The owners of $bbtitle have the right to remove, edit, move or close any thread for any reason.</normalfont></p>','Here is what the guests on your forum will see upon registration. They have to read this page and agree to the terms before registering.','textarea','1');
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I did not get any errors. Was there a query I missed?

Areku
04-15-2003, 04:25 PM
You probably missed the incorrect field number... Instead of 42 it might be 41, like in my case.

Holidazed
04-15-2003, 04:48 PM
Well, then how am I supposed to know what it should be and how do I fix it? I am not a programmer or database guy. I just follow the instructions and cross my fingers.

I understand that some of you have fixed it. What do I do to fix this once the query is already run? How do I undo what has been done and do it again correctly?

Areku
04-15-2003, 04:50 PM
Same here, i dunno why mist put 42 available to all...

DO what Zenith said, just use phpmyadmin to find out the last field number in your setting table and modify the 42 accordingly.

Holidazed
04-15-2003, 05:02 PM
Well, according to my setting table, "42" is my forum rules section. In fact it reads exactly like this.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INSERT INTO setting VALUES (184, 42, 'Rules', 'forumrules', ' <p><normalfont>Registration to this forum is free! We do insist that you abide by the rules and policies detailed below. If you agree to the terms, please press the Agree button at the end of the page. Note: By pressing the button you declare that you are over the age of 13. If you are 13 or under, please use <a href="register.php?s=$session[sessionhash]&action=signup&who=coppa&url=$url">this registration form</a>.</normalfont></p> <p><normalfont>Although the administrators and moderators of $bbtitle will attempt to keep all objectionable messages off this forum, it is impossible for us to review all messages. All messages express the views of the author, and neither the owners of $bbtitle or Jelsoft Enterprises Limited (developers of vBulletin) will be held responsible for the content of any message.</normalfont></p> <p><normalfont>By clicking the Agree button, you warrant that you will not post any messages that are obscene, vulgar, sexually-orientated, hateful, threatening, or otherwise violative of any laws.</normalfont></p> <p><normalfont>The owners of $bbtitle have the right to remove, edit, move or close any thread for any reason.</normalfont></p>', 'Here is what the guests on your forum will see upon registration. They have to read this page and agree to the terms before registering.', 'textarea', 1);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Do I change this to "78" like the first query makes reference too.

Too lost to decide.

Dean C
04-15-2003, 05:23 PM
Where did you get the 42 from - it says 78 in the textfile :s?

Holidazed
04-15-2003, 05:39 PM
I was looking at the wrong thing. The textfile says "78". Now I know that is nothing more than the display order (not being a database guru) so I left it alone.

Here is what you do:

1. Goto phpadmin and display your database.
2. Select the "setting" table and browse it.
3. Search for "forumrules"
4. Note the number in the "settinggroupid" column
5. Browse the "settinggroup" table
6. Find the entry titled "Forum Rules"
7. Edit the entry
8. Change the "settinggroupid" to the number you saw on the "setting" table.

This should completely fix it. It did for me.

LilDragonWings
04-15-2003, 06:24 PM
Thanks to Mist and Bitg...

Worked perfectly with Bitg's instructions on the database adjustment!

Now time to Chisel out my Commandments unto my community.

Word.

Holidazed
04-15-2003, 07:58 PM
I may not know how to do everything, but once I figure it out, it helps that I do technical support for a living.

Dean C
04-16-2003, 10:09 AM
But this makes no sense as to why you had this problem - the settinggroupid's in the textfile have no reference to 42 :s

- miSt

Zenith
04-16-2003, 11:03 AM
Today at 11:09 AM Mist said this in Post #28 (https://vborg.vbsupport.ru/showthread.php?postid=382851#post382851)
But this makes no sense as to why you had this problem - the settinggroupid's in the textfile have no reference to 42 :s

- miSt You sure about that?

From your textfile....

INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorder) VALUES (NULL,42,'Rules','forumrules','....

Dean C
04-16-2003, 11:33 AM
Presst Ctrl + F5 on the first page of this thread then tell me what you see?

LilDragonWings
04-16-2003, 02:18 PM
I'm not sure why it does what it does because I'm just learning mysql, but according to bitg's instructions to cross reference the group id's and such worked perfectly.

It seems like the "forum rules" box wasn;t married to the Forum rules category in my Admin CP correctly. Maybe because I had added other categories to my admin CP already?

Like I said, I'm just learning all this over the last two weeks. But that's what seems to be the problem, otherwise, I don't know why it worked, but matching up the ID numbers as bitg mentioned made everything better.

Hope that helps !

Dean C
04-16-2003, 03:26 PM
Well it's nothing on my end ;)

Basically i think the textfile hasn't been updated in people's cache :D

Zenith
04-16-2003, 09:05 PM
I see the same. A query in your text file inserts 42 into settinggroupid in the setting table.

INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorde r) VALUES (NULL,42,'Rules','forumrules','....

XFLBret
05-05-2003, 08:24 AM
I'm sorry, this doesn't work. I'm not a sql or database expert, but I can copy and paste with the best of "em, and that's what I did.

I copy and paste the first query, which is

INSERT INTO settinggroup (settinggroupid,title,displayorder) VALUES (NULL,'Forum Rules','78');

and i get the following error

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/bret/public_html/forums/admin/query.php on line 29

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/bret/public_html/forums/admin/query.php on line 33

then I run the second query, and get the following error:

INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorde r) VALUES (NULL,42,'Rules','forumrules',' <p><normalfont>Registration to this forum is free!
We do insist that you abide by the rules and policies detailed below.
If you agree to the terms, please press the Agree button at the end of the page.
Note: By pressing the button you declare that you are over the age of 13.
If you are 13 or under, please use
<a href="register.php?s=$session[sessionhash]&action=signup&who=coppa&url=$url">this registration form</a>.</normalfont></p>

<p><normalfont>Although the administrators and moderators of $bbtitle will attempt to keep all objectionable messages off this forum,
it is impossible for us to review all messages. All messages express the views of the author,
and neither the owners of $bbtitle or Jelsoft Enterprises Limited (developers of vBulletin)
will be held responsible for the content of any message.</normalfont></p>

<p><normalfont>By clicking the Agree button, you warrant that you will not post any messages that are obscene,
vulgar, sexually-orientated, hateful, threatening, or otherwise violative of any laws.</normalfont></p>

<p><normalfont>The owners of $bbtitle have the right to remove, edit, move or close any thread for any reason.</normalfont></p>','Here is what the guests on your forum will see upon registration. They have to read this page and agree to the terms before registering.','textarea','1');

XFLBret
05-05-2003, 08:36 AM
ok, i downloaded another version of the query.php file, and i got the first qquery to run, but the second still gives me trouble

XFLBret
05-05-2003, 08:38 AM
mysql error: You have an error in your SQL syntax near ';
' at line 1

Holidazed
06-03-2003, 10:28 PM
Now I am having a wierd problem. I have already installed a Quiz system on my site and it is using the "settinggroupid" of "42". When I install this hack, it makes the section in "ACP|vBulleting Options" called "Forum Rules" but it puts the forum rules form box in the "Quiz" section. See for yourself. when I change the "settinggroupid" to something I think is not being used, the form box goes away altogether. I don't get it.

How do I fix this?

Dean C
06-04-2003, 02:45 PM
Go to setting.php in your admin directory and manually remove the settings :)

Then change all instances of 42 in the queries that are meant to be run to something like 111 :)

- miSt

Holidazed
06-04-2003, 04:01 PM
What settings are in the setting.php file? When installing this hack, there was no mention of modifying that file.

When I change the "42" int he database, the forum rules dissapear altogether, but the category stats the same.

WEForums
06-04-2003, 04:03 PM
Today at 06:01 PM bitg said this in Post #39 (https://vborg.vbsupport.ru/showthread.php?postid=404349#post404349)
What settings are in the setting.php file? http://www.yoursite.com/forums/admin/setting.php

Remove whatever option was added to the vBulletin Options page.

Holidazed
06-04-2003, 07:14 PM
WEForums, Understood what Mist was talking about. I am saying that when installing this hack, i made no (that is "0") changes to the "admin/setting.php" file. So, now I ask again. What am I supposed to remove from this file?

I looked at the file and saw no reference to "Forum Rules" at all.

Holidazed
06-10-2003, 02:47 PM
Is anybody going to help me with this?

Holidazed
06-30-2003, 07:49 PM
Hello? anybody here?

Gutspiller
07-04-2003, 10:25 PM
What if I don't have a signupadult template? :confused:

Holidazed
07-15-2003, 02:16 PM
Come on guys. I need a bit of help here.