Software update

Nick's current affairs & general discussion about anything that's not sport.
Voice your opinion on stories of interest to all at Nick's.

Moderator: bbmods

User avatar
Tannin
Posts: 18749
Joined: Sun Aug 06, 2006 9:39 am
Location: Huon Valley Tasmania
Been liked: 4 times

Software update

Post by Tannin »

Just to help the coding gurus out who maintain this wonderful site, I knocked up a small update to the site PHPBB code.

Code: Select all

Class HalFix extends HAL{
	function __construct($current_post_count) {
		$position_on_page = $current_post_count % POSTS_PER_PAGE;
		if (0 <> $position_on_page) {	// not divisible by posts per page constant, so next post will be on the same page as last post
			$this->HAL_may_post = TRUE;
			$this->HAL_post_content = standard_random_nonsense_generator($this->previous_post_content);
			}
		else {
			$this->HAL_may_post = FALSE;
			$this->HAL_post_content = NULL;
			$this->HAL_special_instructions = "Shut the farnarkle up you stupid robot, people want to read the last actual post, not your carp, ";
			$this->HAL_special_instructions .= "and they hate having to click 'previous page' and wait for it to load. ";
			$this->HAL_special_instructions .= "Don't bloody post if it's going to take the thread onto a new page. Got it?";
			}
		}// end __construct
	} // end class

�Let's eat Grandma.� Commas save lives!
User avatar
David
Posts: 52600
Joined: Sun Jul 27, 2003 6:04 am
Location: the edge of the deep green sea
Has liked: 504 times
Been liked: 1010 times

Post by David »

Lol. I guess I'm not the only one who gets annoyed by that. :P
"Every time we witness an injustice and do not act, we train our character to be passive in its presence." – Julian Assange