Web
phpbb3 + Flyspray Part 2
Mar 1st
In my previous post I mentioned how I wanted to bridge phpbb3 and Flyspray. Well, I’ve done that, but due to the way Flyspray works, it was basically a complete pain.
I love Flyspray, I really do, but I think it is time I moved on to a new bug tracking system. Unfortunately though I don’t know of that many (if you do, definitely please contact me through the comments!). I’ve tried Trac, but on the host I use it is an absolute nightmare to get installed. What I’d really like is a simple PHP-based system like Flyspray, but one that does get updated regularly.
The trouble I had with Flyspray is I basically had to hack it to get it working with my forum. In the end I get phpbb to do the authentication (on each page load), and if the Flyspray user doesn’t exist it manually creates it.
It definitely isn’t the ideal solution, the DokuWiki bridge that someone else (awesome person) wrote works perfectly, but that comes down to DokuWiki being easier to modify with plugins.
So yes, if you are interested in bridging Flyspray and phpBB3, it is possible. However it basically is bypassing all of Flyspray’s authentication and saying “This is the ID of the logged in user”. You also have to rename their Database and User classes, since they clash with phpBB.
All in all, if you’re looking for a bug tracking system that can easily bridge with a forum, look for something else.
phpbb3 + Flyspray
Feb 25th
I am currently working on a mini-project, and part of it requires a forum as well as a wiki and a bug tracking system. I have already set up phpBB3 with Dokuwiki, and they’re bridged so the accounts are linked. That’s absolutely great!
What I’m currently trying to work on is installing Flyspray, and then writing my own bridge between Flyspray and phpBB. The way I theorize it, I’ll create a hidden group in phpBB called “flyspray” or something, and then when you access Flyspray it will check to see if you’re a member of that group using phpBB’s functions.
We’ll have to wait and see if it works, but if it does I’ll see about making the bridge public.
Wish me luck!
Trust Nobody
Jan 16th
One important lesson when developing applications (I’m focusing on websites here, but this applies to all types of applications) is to ditch user trust.
In a nut shell, do not trust any input you receive from a user. Seriously, do not assume it is clean and good, treat all user input (whether it be cookies, text from a text box or something else) as potentially dangerous. Check it, filter it, escape it.
Never let input from a user go straight into your database or on to a page without it being filtered. If you let it straight into the database you leave yourself open to SQL Injections and other attacks.
Keep that in mind when you are developing an application, any and all user input needs to be checked out, torn to pieces, ripped apart, put back together before being considered safe.
Striped Backgrounds
Jan 3rd
Just a FYI for all of you web designers out there about pretty striped backgrounds.
I’m actually unsure if this is a LCD screen thing, or all of them in general. I actually don’t remember it from my old CRT screen, but let’s face it, who has a CRT these days? (OK, I’ll admit it I have one…)
Some websites like having a striped background, with an image like the following.
It does look pretty neat, and when it’s full-paged background it can give a webpage an interesting look.
The trouble is, scrolling. On screens like mine images like that do not work well when scrolling. The background does this weird flickering thing when scrolling along, and it does mean the website looks less cool, and more cheap.
I’d seriously advise you skip the tiny little stripes in background images. Try larger ones, they can look pretty good as well. Or, you know, a solid colour doesn’t hurt either.
Add a CSS class to any disabled button
Dec 30th
This adds the class of “myclass” to any input with a type of “button” that is marked as disabled. This way you can easily style disabled buttons across a multitude of browsers.
$('input[type=button][disabled=disabled]').each(function(){ $(this).addClass('myclass'); });
LTrim, RTrim and Trim JavaScript Functions
Dec 22nd
These are some functions I found online, and it drives me mad having to find them each time. I didn’t write these, but they’ve been passed around a lot. They’re useful if you need some basic JavaScript functions.
Left Trim
Pass it a string to trim and any characters that should be trimmed from the left. chars can be left empty to trim spaces.
function ltrim(str, chars) { chars = chars || "\\s"; return str.replace(new RegExp("^[" + chars + "]+", "g"), ""); }
Right Trim
Works exactly the same as the left trim, just on the right.
function rtrim(str, chars) { chars = chars || "\\s"; return str.replace(new RegExp("[" + chars + "]+$", "g"), ""); }
Trim
Combines the left & right trim to have a full trim functions.
function trim(str, chars) { return ltrim(rtrim(str, chars), chars); }
