Previous Thread
Next Thread
Print Thread
Rate Thread
#235956 02/11/2003 2:02 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name: Board Rules 1.2
  1.1 is bugfixes and better support for tablewrappers
  1.2 adds a Template (thanks Omegatron) and fixes issues on certain servers. Also gives instructions so that the Who's Online page will show "Viewing the Rules".

Description: This produces a standard threads page to disply your Board Rules. Instructions are included to add the "Rules" link to your footer.

Author: JoshPet & Omegatron
        For discussion and bug reports go to www.ubbdev.com

Credits: Dalantech for table wrapper fixes and Omegatron for bug fixes.

Date: 2/11/03

Working Under: 6.2

Files Modified: ubbt_footer.tmpl, languages/english/generic.php

New Files: showrules.php

Database Modifications: None

Notes: Edit the rules from the Admin menu. You may wish to use simple HTML like <br /> for linebreaks, so that your rules appear best.
Attachments
68343-BoardRules1.2.zip (0 Bytes, 81 downloads)

Last edited by JoshPet; 02/12/2003 4:21 AM.
Sponsored Links
Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
Hi Josh,

I tried to include it but got the following error usind the Board Rules link:
Parse error: parse error in /abspath/ubbthreads/showrules.php on line 71

Any idea?

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Nice one Josh.

It worked like a charm. I think that Rick has to consider this as a permanent feature in the next release.


Nikos
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
It looks good on my site

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I just installed it. Easy hack, and really handy so users can be reminded of how to behave.

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
[]Hi Josh,

I tried to include it but got the following error usind the Board Rules link:
Parse error: parse error in /abspath/ubbthreads/showrules.php on line 71

Any idea?
[/]

I get the same thing. The reason being is showrules.php has the ending ?> missing in the distribution file. However seems there are more errors than that

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK -
Updated the zip to version 1.1

I don't know what happened... but it appears I someone had the wrong version of the showrules.php that I was using.

I think I need sleep. Somehow I had an old version on my HD and the working version on measurection.

Thanks to Dalantech for some tablewrapper tweaks and Omegatron for bugfixes.

This should work this time.


Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK - wait.

For some reason this still doesn't work right on some boards.

I'm not sure why... it seems to poop on the part where it reads the "rules" file.

I took this bit from the newuser script, so I'm not sure what might be wrong with it.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
He he.. nevermind.

I reuploaded the file on the server it wasn't working on and now it works.



Let me know if there are any more issues.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK - this doesn't seem to like some servers.

Could one of the Dave's or someone really PHP saavy take a look at this for me?

The latest version seems to choke on line 64 I think...

I took this code from the newuser.php but I don't fully understand it.

Although it works fine for some.

<shrug>

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay I am one of the guys whose server it chokes on LOL Anyway here is the templated version I did up that seems to work fine for me.

Edit: Worked Omegatron's template into the final version... attached to the main post.
Thanks.

Last edited by JoshPet; 02/12/2003 4:23 AM.
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
If anyone has trouble with mine.. please see if Omegatron's fixes it. It should be templated anyway.

As soon as we see that it works for everyone... I'll update the main post with Omegatron's templates... as that's the right way to do it.

Good work Omegatron!

Thank you!

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Josh It looks like its calling for boardrules.php mine is called showrules.php ? Did you use a different name?

Anyway going to try chucks now..

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
boardrules.php is the file in the includes directory where the rules are stored. It's basically a text file, editable from the admin section.

That shouldn't be the issue. But I'm puzzled. Maybe Omegatron fixed it. <hope hope hope>

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
yes his works like a charm ... good work guys, THANKS

Last edited by Smilesforu; 02/11/2003 10:38 PM.
Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
I updated to version 1.1 and still getting an error

Parse error: parse error in /abspath/ubbthreads/showrules.php on line 65

line 63> $boardrules .= <<<EOF
line 64> </td>
line 64> </tr>

The old parser error I got was also near
$boardrules .= <<<EOF

You can see a demo here ;D
http://www.clanforums.com/ubbthreads/showrules.php?Cat=

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Do me a favor... try omegatron's version here and let me know if that fixes it.

If it does, I'll update the main zip.

His additions are better... and more standardized as it adds a template.

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
omegatron's solution is working fine for me

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Great!

Three cheers for omegatron!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Updated the main post to Included Omegatron's template, plus support for the who's online page.

Thanks.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I've updated it on my board and it's still working great. Thanks again Josh!

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
The template has a small failure, its looking strange if you're board has different width and cellspacing/cellpadding values.

To correct this take this template:

----
<?
echo <<<template
$tbopen

<tr>
<td class="tdheader">
Board Rules
</td>
</tr>
$tbclose

$tbopen
<tr>
<td class="lighttable">
template;
$rules = @file("{$config['path']}/includes/boardrules.php");
if (!is_array($rules)) {
$rules = @file("{config['phpurl']}/includes/boardrules.php");
}
if ($rules) {
while(list($linenum,$line) = each($rules)) {
$boardrules .= $line;
}
}
echo $boardrules;
echo <<<template
</td>
</tr>
$tbclose

<br /><br />
template;
?>


------
Don't know why the original was looking so strange but after comparing it with the viewprivacy.tmpl the above lines came out and are working...

To see the difference I have an example for you:
WRONG (The contact us form has not the right size. Within this example its only a few pixels but this may depend on your theme settings)

RIGHT (The Boardrules have the correct width everytime, no matter what you put in your settings it will fit)

Check it out, I will fix this in the Examples within the next days

Last edited by jluerken; 02/15/2003 10:10 PM.
Joined: Oct 2002
Posts: 105
ehm Offline
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 105
Thank you Josh
Works great

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This works under 6.3 as well - I reposted in our main modification forum here.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)