Previous Thread
Next Thread
Print Thread
Rate Thread
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 3.5

Description: This allows you to add a bit of text (or a banner ad / HTML) to the top of the postlist page. It's forum specific, so you can have different info for each forum.
Version 2.0 Adds the ability to edit the stuff at the top of each forum via the Admin menu.
This is a PERFECT way to have banner ads for each forum without having to do a whole specific header for each forum.
Version 3.0 updates instructions for UBB.Threads version 6.4.
Version 3.5 adds instructions to extend this extra information into the showflat/showthreaded view.

Working Under: UBB.Threads 6.4

Mod Status: Beta

Any pre-requisites: none

Author(s): JoshPet of www.joshuapettit.com

Date: 10/09/03

Credits: Needed for ThreadsDev, update for shortbus for www.ultimatenurse.com - instructions updated for 6.4 by DLWebmaestro

Files Altered: postlist.tmpl, /admin/menu.php, showflat.tmpl, showthreaded.tmpl

New Files: /admin/selectforuminfo.php, /admin/editforuminfo.php, /admin/doeditforuminfo.php

Database Altered: none

Info/Instructions: Instructions - Upload 3 new scripts to the 'admin' directory of your threads install and apply the changed included. make sure your "includes" folder is writable so the files can get created and you can edit them from the online interface.

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
96690-ForumInstructions3.5.zip (0 Bytes, 98 downloads)

Last edited by JoshPet; 11/13/2003 1:50 AM.
Sponsored Links
Joined: Apr 2002
Posts: 610
Code Monkey
Code Monkey
Joined: Apr 2002
Posts: 610
Josh, is this different than what I have other than it's for 6.4?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
No - DLWebMaestro just updated the instructions to work with 6.4 as sometimes the instructions need to be changed so it matches when people copy/paste.
Otherwise it's exactly the same.

Joined: Jul 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 15
The download does not work for me (IE or Safari)

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Works fine from here in IE


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: Jul 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 15
IE or Safari download a .php file, which is in fact a .zip file. So it almost works

Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
Just make sure you save it as a .zip file instead of a .php file. Clicking the attachment link downloads a .zip for me, if I right click the link and choose Save target as, then it is listed as a .php in the save as window. Simply changing the name so that it ends with .zip works to make it a .zip for me.

Win2k, IE6, Moz Firebird 0.6.1

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, just be sure it gets saved as a Zip and it works in safari for me.

Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
I like this. Too bad you can't use UBBcode with it to change bold, italics, add images, etc...

Works great otherwise.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Why not use HTML that works in their. I have added banner ads etc in the fields with this hack. HTML works great

Sponsored Links
Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
I didn't think of that...good idea... Thanks.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Updated this, adding instructions to include the extra info on the showflat/showthreaded page.

Very useful if you want to have certain information/keywords on every page to play with the googlebots.

Addition was commissioned by jholst of www.in-depthangling.com who is very googlebot happy at the moment.

Last edited by JoshPet; 11/13/2003 1:52 AM.
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Thanks, Josh. I had mentioned to you about putting banners for forums using the 6.3 version of this mod. I had managed to add them to newpost.tmpl and newreply.tmpl, but I couldn't figure out how to do it for showflat or showthreaded. This will help when I upgrade

Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
I <3 this mod! Thanks Josh!

Just one weird thing I noticed though when I installed it on my site, and it wasn't noticeable in IE but is in Opera. In postlist.tmpl you have a couple of <td>'s which span a few columns:

Code
<td colspan="6" class="darktable"><br /><table width="100%" cellpadding="0" cellspacing="0"><br /><tr><br /><td colspan="2" class="catandforum"><br />


Are the colspan's necessary? What happens after you install this mod and view in Opera, is that you'll see some extra table cells squeezed in to seemingly make up for the missing cells. In other words, you're telling the cell to span X amount of columns, but there are only Y columns in the next row, so it'll squeeze in the missing X-Y columns.

In any case, removing the two colspans fixed this up. When looking through the code, I concluded that the colspans weren't needed but it'd be nice to get some confirmation on that?

If you want evidence, just look at any forum list (postlist.php) on this site through Opera and you'll see what I mean. There's a skinny black cell padded to the right of all the forum instructions.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Hrm.... I dunno.

Where are you finding that code.

Here's the only changes to postlist.tmpl

Code
<br />### <br />### Open postlist.tmpl<br />###<br /><br />##<br />## Find this:<br />##<br /><br /><br /></tr><br />$tbclose<br /><br /><br /><br />$tbopen<br /><tr><br /><td align="center" width="49%" class="tdheader" colspan="3"><br /><br /><br />#<br /># Change to this:<br />#<br /><br /><br /></tr><br /><tr><br /><td class="lighttable" align="center"><br />UBBTPRINT;<br />// If there are forum instructions, include them here<br />   	@include "$thispath/includes/info_$Board.php"; //UBBTREMARK<br />echo <<<UBBTPRINT<br /></td><br /></tr><br />$tbclose<br /><br /><br /><br />$tbopen<br /><tr><br /><td align="center" width="49%" class="tdheader" colspan="3"><br />

Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
Joined: Sep 1999
Posts: 76
Sorry I should of clarified -- there's nothing wrong with your changes or instructions. The mod is perfect as far as I'm concerned.

The bit of code I pasted is from postlist.tmpl, right at the top. It's already existing in the 6.4 (and probably older) distribution of ubb.t. You only notice the extra cells if you use this mod (when viewing in Opera).

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ah - I'll study it. I think I'm too tired now to wrap my head around it. But I'll study it when I get a chance. Maybe it's a bug in the template.

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Any chance of the drop menu seen when editing, having the category names also? Another idea is to have it read/display the description text already shown on the main page And....... you could use this with a lil modification to show different meta tags for each forum, to aid in search engine indexing


- Custom Web Development
http://www.JCSWebDev.com
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Any ideas why the selectforuminfo.php would result in a blank page?


- Custom Web Development
http://www.JCSWebDev.com
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This uses the exact same mechinism to select a forum as when you edit a custom header for the forum. Blank page would usually be a language file problem. But this just uses the /languages/english/admin/generic.php language file.

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Yup, it's really weird. On mine it's fine. 123, done. Easy to install. It should run like any other admin file.. but...


- Custom Web Development
http://www.JCSWebDev.com
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Oh well no luck, instead I added Bo_Description, and $Description, to the boards query in postlist and added $Description to the template. It pulls the descript, (same as the main page) which will do for now.


- Custom Web Development
http://www.JCSWebDev.com
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Is the forum you were having trouble with a 6.4 forum (with admin language files)?

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Yup...


- Custom Web Development
http://www.JCSWebDev.com
Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
I would like to get this part to only appear when there is Instructions...

currently all forums displays this when I don't have any instructions

(the gray tdheader)

I think I need an if statement. but not sure how to forum the syntax.
Attachments
109640-inst.jpg (0 Bytes, 23 downloads)

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
This is the one that is acceptable.
Attachments
109641-inst2.jpg (0 Bytes, 25 downloads)

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474

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


I want this to show up ONLY if there is text specified in the include.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
if (file_exists("$thispath/includes/info_$Board.php")) { //UBBTREMARK

// then put all the code here that only happens if the above file exists.



}

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
yeah remember you can include php by then escape route...

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
Thanks It worked perfectly.


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
Posts: 70
Joined: January 2007
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 20240506)