Just wanting to ask if any brave souls might be willing to give this a try and see if they can find any problems with it, or might have any suggestions for it. big_smile The last release down at the bottom of the page:

http://www.punres.org/viewtopic.php?id=3225


Cheers,

Matt

1,877

(0 replies, posted in General discussion)

Just another quick question if I might. What would be the standard/preferred permissions to create upload files and directories with?


Cheers,

Matt

1,878

(12 replies, posted in PunBB 1.2 discussion)

Sam Rusch wrote:

This is what I am currently using and all it does is show the error message.

$result = $db->query('SELECT contactban FROM '.$db->prefix.'users WHERE id='.$cur_user['user_id']) or error('Unable to select from database', __FILE__, __LINE__, $db->error());

There is no contactban value in the database:

http://punbb.org/docs/dev.html

1,879

(5 replies, posted in Programming)

Reines wrote:
elbekko wrote:

What you could do is just set a cronjob to scan your uploaded files once a day smile

To be honest, I think that would be worse, and you'd be rescanning files you already scanned. Unless of course you make it note new files and only scan those, but I still would think scanning at all is overkill.

A quick ctime check would sort that. big_smile An extra bit of caution never hurts, even though the server itself is running a proper OS, some, (most), of the client machines won't be. big_smile

treelo wrote:

i dont actually want the news generator though

No, but you could try reading the code and adapting it. big_smile

If you're sure you've created the config.php file correctly in your root forum dir, then I'd say check permissions on the file.

1,882

(5 replies, posted in Programming)

Cheers. smile I thought it might be a bit of overkill, but thought it best to ask. big_smile

1,883

(5 replies, posted in Programming)

Wasn't sure which section to ask this in, so apologies if it's in the wrong section.

Question: Is it worthwhile putting in an exec call to run an AV scanner on uploaded images in the upload script, or is it not worth the hassle. Or, are images not an issue, as such?


Cheers,

Matt

1,884

(9 replies, posted in Programming)

Okay. Now I'm a really happy chappy. big_smile Thanks ever so much to you both for your help and advice. I've got a basic working setup. smile big_smile Thanks ever so much. smile

1,885

(9 replies, posted in Programming)

Thanks. I think I might now have enough of a basic idea to be script dangerous. big_smile I should now be able to use trial and error to get my thoughts going down the right lines. big_smile Cheers once again.


Matt

1,886

(9 replies, posted in Programming)

Smartys wrote:

One note before I start: $HTTP_POST_VARS is deprecated, you should use the $_POST superglobal instead

Thanks for that. I'll make sure I use that method. smile

Smartys wrote:

I'm not exactly sure what you mean, $_POST (and all the superglobals) are simply arrays with the keys being the parameters passed. So here for example, if my URL is http://punbb.org/forums/viewtopic.php?pid=91477, $_GET will contain one element, pid, with a value of 91477.

Apologies if I'm appearing a bit vague with my questions. Between trying to master the basics of both php and html, I am going into that mindstate of no return. big_smile What I was meaning to ask, working on your example above, is that if one wishes to pass more parameters, is the question mark the common seperator between all arguments/parameters passed? For example, would the following be correct format to use to pass multiple arguments:


http://punbb.org/forums/viewtopic.php?p … er=unknown


BTW, thanks ever so much to you all for your help and patience. smile


Matt

1,887

(9 replies, posted in Programming)

elbekko wrote:

You will indeed have to submit the files to be removed to an external file. And yes, unlink() is the correct function.

Cheers. smile The penny is finally beginning to drop with how to go about things now. big_smile One last question if I may. The HTTP_POST_VARS bit. Is there any documentation on the site regarding them, and the syntax that should be utilised with them, or is it a case of trying to figure it out from the various scripts?

Thanks once again,

Matt

1,888

(9 replies, posted in Programming)

Smartys wrote:

1. rm is not a PHP function

Oops. Old habits die hard. big_smile Unlink is the one I have in there. That is the correct equivalent of rm, is it not?


Smartys wrote:

2. button should be input

Cheers. smile


Smartys wrote:

3. PHP is done server side, so you need the user to submit a form with all the data

Mind if I ask one more question on this bit? Do I take the php section out and supply the filenames to another script? Something along the lines of:

<form method=\"post\" action=\"page.php?subpage=\"delete\"?".$file1.",".$file2."\"><input type=\"submit\" value=\"Delete\" onclick=\"submit\"/></input></form>

Or can the deletion bit actually be called from within that section above? Apologies for what may appear to be obviously simple questions. smile I'm just having a tad of a problem getting my head around this bit.

p.s: Is there a good online resource for html scripting/writing information and tutorials?


Thanks ever so much once again,

Matt

1,889

(3 replies, posted in General discussion)

Only if you're using MySQL.

1,890

(9 replies, posted in Programming)

Banging my head against the wall with this one. How might one go about implementing something along the lines of the following concept? I know even less of html than I do php, so not a good combination. big_smile

<button type=\"submit\" value=\"delete\" onclick=\"<?php rm (".$file1.", ".$file2."); ?>\">Delete</button>


Thanks in advance,

Matt

1,891

(3 replies, posted in PunBB 1.2 discussion)

What's one of the stickies say at the top of this forum? big_smile

1,892

(10 replies, posted in PunBB 1.2 troubleshooting)

Cds39 wrote:

What was it that was supposed to be CHMOD 0777?

The avatar directory.

Look for the line in register.php: // Add the user

The database update is below there.

romeo wrote:

ps is there a way to keep my forum private so only users on the forum can read the posts? and can I make so that its an invitation only forum? ds smile

You can do that from the admin panel.

1,895

(1 replies, posted in General discussion)

Scrub that question. big_smile Just grepped and found which method is preferred/used. big_smile

Which of these two would be the preferred, (if either), method of selecting guest users access permissions?

&& !$pun_user['is_guest']

or

&& $pun_user['g_id'] != '3'


Cheers.

Matt

The javascript triggers mod is by far the easiest to use for youtube/google, however. No quoting at all required, and works a treat.

Firstly, top mod Koos. smile

Secondly, I think the format for adding text after the image is:

[url][img][img]"Type your text here"[url].


You may have to experiment and double check though. big_smile

1,899

(10 replies, posted in General discussion)

guardian34 wrote:

Edit: Matt, I'm guessing he had a newline that trimmed off when he posted it.

smile Oops. Never thought of that. big_smile

1,900

(10 replies, posted in General discussion)

The braces enclose a command. They should be paired. {Start of......End of}. Even by deleting that last brace which is serving no purpose, you're still three }'s short in that script. Also, the error says line 1051? That script, as posted, is 1050 lines long.