UBB.Dev
Posted By: JoshPet Beta-[6.4] Forum Instructions 3.5 - 10/09/2003 10:22 PM
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.




Attached File
Posted By: shortbus Re: Beta-[6.4] Forum Instructions 3.0 - 10/09/2003 10:38 PM
Josh, is this different than what I have other than it's for 6.4?
Posted By: JoshPet Re: Beta-[6.4] Forum Instructions 3.0 - 10/09/2003 10:40 PM
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.
Posted By: zarathoustra Re: Beta-[6.4] Forum Instructions 3.0 - 10/14/2003 12:34 PM
The download does not work for me (IE or Safari)
Posted By: Ian_W Re: Beta-[6.4] Forum Instructions 3.0 - 10/14/2003 1:48 PM
Works fine from here in IE
Posted By: zarathoustra Re: Beta-[6.4] Forum Instructions 3.0 - 10/14/2003 2:13 PM
IE or Safari download a .php file, which is in fact a .zip file. So it almost works
Posted By: slayer60 Re: Beta-[6.4] Forum Instructions 3.0 - 10/14/2003 4:04 PM
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
Posted By: JoshPet Re: Beta-[6.4] Forum Instructions 3.0 - 10/15/2003 1:37 AM
Yeah, just be sure it gets saved as a Zip and it works in safari for me.
Posted By: TheInsider Re: Beta-[6.4] Forum Instructions 3.0 - 11/05/2003 4:25 AM
I like this. Too bad you can't use UBBcode with it to change bold, italics, add images, etc...

Works great otherwise.
Posted By: omegatron Re: Beta-[6.4] Forum Instructions 3.0 - 11/05/2003 4:49 AM
Why not use HTML that works in their. I have added banner ads etc in the fields with this hack. HTML works great
Posted By: TheInsider Re: Beta-[6.4] Forum Instructions 3.0 - 11/05/2003 5:02 AM
I didn't think of that...good idea... Thanks.
Posted By: JoshPet Re: Beta-[6.4] Forum Instructions 3.5 - 11/13/2003 8:51 AM
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.
Posted By: donJulio Re: Beta-[6.4] Forum Instructions 3.5 - 11/13/2003 8:47 PM
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
Posted By: Myke Re: Beta-[6.4] Forum Instructions 3.5 - 01/07/2004 6:52 AM
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.
Posted By: JoshPet Re: Beta-[6.4] Forum Instructions 3.5 - 01/07/2004 7:03 AM
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 />
Posted By: Myke Re: Beta-[6.4] Forum Instructions 3.5 - 01/07/2004 7:09 AM
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).
Posted By: JoshPet Re: Beta-[6.4] Forum Instructions 3.5 - 01/07/2004 8:04 AM
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.
Posted By: J.C. Re: Beta-[6.4] Forum Instructions 3.5 - 02/14/2004 8:24 AM
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
Posted By: J.C. Re: Beta-[6.4] Forum Instructions 3.5 - 02/14/2004 10:49 AM
Any ideas why the selectforuminfo.php would result in a blank page?
Posted By: JoshPet Re: Beta-[6.4] Forum Instructions 3.5 - 02/14/2004 10:51 PM
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.
Posted By: J.C. Re: Beta-[6.4] Forum Instructions 3.5 - 02/14/2004 10:59 PM
Yup, it's really weird. On mine it's fine. 123, done. Easy to install. It should run like any other admin file.. but...
Posted By: J.C. Re: Beta-[6.4] Forum Instructions 3.5 - 02/14/2004 11:32 PM
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.
Posted By: JoshPet Re: Beta-[6.4] Forum Instructions 3.5 - 02/15/2004 12:03 AM
Is the forum you were having trouble with a 6.4 forum (with admin language files)?
Posted By: J.C. Re: Beta-[6.4] Forum Instructions 3.5 - 02/15/2004 1:49 AM
Yup...
Posted By: oceanwest Re: Beta-[6.4] Forum Instructions 3.5 - 03/09/2004 9:39 AM
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.

Attached picture 109640-inst.jpg
Posted By: oceanwest Re: Beta-[6.4] Forum Instructions 3.5 - 03/09/2004 9:41 AM
This is the one that is acceptable.

Attached picture 109641-inst2.jpg
Posted By: oceanwest Formulate an if statement - 03/23/2004 11:49 AM

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.
Posted By: JoshPet Re: Formulate an if statement - 03/23/2004 1:13 PM
if (file_exists("$thispath/includes/info_$Board.php")) { //UBBTREMARK

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



}
Posted By: scroungr Re: Formulate an if statement - 03/23/2004 6:21 PM
yeah remember you can include php by then escape route...
Posted By: oceanwest Re: Formulate an if statement - 03/24/2004 1:25 AM
Thanks It worked perfectly.
© UBB.Developers