Previous Thread
Next Thread
Print Thread
Rating: 5
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Forum Instructions 4.0

Description: This allows you to add a bit of text to the top of the postlist page, showflat page and showthreaded page.
It's forum specific, so you can have different info for each forum.
Basically it's an include file, without having to create a new header for each forum.

Working Under: UBB.Threads 6.5

Mod Status: Beta

Any pre-requisites: 6.5

Author(s): JoshPet

Date: 07/03/04

Credits: Commissioned by shortbus at www.ultimatenurse.com

Files Altered: postlist.tmpl, showflat.tmpl, showthreaded.tmpl
/admin/viewboard.php, /admin/doeditboard.php, /templates/default/admin/viewboard.tmpl,
/languages/english/admin/viewboard.php, /languages/english/admin/generic.php


New Files: none

Database Altered: none

Info/Instructions: To edit the include Control Panel -> Forum Settings -> Pick a forum and click 'details' then click "Header/Footer/Instructions" tab.

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
116298-ForumInstructions4.0.txt (0 Bytes, 119 downloads)

Sponsored Links
Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
I tweaked this portion for the showflat show threaded and postlist templates so that
it will only show up if there the file is there. Otherwise you get some weird artifacts.

Code
 <br /> <br />$tbclose <br />UBBTPRINT; <br />if (file_exists("$thispath/includes/info_$Board.php")) { //UBBTREMARK <br />// If there are forum instructions, include them here <br /> <br />echo <<<UBBTPRINT <br /> <br />$tbopen <br /><tr> <br /><td class="lighttable" align="center"> <br />UBBTPRINT; <br />@include "$thispath/includes/info_$Board.php"; //UBBTREMARK <br /> <br />echo <<<UBBTPRINT <br /></td> <br /></tr> <br />$tbclose <br /><br /> <br />UBBTPRINT; <br />} <br />echo <<<UBBTPRINT <br />

Last edited by oceanwest; 07/05/2004 5:31 PM.
Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
Anyway to have a default for forums w/o a custom instruction?

Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
[]oceanwest said:
Anyway to have a default for forums w/o a custom instruction? [/]

If you apply oceanwest's tweak, then it's a simple addition to that:

Code
<br />$tbclose<br />UBBTPRINT;<br />if (file_exists("$thispath/includes/info_$Board.php")) { //UBBTREMARK<br />// If there are forum instructions, include them here<br />echo <<<UBBTPRINT<br /><br />$tbopen<br /><tr><br /><td class="lighttable" align="center"><br />UBBTPRINT;<br />@include "$thispath/includes/info_$Board.php"; //UBBTREMARK<br /><br />echo <<<UBBTPRINT<br /></td><br /></tr><br />$tbclose<br /><br /><br />UBBTPRINT;<br />} else if (file_exists("$thispath/includes/info_default.php")) { //UBBTREMARK<br />// If there are no forum instructions, but a default exists, then include it<br />echo <<<UBBTPRINT<br /><br />$tbopen<br /><tr><br /><td class="lighttable" align="center"><br />UBBTPRINT;<br />@include "$thispath/includes/info_default.php"; //UBBTREMARK<br /><br />echo <<<UBBTPRINT<br /></td><br /></tr><br />$tbclose<br /><br /><br />UBBTPRINT;<br /><br />}<br />echo <<<UBBTPRINT<br />


So this will include the board instructions if it exists, otherwise it checks for default instructions (info_default.php) and will include that if it exists. If neither exist, then nothing gets included and no artifacts left behind (thanks oceanwest!)

You'll need to create the info_default.php file manually on your server.

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
My users reply upon this to much

I use this to include additional navigation - in the process of upgrading to 6.5.1 and re-installing this, I have had a dozen PM's saying 'this or that forum is missing' - of course they are not, it is just the link is missing. LOL


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Sponsored Links
Joined: Jun 2002
Posts: 160
Member
Member
Offline
Joined: Jun 2002
Posts: 160
I'm looking at this mod, and trying to reconcile oceanwest's changes to the code in the mod, and am simply not sure just where to start and stop the replacement of code.


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
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 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
Morgan 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)