Cool.

Let us know when you've got the site up and running.
I'd be interested to see how you used it.

--Alan

What sort of box element is it?

A div?

Are you using CSS to do it?

--Alan

AG, thanks for sharing the solution, I was wondering how to fix that.

Could this fairly be described as a bug worthy of a fix in PunBB generally? Smartys?
I guess it's only a problem when you're using the parser outside of its usual space.

--Alan

I see!

That's because the code above defines a function to spit out the necessary HTML.
You then need to call that function where you want the login stuff to be.

So simply put:
<?php login_menu(); ?>
Where you want the login box to appear.

The code is put into a function so that you can have it in a separate file so that you don't have to put the same code into all of your pages.

--Alan

30

(0 replies, posted in General discussion)

Found this via digg today:

http://meyerweb.com/eric/thoughts/2007/ … -reloaded/

It seems to be an idea whereby you reset all the basic CSS properties, giving you a truly blank canvas.

Good/Bad idea?
Thoughts?

--Alan

What error do you get? What doesn't work about it?

[No need to delete anything, it will still work, it's just inefficient code]

--Alan

http://www.projecthoneypot.org/5days_wednesday.php

Of interest would be the Http:BL API which may help provide boards with protection.

I suspect that this may be too fundamental for an extension.

--Alan

33

(16 replies, posted in General discussion)

POE2, it's a free mod for BF2 and it's ace.

http://www.pointofexistence.com/

ninjashoes wrote:

I will use it for an upcoming forum I am planning centered around the unexplained.

So it's a site about v1.3?

hehe

This morning a number of my PHP based sites are having major issues.
Mostly 'Fatal error: Cannot redeclare class **** in..'

My hosts are hinting that they've just upgraded to php 4.4.6 so that could be related.
What seems to be helping fix some scripts is that they didn't have ?> at the end.

Looking through PunBB code I see that lots aren't closed with ?>
Can anyone please explain to me what the rules are about adding ?>

Is it not necessary on code that is included/required into others?
That doesn't quite make sense as many (e.g. include/dblayer/mysql.php) start with <?php but don't end with ?>

I am confused.

--Alan

tubby wrote:

..but is the 1st "echo $stroutput;" necessary?

Well spotted Tubby, sloppy coding on my behalf!

--Alan

This will add a login form to any page from which you call it.
If already logged in, it shows your username and group.

// Login Menu
    function login_menu() 
        {
        global $pun_user;
        if ($pun_user['is_guest'])
            {
            $stroutput= '<form id="login" method="post" action="'.PUN_ROOT.'login.php?action=in" onsubmit="return process_form(this)">

            <input type="hidden" name="form_sent" value="1" />
            <input type="hidden" name="redirect_url" value="'.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'" />
            <label for="req_username">Username: </label>
            <input type="text" id="req_username" name="req_username" size="4" maxlength="25" />
            <label for="req_password">Password: </label>
            <input type="password" id="req_password" name="req_password" size="4" maxlength="16" />
            <input type="submit" name="login" value="Login" />
            [<a href="'.PUN_ROOT.'register.php">Register</a>] 
            </form>';

            echo $stroutput;    
            }
        else 
            {
            $stroutput= '<p>Logged in as: '.pun_htmlspecialchars($pun_user['username']).' ('.$pun_user['g_user_title'].') [<a href="'.PUN_ROOT.'login.php?action=out&id='.$pun_user['id'].'">Logout</a>]</p>';
            echo $stroutput;    
            }
        }

I found it somewhere on this site (or Punres) so apologies for not crediting the original author.

--Alan

38

(28 replies, posted in General discussion)

Raybo wrote:

I would never, ever, NEVER go back to phpBB.

No one is suggesting that you do but it's worth seeing what the competition are up to, and taking their best ideas!

--Alan

39

(28 replies, posted in General discussion)

"phpBB - The Beast with 1000 holes!" (v3)

40

(28 replies, posted in General discussion)

What's a "clean URI"?

In fact, what's a dirty URI? smile

--Alan

41

(28 replies, posted in General discussion)

The chaps who create phpBB have re-vamped their site and based it on the forthcoming PhpBB 3 software.

OF COURSE I'm not suggesting that it's any good wink
but its interesting to see what features and styles they've added.

www.phpbb.com

--Alan

I'm looking at converting a Joomla site to PunBB and have a few questions..
The site is Joomla based, with a JoomlaBoard forum (derivative of SimpleBoard?).

--Has anyone got experience of converting JoomlaBoard to PunBB?
--Does the current converter work?

--Does Joomla (not JoomlaBoard) have its own user accounts?
--Can they be converted into PunBB user accounts easily?

All advice appreciated.

Thanks

--Alan

43

(2 replies, posted in PunBB 1.2 troubleshooting)

I found that my error logs were being suppressed/screwed because I had enabled gzip compression in my .htaccess file.

Might be worth disabling all compression (including in punBB) and trying again.

--Alan

Thanks for the kind comments!

(yes, the sub-forums are hard work to maintain, especially if I try and add one in the middle!)

--Alan

I've resurrected an old project site, converted it from phpbb, added sub-forums for each manufacturer and added a few new graphics to the Cobalt punBB style.

The idea is that people can ask maintenance questions about cars and motorcycles.
Many of the people registered in the past are experienced mechanics.

www.oily-rag.com

--Alan

This is probably achievable with the Easy Profile Fields: Extended 1.0 mod. That said, it's quite cumbersome and I would prefer to be able to just manually add the form items to the profile.php myself but editing profile.php is too complicated for me, I don't understand what to put where!

I've been asking for someone to help me just add a boolean field with a radio button instead of a textbox for input (on the profile form), can anyone help please?

--Alan

I'd like to add a column to the users table that will indicate whether a user is or isn't willing to receive a newsletter from my site.

To that end I want to add another section to the profile.php page, under 'essentials' that allows the user to select whether or not to receive mailings (radio buttons, YES/NO). Obviously there needs to be the corresponding form processing (with security) to commit the data to the database.

I've looked in profile.php and although I think it should be simple (I've written loads of form processing scripts) I must admit that understanding profile.php is a bit beyond me!

If anyone could help me create this addition, or point me in the right direction I'd be very grateful.

--Alan

Has somebody got a site with a demo of this (Topic Rating) mod that I can look at please?

Thanks

--Alan

Huge thanks to all the people who have kept/brought this mod up to date.
It's very useful for an old site of mine that has a huge no. of forums.

--Alan

50

(11 replies, posted in PunBB 1.2 discussion)

The person receiving the message gets the email address of the sender, I think.
I sent one from this board about an hour ago to myself but haven't received it yet.

--Alan