3,001

(29 replies, posted in Programming)

session_destroy (sessions will also be cleaned up if not used in a certain amount of time)

3,002

(29 replies, posted in Programming)

No tongue
Session data is stored in an array, but sessions and arrays aren't really related

3,003

(29 replies, posted in Programming)

Yes, since the data would be server side. Of course, the person could still keep making requests until they got to the one question they know, but meh

3,004

(29 replies, posted in Programming)

Aha, now I understand smile
You would need to store the generated values using a session or some other method (you need to put it at the beginning of the script). Alternately, you could have a hidden form element that is the index (you just have to make sure it's a valid index and keep in mind that someone can cheat with that if they know the answer to one question)

3,005

(29 replies, posted in Programming)

I'm not sure exactly what your question is smile
I think some example code might be helpful

3,006

(1 replies, posted in PunBB 1.2 troubleshooting)

You modified base.css and messed up a declaration related to the hr
FIND

DIV.postsignature HR {
    color: #FFFFFF
        MARGIN-LEFT: 0px;
    WIDTH: 200px;
    TEXT-ALIGN: left;
    HEIGHT: 1px;
    BORDER:none
}

REPLACE WITH

DIV.postsignature HR {
    MARGIN-LEFT: 0px;
    WIDTH: 200px;
    TEXT-ALIGN: left;
    HEIGHT: 1px;
    BORDER:none
}

Moved to Troubleshooting

Redirect URLs are used for making a forum actually link to another site (The Punres link on the index of this forum is an example).
As for adding keywords in URLs, you would have to create a .htaccess file to send the requests to viewforum.php and you would have to modify viewforum.php to figure out the correct forum from the name.

OK, try this
FIND

if (!@move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))

REPLACE WITH

if (!@copy($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))

And if that doesn't work, do the following:
FIND

if (!@copy($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))

REPLACE WITH

if (!copy($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))

Paste me the errors you get
FIND

if (!copy($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))

REPLACE WITH

if (!move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))

Paste me the errors you get

Dr.Twister wrote:

So has there been any updates or changes based on this thread?  I'm new to Pun and have encountered the same issues.  Has anyone written a mod or a quick update to allow users to specify the TMP location? 

Also for clarification my issues is NOT related the permissions on the img/avatar directories and it is NOT related to php safe mode (which is off).  So based on what I've read from everyone else, this is related to the default tmp directory PHP uses.  If I can't get my host to change the permission on that directory, I'll not be able to use avatars.  Kind of sad... sad

So I'd love to find a work-around since it seems as if many people have experienced similar issues.

Thanks.
-dt

It actually hasn't been that big of an issue. I'll look into it again though
Edit: It looks like upload_tmp_dir can't be specified with .htaccess or ini_set

3,011

(4 replies, posted in PunBB 1.2 troubleshooting)

Which steps have you tried?

PunBB's homepage is (I believe) static HTML coupled with the news generator plugin
Oh, and I don't believe you can legally copy the design for it exactly

3,013

(4 replies, posted in PunBB 1.2 troubleshooting)

Try deleting all the .php files in the cache directory

You would have to do some coding to get the posts without extern.php as well wink

3,015

(5 replies, posted in PunBB 1.2 troubleshooting)

You could run this query

update prefixusers set last_post = UNIX_TIMESTAMP() where last_post > UNIX_TIMESTAMP()

replacing prefix with your database prefix. That wil make sure everyone's last post is correct.

If it keeps happening, talk to your host

3,016

(5 replies, posted in PunBB 1.2 troubleshooting)

I think I've seen this before. It's due to the clock on your server being changed to the future after someone has posted.

So you can't include it using the URL?

Yes

Moved to Modifications

No, it's not really a bug per-se, but it should be better documented that order is relevant.

And I'll try to explain it a bit better.
The links look something like this:

array
(
    0 => 'Index',
    1 => 'User list',
    2 => 'Search'
)

When you add something to index 0 and index 1 (in that order), you get the following

array
(
    0 => 'thing 1',
    1 => 'Index',
    2 => 'User list',
    3 => 'Search'
)
array
(
    0 => 'thing 1',
    1 => 'thing 2',
    2 => 'Index',
    3 => 'User list',
    4 => 'Search'
)

Done in reverse order, however, it looks like this

array
(
    0 => 'Index',
    1 => 'thing 2',
    2 => 'User list',
    3 => 'Search'
)
array
(
    0 => 'thing 1',
    1 => 'Index',
    2 => 'thing 2',
    3 => 'User list',
    4 => 'Search'
)

You see how the array keys change and how that affects placement?

Yes, we hang out in #punbb on Quakenet

3,022

(13 replies, posted in PunBB 1.2 troubleshooting)

OK, use this version instead (I assume you're using Easy Poll +, which I have no experience with)
http://www.punres.org/download.php?id=369

Dr.Jeckyl wrote:

they work in reverse. odd...

I think the issue is that you're working with array keys. So when you insert something at the beginning, it has to redo all the keys for the other entries, which changes the key you have to use to add another entry. Doing it in reverse means you'll only reindex parts you won't add more things to

towelie wrote:

(If I want to sell the script and it is tied into punbb then I have to give them my source free?) or (Do I just need to give them punbb's source? (Obviously I would never attempt to sell punbb, that is just plain f*kin ridiculous lol.))


- edit: figured out new code prob

You can sell the code for however much you want, but you also need to allow the source code to be redistributed for free

Hmm, it's working fine for me
I think I know what the issue is though: try putting the entries in in reverse order (so the largest number comes first)