1

(4 replies, posted in Programming)

Thanks! You're right, I wanted something that shared the values of PunBB - lean, fast and no unnecessary bells and whistles!

Phil

Hi there,

what's your favourite php open source blog app?

Thanks!

3

(21 replies, posted in Programming)

Can someone explain to me why mysql_real_escape_string uses a mysql connection handle? I don't quite get it!

Many thanks,

Phil

I had the same problem  - don't forget that you also need to go into Admin/Permissions and then Registrations and set "Allow banned email addresses" to "No".

Thanks for this feature Rickard et al. spammers from web.de were ruining my day!

OK, what do you think is the most evil technology on the web?

My vote is for Flash - anyone who writes a flash script without a "skip the flash" button should be (well, I was going to say "hung, drawn and quartered", but that's a bit extreme!) made to sit down in front of a computer on a 56kbps line and wait for the most bloated, useless piece of flash animation to download while their dinner gets cold and their beer warms up!!!!

6

(10 replies, posted in Programming)

Jeez you're right! What a noobie mistake (sigh...).

Unfortunately it stil doesn't work - any more ideas anyone?

Thx.

7

(10 replies, posted in Programming)

Ahem, yes I did notice that -still doesn't work! Thanks anyway...

8

(10 replies, posted in Programming)

I/m trying to do somehing similar, but much more limited: I want to limit downloads from a particular directory to logged-iin users. (The users log-in using PHP/MySQL and if authenitcated they have access to PunBB and the sites other features).

My naive thinking was that I would be able to protect the directory with  a .htaccess file, and then use PHP to send an authentication header to allow lgged-in users to download particular files (so that the users wouldn't have to see the challenge from the htaccess). Htaccess file is working properly, but I cna't seem to get the authentication header working - any ideas, or is this just the wrong way of going about it!  Thanks!

<?php
session_start();
if (!session_is_registered('first_name'))
{header("Location: ../members_area/member_login.php");
exit;}

//get the filename from the referring page
$file=$_GET['file'];

//get the browser settings from the header
$accept=$_SERVER['HTTP_ACCEPT'];
$accept_charset=$_SERVER['HTTP_ACCEPT_CHARSET'];
$accept_encoding=$_SERVER['HTTP_ACCEPT_ENCODING'];
$accept_language=$_SERVER['HTTP_ACCEPT_LANGUAGE'];
$connection=$_SERVER['HTTP_CONNECTION'];
$host=$_SERVER['HTTP_HOST'];
$browser=$_SERVER['HTTP_USER_AGENT'];

//get ready to generate the authorisation code
$all="testuser:password";

//encode the username and password
$encoded=base64_encode($all);

//send the header
header('GET /downloads/$file HTTP/1.0');
header('Connection: $connection');
header('User-Agent: $browser');
header('Accept: $accept');
header('Accept-Encoding: $accept_encoding');
header('Accept-Language: $accept_language');
header('Accept-Charset: $accept_charset');
header('Authorization: Basic $encoded');
?>

Has anyone got this working with punBB 1.2.5?

Thx.

10

(5 replies, posted in General discussion)

Rickard wrote:

I really don't smile There aren't a lot of good pubs in Helsingborg, Sweden.

So where all the good pubs in Sweden?

Do they have pseudo-English pubs (fake wooden beams and horse-brasses) or (shudder) fake Irish pubs - which seem to be all the rage in Canada?

11

(5 replies, posted in General discussion)

Wow - no one else has a favourite pub? I'm amazed...!

12

(5 replies, posted in General discussion)

OK, it's winter here and hard to do much outside, so time for a bit of mental fun. Since we've people from all over the world, the results should be interesting.

What's your favourite pub?

Here's mine:

Toronto: The Rebel House

Sheffield (UK): The Fat Cat


ConnorHD - is the Eagle still around in Leeds? Does CAMRA still own it?

13

(99 replies, posted in Programming)

ptlis wrote:

JEdit, it's cross-platform (great for us GNU/Linux & BSD users), (snip)

ptlis

Thanks, I'll give it a try in OS X. What plugins do you find helpful?

Thx.

14

(18 replies, posted in PunBB 1.2 show off)

Looks great in Safari!

How did you do it (the stationary image with scrolling boxes I mean!).

Thx

OK here's the code I'm using & which won't log me in to punbb 1.2 (a similar method works firn in 1.1.5).

The user logs in to my site and is verified in my user database (because the rest of the site uses sessions).

If they want to go to the forums, they click on a link which goes to a page with this code:

//hard-coded variables for testing

$username="user";
$password_hash="whatever";
$user_id="2";

include("config.php"); //to get some of the cookie variables

$now = time();
$expire = $now + 31536000;  //to set $expire

//new (1.2) cookie values
// Set a cookie, PunBB style!
//

setcookie($cookie_name, serialize(array($user_id, md5($cookie_seed.$password_hash))), $expire, $cookie_path, $cookie_domain, $cookie_secure);

/*include("include/functions.php");*/

header("location:index.php");
exit;

any thoughts why this doesn't work? Thx.

16

(99 replies, posted in Programming)

OK, time for the Mac heads to chip in...

What Mac editor do you use?

I use Pagespinner (it's commercial), but would love to hear of anything better...

Hi all,

Zalew was kind enough to provide a method ot login to punBB from somewhere else in your website.

It works fine in 1.1.5, but doesn't seem to work in 1.2. Could someone help me out with the correct code?

Many thanks!

18

(82 replies, posted in General discussion)

Are there any Mac users out there who use FIrefox?

How do you like it versus Safari?

(I'd try it but I'm out in the sticks and only have s-l-o-w access!).

Thx.

Hmmm, I was looking for all the discussions about reducing the number of <table>s in PunBB, anbd replacing it with CSS - anyone got any idea where that went? (can't find it using search).

many thanks...

20

(24 replies, posted in PunBB 1.2 discussion)

A question for the real programmers out there (i.e. not me) - is there a technical reason that PunBB uses cookies rather than sessions? - or was it written before sessions were available in php??

thx.

Further to the question about sessions - is there a technical reason why punBB uses cookies rather than sessions?

22

(32 replies, posted in General discussion)

Name: phil
Age: the oldest fart so far - 46
Where: Shelburne, Ontario, Canada
Interests: Cheese, web programming, 17th C. living history
Occupation: Dairy Sheep Farmer