MyBB Community Forums

Full Version: Rules Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was trying to use Zaher's tutorial here about including your header and footer ect in custom pages you make, but I tried it and I keep getting

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /usr/local/djcsites/dajoob.com/firefox/rules.php on line 2

Parse error: syntax error, unexpected T_STRING in /usr/local/djcsites/dajoob.com/firefox/rules.php on line 2

Here's my rules.php file:
[attachment=3039]

and here's my template file I used:
[attachment=3040]


Is there anything wrong with them? Please help me with this cause I want to make more custom pages!

FW
You had some REALLY weird syntax going on, and half the template wasn't html....

no wonder you got errors!

Changed files attached.
The eval is all wrong though. The eval must be like this in the rules.php page.
eval("\$rules = \"".$templates->get("rules")."\";");

(With DrPoodles files, your files was a bit more errors in)
Thanks CraKter! That was the one thing I missed! :p

Attachment Changed!
Gee thanks guys! I'm still customising it but you can look at it here.

Again, thanks SSSSSOOOOO much! Now I can make custom pages Big Grin

FW
Not bad for an first custom page, no Wink I would recommend you to wrap the content in
<table class="tborder" cellpadding="1" cellspacing="1" border="0">
<thead>
<tr>
<td class="thead" style="text-align: center;"><strong>Rules Page</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td class="trow2">
And then you add your content below that and add
</td>
</tr>
</tbody>
</table>
After it.

something like this:
<html>
<head>
<title>$settings[bbname]</title>
$headerinclude
</head>
<body>
$header
<br />
<table class="tborder" cellpadding="1" cellspacing="1" border="0">
<thead>
<tr>
<td class="thead" style="text-align: center;"><strong>Rules Page</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td class="trow2">
Firefox Forum Rules

    1 * Languages: All posts must be written in the English language. 

    2 * Spam: Any post that is off-topic or contributes nothing useful or interesting to a thread is considered to be spam. Most spam posts will be moved or deleted. Spam includes posts that:
          1. only contain emoticons.
          2. only contain a <b>short</b> message, such as "LOL" or "hello."

     3 * Slang: Computer slang is allowed, but slang such as OMG or WTF is considered swearing. Also do not use God's name in vain such as saying "god you are mean". That is not allowed and is considered wrong.

    4 [b]* Respect: Members should respect others, and avoid making derogatory comments or giving rude treatment <i>("flaming")</i>. Also respect the privacy of others, and don't share their personal information without permission.[/b]

    5 * Swearing: <u>Is not allowed here</u>, using it will cause your post to be deleted and you possibly suspended.

    6 * Nothing is allowed that contains 
          1. pornography and nudity not safe for anyone
          2. profanity a.k.a swearing, cussing

       * Corrective Action: If you do not follow the rules, <u>we have the right</u> to edit/delete your posts/account or deny your access to this board. If you are banned, you must not try to bypass the ban by registering new accounts, and you may not post messages to any part of the board.


Note that any data provided to this board, <i>including</i> your IP address, <i>and</i> your Private Messages, can be stored in a database. Private information will <u>not</u> be disclosed to third parties without your consent. However, we cannot be held liable for any hacking attempt in which your data is compromised.

ADDED RULES:
        * Please post your topics in the right forum.</td>
</tr>
</tbody>
</table>
$footer
</body>
</html>
Okey Dokey. Page updated!! (I like it!)

Big Grin Big Grin Big Grin
FW
Yea that seems a lot nicer Smile
Anyways you're welcome Smile
Happy to help Smile

Btw you do know there is an rules pages mod? well for an old version that is.
Anyways probably more fun to get stuff working on your own as well Smile
:$ Oops! Forgot to say thank you!...
Yeah I know about that mod, but I wanted to do it myself....This way I can probally customise it more. And I can understand it better if I do it myself.

FW
No problem I thought you meant that anyways so Wink
Yea then you can get it as you want it on the dot as well Wink