A couple things about this mod:

1. It's vulnerable to an email injection
http://www.securephpwiki.com/index.php/Email_Injection
http://en.wikipedia.org/wiki/E-mail_injection

2. Step 2 is unnecessary: the administrator simply has to go to Admin Options and add the link as an Additional Navlink

3. You could potentially have 2 divs with the same ID with your suggestion, which would be improper HTML

4. Why not have $sendto be the webmaster or administrator emails listed in Admin Options?

5. Why not use the pun_mail function, which uses the forum settings for mailing (SMTP/mail function)?

3,452

(11 replies, posted in PunBB 1.2 discussion)

lucasreddinger wrote:

so you're saying that if my server is configured for GMT-5, then on Jan 1 1970 00:00:00, time()==(-5*60*60) ?

If your server's timezone is GMT -5, at Jan 1 1970 00:00:00 GMT, time() would return (60 * 60 * -5), yes.

3,453

(12 replies, posted in PunBB 1.2 discussion)

No problem smile

Are you including include/common.php in the file in include/user? If so, that's the issue: PunBB already loads include/common.php.

3,455

(12 replies, posted in PunBB 1.2 discussion)

This is code taken directly from PunBB wink

    // If a cookie is set, we get the user_id and password hash from it
    if (isset($_COOKIE[$cookie_name]))
        list($cookie['user_id'], $cookie['password_hash']) = @unserialize($_COOKIE[$cookie_name]);

You'll want to edit PunBB's main.tpl file and add the HTML (or PHP, in which case you'll need to use the pun_include tag) for your header/footer in the correct place

3,457

(39 replies, posted in PunBB 1.2 troubleshooting)

p0wer, we all have lives as well: you can't expect unpaid people on a support forum to code your website for you. wink
And phpMyAdmin lets you administer your database and execute queries: queries aren't stored someplace where you can delete them.

Just create a blank file, call it index.html

welshmike wrote:

Ah! I think I now understand. There is no control of editing. So a message in a forum closed for posting can still be edited by the original poster.

There is no control on a per forum basis. You can disable editing for a group entirely though.

As for the mod, I don't know that one exists: your best bet would be to ask over at Punres

3,460

(39 replies, posted in PunBB 1.2 troubleshooting)

Or you could try doing it yourself wink

p0Wer wrote:

Ah yeah that would just remove the text, but if I replaced it with the checkbox automatically unchecked then it would remove silent edit altogether as mods can check the box?

You would need to remove the checkbox for moderators and change the form processing

Yes: as I said, editing permissions are not controlled on a per-forum basis like reading and posting are.

Of course, that only removes the checkbox, you have to make the same type of change to the code that processes the submitted form

3,464

(12 replies, posted in PunBB 1.2 discussion)

Sam Rusch wrote:

Hello, I'm making additions to my copy of PunBB, and I wanted to know how the read the cookie that is set. I've read the code in the functions.php file numerous times, but I can't figure out how the cookie is actually read. I know that the "userid" is set in the cookie, but how would I go about extracting that value?

Thank you.

The cookie is a serialized string which contains an array with 2 elements: the user_id and the password_hash

3,465

(11 replies, posted in PunBB 1.2 discussion)

The epoch happened at 00:00:00 GMT, the PHP function does not return the timestamp in GMT wink
http://us2.php.net/manual/en/ref.datetime.php

Note:  Please keep in mind that these functions are dependent on the locale settings of your server. Make sure to take daylight saving time (use e.g. $date = strtotime('+7 days', $date) and not $date += 7*24*60*60) and leap years into consideration when working with these functions.

set_default_user, functions.php

Editing is not a permission you can control on a per-forum basis without a mod wink

3,468

(11 replies, posted in PunBB 1.2 discussion)

Timestamps are taken from PHP's time() function, which returns timestamps based on the server's clock (not on GMT).
In PunBB 1.3, we use gmdate instead of date, which means server_timezone becomes obsolete wink

3,469

(39 replies, posted in PunBB 1.2 troubleshooting)

I have no clue, but you should try it: the code has changed a bit

3,470

(39 replies, posted in PunBB 1.2 troubleshooting)

You seem to be using an older version of the mod: try using
http://www.sparu.com/other/PunBB/Mods/s … .0.9.1.zip

Moved to Modifications

3,472

(12 replies, posted in PunBB 1.2 discussion)

Moved to PunBB Discussion

3,473

(4 replies, posted in PunBB 1.2 troubleshooting)

I don't really understand what you're doing/what you want to do, but that is the padding.

That's a clearer div I believe

Take a look at the news generator plugin smile