<?
function bb_link($link_off, $link_on){
global $site_address, $sef_urls;
if ($sef_urls=='0'){
$link="$site_address/$link_off";
}
else{
$link="$site_address/$link_on";
}
return $link;
}
?>
With:
PHP CODE
<?
function bb_link($link_off, $link_on){
global $site_address, $sef_urls, $db_prefix;
if ($sef_urls=='1'){
$pos = strpos($link_on, "topic");
// do some sql trickery for topics...
if ($pos === false){
$pos = strpos($link_on, "forum");
if ($pos === false){
$pos = strpos($link_on, "members");
if ($pos === false){
}
else{
$explode_id = explode('/', $link_on);
$query219 = "select NAME AS TITLE from {$db_prefix}members WHERE ID='$explode_id[1]'";
$result219 = mysql_query($query219) or die("topic.php - Error in query: $query219") ;
while ($results219 = mysql_fetch_array($result219)){
$title = $results219['TITLE'];
}
$query219 = "select NAME AS TITLE from {$db_prefix}categories WHERE ID='$explode_id[1]'";
$result219 = mysql_query($query219) or die("topic.php - Error in query: $query219") ;
while ($results219 = mysql_fetch_array($result219)){
$title = $results219['TITLE'];
}
$query219 = "select TITLE from {$db_prefix}posts WHERE TITLE!='' AND TOPIC_ID='$explode_id[1]'";
$result219 = mysql_query($query219) or die("topic.php - Error in query: $query219") ;
while ($results219 = mysql_fetch_array($result219)){
$title = $results219['TITLE'];
}
if ($sef_urls=='0'){
$link="$site_address/$link_off";
}
else{
$link="$site_address/$link_on".$title."";
}
return $link;
}
?>
The good thing about this script is that even if the title of your topic changes, the link will still work, as it only uses the ID, not ID & title or title by itself. Same with the forum and member url's.
Remember, this is only a hack, there is a better version of this that removes the ID numbers from the url but that requires a lot more file editing. I think this method is good enough for those that want titles in url's for SEO.
Last edited by:
Caleyjag
- Monday, Jan 21, 2008 15:35.
Posts: 868
Joined: 22 June 2007
Location: Inverness, Scotland
Tuesday, Jan 08, 2008 09:07
Here is the theme I am using on my site at http://www.inverness-metros.co.uk/forums and can also be viewed by selecting it on this site using the drop down box.
Use it if you like
Only code changes were to the header template.
Place the extracted folder into your themes folder and that's it.
Posts: 868
Joined: 22 June 2007
Location: Inverness, Scotland
Monday, Jan 07, 2008 13:19
Hope you all had a good Christmas. Here is v1.1.5. Nothing spectacularly different from v1.1.4, but it's important you read this post carefully before upgrading/installing.
This update has a few minor changes, most noticeably the location and name of the stylesheet, the way javascript is called, and the way emails are sent.
Fresh Install of v1.1.5
There are two ways to do a fresh install of BabbleBoard on your server.
Use the Web Installer - the web installer is still experimental, but it is the quickest way to get BabbleBoard on your website. To use it, head to http://install.babbleboard.co.uk and fill in the fields, then hit submit. Within 2 minutes, BabbleBoard will have copied to your server and you can begin the database installation. This method will also attempt to CHMOD your directories so you won't actually need to manually edit any files or folders!
Download the zip file - You can also download the zip file from here and do things the "old fashioned" way.
Download BabbleBoardv.1.1.5.zip from the link below.
Unzip, and upload all contents to your forum directory.
Navigate to yourdomain.com/path/to/forum/install.php
Follow the on-screen instructions
Remove/rename "/install.php" and "/bbupgrade.php" from your server.
Upgrading v1.1.4
Upgrading v1.1.4 requires the following changes (please backup all files before continuing!).
Remove all the contents of the "/includes" folder apart from "/includes/config.php"
Remove the "/templates" folder and all its contents
Remove the scripts folder
Unzip the BabbleBoard v1.1.5 folder
Upload all contents of the BabbleBoard v1.1.5 folder
Navigate to yourdomain.com/path/to/forum/bbupgrade.php and follow the on screen instructions.
Remove/rename "/install.php" and "/bbupgrade.php" from your server.
Upgrading versions prior to v1.1.4
There are a number of changes to the folder structure, and so it is VITAL that you do the following on your server (please remember to backup your forum before attempting an upgrade):
Remove the "/images" folder and all its contents
Remove all the contents of the "/includes" folder apart from "/includes/config.php"
Remove the "/templates" folder and all its contents
Remove the "/themes" folder and all its contents
Remove the "/ping" folder and all its contents
Remove the scripts folder
Delete "uploads/avatar/no_avatar.gif"
Unzip the BabbleBoard v1.1.5 folder
Upload all contents of the BabbleBoard v1.1.5 folder
Navigate to yourdomain.com/path/to/forum/bbupgrade.php and follow the on screen instructions.
Remove/rename "/install.php" and "/bbupgrade.php" from your server.
Changes...
Fixed user timezone not setting itself to board default when "-00.00" is selected.
Fixed warn bar details not using language files
Renamed main.css to stylesheet.css for clarity.
stylesheet.css moved to outside of lang folder in theme
stylesheet.css now uses background images from root images folder instead of theme as default.
Language specific stylesheets support improved to only use styles that you've amended for that language.
New database table to keep track of Paypal subscriptions.
Full term of group upgrade adhered to instead of auto-cancel upon failed/cancelled subscription payments.
Default board email address now generated (noreply@yourdomain.com).
Search email function in members area of Admin CP added.
Members awaiting validation are flagged up in search area of Admin CP.
Checkbox to manually verify members added.
Fixed bb_link in online list not pointing to correct URL for member when sef_url's are off.
All javascript functions called in header instead of across various scripts.
BBCode scripts moved to scripts folder.
Captcha script moved to scripts folder.
Scripts folder categorised into js & php folders.
Large images automatically resized to fit topic view.
prototype.js file size reduced to speed up loading times.
Email address validator added to registration page.
Verify page now lists more information on how to verify your account.
Default forum administrators email address field in Admin CP added.
Sessions are now "kept alive" for 5 hours.
If board is not offline, visitors to the offline page are now redirected to the forum index.
Addreply/Quickreply areas now given differently named session tokens so as not to reset one another in certain cases.
Fixed problem where editing a post on a page other than the first page of a topic didn't return you to post you just edited.
Posts: 868
Joined: 22 June 2007
Location: Inverness, Scotland
Saturday, Dec 29, 2007 11:30
We are pleased to announce that BabbleBoard v1.1.5 has been released to our Supporters with a public release to follow shortly.
We've once again managed to speed up the forums by reducing the size of some of our scripts whilst adding more features and so we hope you'll be pleased with this update.
A new auto-suggest feature has been added and is used when you are sending Private Messages or using the Admin CP. Administrators will also be able to search members by email address, and will be warned when a user they are searching is not yet verified (you can now also verify them manually).
Supporters will find a link to download BabbleBoard by logging in to our Support Forum and viewing the Downloads Centre forum under the BabbleBoard Supporters category.
If you are not yet a Supporter, upgrading your account is very simple. For just £10 a year, you'll get access to new releases before they are publically available as well as getting extremely fast support to make sure your forums run smoothly. To upgrade, login to our support forums, then visit http://support.babbleboard.co.uk/upgrade.
Last edited by:
Caleyjag
- Monday, Jan 07, 2008 13:14.
Posts: 868
Joined: 22 June 2007
Location: Inverness, Scotland
Thursday, Dec 20, 2007 15:42
Hi guys,
We've done a few minor improvements to the forums that will be released as v1.1.5 hopefully very soon.
Some people have had troubles with emails not being delivered to members (especially when they are requesting a verification email). We've now included a default email address that will be used to send emails from BabbleBoard ( noreply@<yoursite.ext> ). Hopefully that will clear that problem up. If not, then I suggest you check SMTP and other mail settings on your server and make sure they are all operating properly.
The speed of the forum has been improved with smaller javascript files being loaded (most notably, prototype.js has been reduced from 70kb to 9kb). For further optimisation we've only included ONE javascript file on the boards, with all the other files called from within that one. Previously, several javascript files were being called at various times.
Stylesheets have also been tweaked slightly. By default, our own stylesheet located in the BabbleBoard Default folder get's it's images from the images/english_en folder outwith the theme, this of course can be changed to suit your own preferences.
Another tweak to stylesheets it that if you put a stylesheet into a language folder in your theme, it only needs to contain areas you've changed. The original stylesheet will ALWAYS be loaded, with secondary stylesheets called afterwards.
An auto-suggest feature has been added instead of the drop-down boxes in the Private Messages and Admin -> Edit Member areas. These are in action on the support forums, so you can test it out to see how it looks.
Finally, the last change we've done is ensure that any members that use the Paypal subscription module that we have included in BabbleBoard will stay upgraded for the full term of the subscription, no matter if they cancel even after an hour. Previously, members were downgraded straight away.
This will affect subscriptions created from the latest release of BB onwards. Members that subscribed already will still be downgraded straight away.
A few other things... we're looking to add a search area to the Admin -> Edit Members part and also include a box to tick to verify a member if you want to do it manually.
No release date for this yet, but hopefully before the end of the year
Last edited by:
Caleyjag
- Saturday, Dec 29, 2007 11:29.
Posts: 868
Joined: 22 June 2007
Location: Inverness, Scotland
Friday, Dec 07, 2007 11:24
My girlfriend has been nagging me for near enough a week to put up our tree but traditionally my family puts it up 12 days before christmas, then takes it down the day after my birthday (5th january) and obviously I want to carry on doing the same as it makes sense.
Posts: 868
Joined: 22 June 2007
Location: Inverness, Scotland
Friday, Dec 07, 2007 00:27
Hi guys, yes this is out pretty soon after v1.1.3 but a few things were fixed and I wanted to get something even more stable out before we all head off for the holidays!
This update has a few minor changes, most noticeably the caching of forum topics on the index and board pages.
Fresh Install of v1.1.4
There are two ways to do a fresh install of BabbleBoard on your server.
Use the Web Installer - the web installer is still experimental, but it is the quickest way to get BabbleBoard on your website. To use it, head to http://install.babbleboard.co.uk and fill in the fields, then hit submit. Within 2 minutes, BabbleBoard will have copied to your server and you can begin the database installation. This method will also attempt to CHMOD your directories so you won't actually need to manually edit any files or folders!
Download the zip file - You can also download the zip file from here and do things the "old fashioned" way.
Download BabbleBoardv.1.1.4.zip from the link below.
Unzip, and upload all contents to your forum directory.
Navigate to yourdomain.com/path/to/forum/install.php
Follow the on-screen instructions
Remove/rename "/install.php" and "/bbupgrade.php" from your server.
Upgrading v1.1.3
Upgrading v1.1.3 requires just a few minor changes.
Remove all the contents of the "/includes" folder apart from "/includes/config.php"
Remove the "/templates" folder and all its contents
Unzip the BabbleBoard v1.1.4 folder
Upload all contents of the BabbleBoard v1.1.4 folder
Navigate to yourdomain.com/path/to/forum/bbupgrade.php and follow the on screen instructions.
Remove/rename "/install.php" and "/bbupgrade.php" from your server.
Upgrading versions prior to v1.1.3
There are a number of changes to the folder structure, and so it is VITAL that you do the following on your server (please remember to backup your forum before attempting an upgrade):
Remove the "/images" folder and all its contents
Remove all the contents of the "/includes" folder apart from "/includes/config.php"
Remove the "/templates" folder and all its contents
Remove the "/themes" folder and all its contents
Remove the "/ping" folder and all its contents
Delete "uploads/avatar/no_avatar.gif"
Unzip the BabbleBoard v1.1.3 folder
Upload all contents of the BabbleBoard v1.1.3 folder
Navigate to yourdomain.com/path/to/forum/bbupgrade.php and follow the on screen instructions.
Remove/rename "/install.php" and "/bbupgrade.php" from your server.
Changes...
Cached number of unread PM's in members table
Fixed error where disabling ability for guests to view board would show blank error message
If board is offline, people can now still verify their account
Removed defunct delete function from categories page in Admin CP
Cached category & post details on index and board page
Fixed categories not being created
Fixed users whiteboard having '0' for default (now blank)
Fixed bb_link to subforums not working properly.
Help page style slightly altered
Fixed merging topics
Added check on install for GD2. If it doesn't exist, install script won't continue.
Fixed potential display problem when topic is locked
Fixed online list page not showing all people and guests online
Fixed uploader not creating thumbnails for files with capital letters in them
Added group color for "Edited By" line to search results page for topics/posts of specific member
Posts: 868
Joined: 22 June 2007
Location: Inverness, Scotland
Sunday, Dec 02, 2007 21:36
We are pleased to announce the release of BabbleBoard v1.1.3.
This update has a lot of major differences to 1.1.2 and earlier and so it is vital that you read this post carefully before updating your installation.
Language Files
Language files are now part of BabbleBoard!
As a quick tip for anyone wanting to create their own languages, please use the following folder contruct:
LANGUAGE_COUNTRYSHORTCODE
For example, for english we use english_en, french would be french_fr and so on. A detailed list of all short codes for countries can be seen here: http://www.geocities.com/Colos...rcode.html
To install a language, copy the english_en folder and all it's contents, edit the files for the language, change the name of the folder, upload to the "lang" folder. In the drop down at the bottom of the forum you'll see the language ready to be used, similarly in the Admin CP.
Fresh Install of v1.1.3
There are two ways to do a fresh install of BabbleBoard on your server.
Use the Web Installer - the web installer is still experimental, but it is the quickest way to get BabbleBoard on your website. To use it, head to http://install.babbleboard.co.uk and fill in the fields, then hit submit. Within 2 minutes, BabbleBoard will have copied to your server and you can begin the database installation. This method will also attempt to CHMOD your directories so you won't actually need to manually edit any files or folders!
Download the zip file - You can also download the zip file from here and do things the "old fashioned" way.
Download BabbleBoardv.1.1.3.zip from the link below.
Unzip, and upload all contents to your forum directory.
Navigate to yourdomain.com/path/to/forum/install.php
Follow the on-screen instructions
Remove/rename "/install.php" and "/bbupgrade.php" from your server.
Upgrading to v1.1.3
There are a number of changes to the folder structure, and so it is VITAL that you do the following on your server (please remember to backup your forum before attempting an upgrade):
Remove the "/images" folder and all its contents
Remove all the contents of the "/includes" folder apart from "/includes/config.php"
Remove the "/templates" folder and all its contents
Remove the "/themes" folder and all its contents
Remove the "/ping" folder and all its contents
Delete "uploads/avatar/no_avatar.gif"
Unzip the BabbleBoard v1.1.3 folder
Upload all contents of the BabbleBoard v1.1.3 folder
Navigate to yourdomain.com/path/to/forum/bbupgrade.php and follow the on screen instructions.
Remove/rename "/install.php" and "/bbupgrade.php" from your server.
Changes...
Links in Member Profiles with SEF_URL off sorted.
Fix for showing the proper percentage of total member posts in member profile added.
Fix for the problem with warn levels not working properly added.
Fix for the page numbers completely screwing up the forum page added.
New auto-hyperlinking feature added to BB Code parser.
New styles added to main.css for uploading files.
New image bg.png added for uploading files area.
Site delay feature removed.
Emoticon pop-up box listing emoticon code added
New default avatar image added
sef_url OFF keyword tag styles fixed
Better 'mhash' detection added
Mod_rewrite detection removed allowing user to set sef_url when they've checked module is loaded
Additional '.htaccess' check in header.php in case of server move
Language files added
Topic last post time now updates upon post deletion
CODE & PHP tags no longer parse their contents
PHP tag now highlights php code provided start and end tags are between tag
Date and time added to Timezone area of My Controls
Redirect after post edit fixed
Auto-snipping of large urls so it doesn't break page width
functions.php created to hold common PHP functions
2 errors when debug mode turned on fixed (blogger_name, select_theme)
Captcha image should now work across all platforms with GD2 installed
User manual updated with latest BB Code styles and options
New/reply/edit post pages style amended
Edit/Delete fixed in subscriptions page for sef_url being off.
Add New Subscription button now displays on subscriptions page when sef_url is turned off
Checkboxes in categories page of Admin CP now saves values
Flag images moved from flags/normal/ to just flags/
Separate image paths created per language for themes and default images
uploads.php now utilizes image_check function.
New image_check & folder_check functions added to check files or folders exist in themes
Debug on errors - messages_number and new_posts fixed
template_section function added to source code to quickly add/identify template sections
Group images now display in areas they previously didn't but were meant to
My Styles area removed in preparation of revamp for v1.2
Page location now stored in function rather than in each page that required it
Textarea now doesn't scroll to top of window when you've inserted BB Code
Emoticons now enter where you want them to instead of at bottom of textarea
Textarea now doesn't scroll to top of window when you've inserted emoticons
Member names now appear with associated group color across all forum pages
Today/Yesterday/Last Week etc. headers no longer display in PM inbox if you have no messages for that period
Problem where banned members were not redirected to banned page fixed.
Edit history preserved and shows at bottom of posts for groups that have ability to edit other members posts
Sub-forums now separated by commas properly.
"Top" button on search results page now works.
Read only forums no longer display "New Topic" button
Read only forums/locked topics no longer show subscription options
Locked topics now show "New Topic" button
Member & group link styles changed
Default font style changed to Arial.
Font size changed to 12px instead of 11px
New style for page numbers added
Backslashes on forum descriptions removed
New images created for default theme
Nationality flags added to online/member list pages
Added .png transparency support for IE6
Modified site structure and style to be compatible with IE6
Removed top tabs to fix compatibility issues with IE5.5+ & Opera browsers
Drop-down boxes in footer display without unwanted padding
Blogs module removed in preparation of v1.2 revamp
Fixed problem where custom field entries weren't saving
Stopped animated collapsible divs from collapsing in an effort to halt IE6 page breaking
Session tokens added to forms to prevent CSRF hacking attempts
Hot topics now calculated properly
Stripped html tags from form submissions
Fixed bug where changing member password in Admin CP wouldn't work.
New posts link now doesn't list ALL posts for newly registered members
Unique random ID instead of timestamp used in name of sql backup to prevent remote scripts detecting sql file.
Mark new posts as read link added to New Posts area
Marking all posts as read now doesn't flag up all posts as being unread on nav bar.
Input fields that require numerical input now disallow anything other than numerical values
Disabled post_read table from remembering what guests have viewed to keep database size lower.
All images converted to .png format
Upload form styling amended to include "Browse" button
Sub-forums on index that are not viewable are now not shown.
Fixed edit subscription link for sef_url off.
Fixed link for caching read posts for sef_url off in Admin CP
Fixed sef_url on header link in search results
Added ability to turn Gamer Tags on or off via Admin CP
Added error message if inputted password does not match stored password on "Change Email" page in My Controls
PHP Info page removed.
Confirmation dialog box added to delete actions to prevent accidental deletion.
Defunct styles removed from stylesheet
Checkboxes now don't display silly border around them in IE/Opera
Version checker now works in IE6 & IE7
Drop-down boxes that navigate automatically upon a selection now work in IE7
Ability to close topic when creating or editing a topic has been added
Image file sizes optimized (thanks Rob!)
Changelog added to package
Fixed problem where drop-down in emoticon area of Admin CP wasn't working
Fixed problem where a blank input box was appearing for emoticon list where emoticons are stored in theme folder
Fixed problem where saving emoticon settings wouldn't work
Fixed problem where emoticons would be grabbed from default folder even though emoticons are in a themes folder
Fixed problem with browse.png and upload.png not being called from theme folder if they exist
Fixed problem with polls where option 1 would show in option 7's field.
Fixed problem where textarea BB buttons appeared in footer instead of being hidden
Fixed problem where collapsable quick reply area wasn't working in IE6
Fixed problem where smilies were appearing near top of forum in IE6 instead of at bottom.
Fixed problem where editing an existin group in Admin CP wasn't saving changes.
Fixed problem where editing custom profile information on a member in Admin CP didn't save changes.
Fixed problem with hidden field showing on subscriptions page
Fixed problem where clicking to warn someone redirected to subscription upgrade confirmation.
Fixed timezone resetting itself when Current Timezone option is selected in Admin CP
Fixed page numbers in online list
Fixed problem where emoticons weren't being parsed in some instances.
Fixed problem in online list where location was defaulting to forum index if member/guest wasn't viewing forum or topic
BabbleBoard now automatically optimises your mysql database before creating a backup
Option to turn on or off keyword tags added to Admin CP.
Added "Quick Edit" option to posts
Option to turn on or off quick editing added to Admin CP.
Database backups now gzipped to save space on server (provided function exists on your server)
Page numbers fixed on View New Posts pages
All available currencies now available to select from when creating/editing subscriptions
Added option to ban members from the Edit Member page
Disabled ability for administrators to be banned or deleted via Admin CP
Disabled ability for people to use [size= 0] BB Code. Text size will revert to 1px in height.
Terms & Conditions moved to language files instead of physical file.
Offline, suspended, blocked, banned pages all redesigned
Option to set reason for board being offline added to Admin CP
Error pages now show more specific information on what caused the error
Preview pop-up option added to a variety of pages.