Description: This allows you to add a bit of text to the top of the postlist page. It's forum specific, so you can have different info at the the top of each forum on the postlist page. Demo here at threadsdev.
Working Under: UBB.Threads 6.3
Mod Status: Beta
Any pre-requisites: none
Author(s): JoshPet
Date: 06/14/03
Credits: Needed it here for threadsdev
Files Altered: postlist.php, postlist.tmpl
New Files: none
Database Altered: none
Info/Instructions: I wasn't going to release this - it was just something I needed here at threadsdev but while I was doing it, I got 2 private messages asking how I did it. So here's the instructions. It's a down and dirty modification which requires you to alter code to edit the text. But it works.
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.
Info/Instructions: I wasn't going to release this - it was just something I needed here at threadsdev but while I was doing it, I got 2 private messages asking how I did it. So here's the instructions. It's a down and dirty modification which requires you to alter code to edit the text. But it works. [/b] [/]
I've actually been using something very similar for years at my forum, but I have an extra directory in my includes dir where I put a new file named after the forum which contains the extra text. This way no extra code is needed when adding extra info to a new forum.
Never thought anyone was interested in this so I've never released it. =] I can write it up if anyone is interested though.
Josh this is fantastic, but I had a glitch which I finally resolved but here it was:
In postlist.php's changes, you indicate that the lines to add are, for example,
Code
if ($Board == "boardkeyword") { \\ Edit the board keyword <br /> $extratext = "Put your text here"; \\ Edit the text <br /> $extralinks = "<tr><td class=\"lighttable\" align=\"center\" colspan=\"3\">$extratext</td></tr>"; <br /> }
The problem I came across was that the "commented out" edit instructions (ie., \\ Edit the board ) added to the end of the first two lines are double back-slashes, which caused an error. When I changed them to the more usual double front-slashes (in each instance), it worked.
I obviously threw the comments in there at the last minute. I decided to write it up and post it because a couple people PMed me while I was doing it. But I really should write up and post mods when I've skipped a nights sleep. LOL
I corrected the instructions - had my brain been working I'd have remember that // is for comments in PHP code. thanks.
[]Gardener said: I've actually been using something very similar for years at my forum, but I have an extra directory in my includes dir where I put a new file named after the forum which contains the extra text. This way no extra code is needed when adding extra info to a new forum.
Never thought anyone was interested in this so I've never released it. =] I can write it up if anyone is interested though. [/]
Would be useful to have it automated for new forums
I'm about to try this on my test board, and I will...but I had a thought...
...what would you think about my looking a bit into extending this to a message (maybe different than for the postlist)on the showflat/threaded pages? Would it be along the same lines that you've done for postlist? Or maybe somebody's already considered it and rejected it!
Yeah, that's what it puts up there.... HTML. That what we use here for links and such. You just need to be sure to comment out every " mark within the strings.
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.