1,851

(11 replies, posted in PunBB 1.2 discussion)

sirena wrote:

If even a small percentage of that was queries from users, problem reports etc, that would be the real hassle factor. smile

Definitely agree with you there. big_smile

1,852

(11 replies, posted in PunBB 1.2 discussion)

sirena wrote:

That was my first thought too. What a hassle.

Did you see the one that reported that they handle '10k emails daily' ? Yeesh. Who wants to deal with that?

That is a small scale e-mail throughput, by some peoples standards. big_smile If one has a *nix OS on the server, the likes of Postfix or Exim wouldn't even be sweating with that throughput on even modest hardware. big_smile

Are there any error messages in the server logs when you try to upload?

Are you on a hosted server? Sounds like php is most likely in safe mode. Log in as admin in PunBB, go to Administration, and where it says Environment on the initial page, click on show info and see if safe_mode is on. (About a third of the way down the page I believe). That error is not being generated by Gus itself, so I would, (for the moment), assume that is a php message.

1,855

(4 replies, posted in General discussion)

There are several image upload mods available.

Ones not requiring DB alterations:

Automatic Image Upload with Thumbnails
Gus

Ones requiring DB alterations:

PBB Gallery
Attachment Mod

I think they're all listed in the modifications section.

Put the new version of the gallery upload scripts over on PunRes.

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

Quick question. Have you read this?

http://punbb.org/forums/viewtopic.php?id=10518

1,858

(7 replies, posted in Feature requests)

Another alternative to using iframes is greybox:

http://orangoo.com/labs/GreyBox/

dude07 wrote:

Would it be unnecessarily difficult to mod this so the thumbnails link to an html page with the full sized image in it? With a common template that the images would display in?

You can do a slideshow type effect with Lightbox or Greybox, which would only need a rel tag adding to the code.

1,860

(9 replies, posted in General discussion)

It'll probably be something in the content of the headers that they are filtering upon, but their techinfo on their website is appalling, (what miniscule amount actually exists), so figuring out which bit is nigh on impossible without changing each bit piece by piece and trying again.

1,861

(2 replies, posted in General discussion)

Smartys wrote:

Just add PUN_ROOT before the links in header.php
In 1.3, full URLs are generated for each link smile

Cheers. smile I'll just stick with dropping 'em in the root dir for the moment then. big_smile

1,862

(2 replies, posted in General discussion)

Another one of those questions where I think I may be missing the blindingly obvious. big_smile

If one has a script subdir in the root directory, i.e: [forum-root]/subir/script.php, one can set PUN_ROOT in the scripts to point back to the root dir, but is there a global way of making header.php and such look in the root dir for the various links/paths to scripts, rather than the pwd? For example, out of header.php:

<li id="navuserlist"><a href="userlist.php">User list</a></li>

which means the link will be referenced to the pwd instead of the root dir.


Cheers,

Matt

1,863

(17 replies, posted in Programming)

Just popping up a quick post to say thanks for all the help and advice. smile Have got that part of things working a treat now.  Thanks again.


Matt

1,864

(11 replies, posted in PunBB 1.2 troubleshooting)

I know this might sound a daft question, but you haven't altered your colours in FF and told it to override website defaults, have you?

1,865

(17 replies, posted in Programming)

elbekko wrote:
Trying to prod 10,000,000 values in an array.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in D:\Program Files\xampp\htdocs\punBB4\arr_test.php on line 5

Yep, Smartys is right tongue

big_smile big_smile big_smile I take it it should be a safe bet then, looking at those numbers. big_smile

1,866

(17 replies, posted in Programming)

Smartys wrote:

No, it's not very complicated at all and doesn't involve any more database lookups. It sounds like I need to explain the way things work wink
When you do $db->query, it returns a resource. That resource can then be given to certain functions (in PunBB's abstraction layer, $db->fetch_assoc and $db->fetch_row are 2 examples) which will allow you to traverse the data.
Your code using $db->fetch_assoc would look something like

$result = $db->query("SELECT id, username FROM ".$db->prefix."users") or error('Could not get user list', __FILE__, __LINE__, $db->error());

$users = array();
while($user = $db->fetch_assoc($result))
    $users[$user['id']] = $user['username'];

Your code using $db->fetch_row would look something like

$result = $db->query("SELECT id, username FROM ".$db->prefix."users") or error('Could not get user list', __FILE__, __LINE__, $db->error());

$users = array();
while(list($id, $username) = $db->fetch_row($result))
    $users[$id] = $username;

Thanks ever so much for that. smile I *think* I've seen the light now. big_smile So the basic way that it works is that the initial lookup creates the resource info and connection used by the second lookup. The second lookup then allows you to scroll through the data, (using the while loop), assigning the required info from each row from the table to an array, then terminating the db connection once you have scrolled through, and extracted, the required data? Have I grasped the correct gist of how it works?

Thanks ever so much for your help, BTW. Until around three weeks ago I'd never touched php before, so my learning curve does tend to go awry on occasion. big_smile

1,867

(17 replies, posted in Programming)

Smartys wrote:

You would have to use $db->fetch_assoc($result) or $db->fetch_row($result) to get at the actual data

So I assume that would mean it's getting back to multiple database lookups, then? Must admit, until I've started looking at this idea, I hadn't realised just quite how convoluted it is. big_smile Php has more features than you can shake a stick at, but it definitely doesn't do anything the easy way. big_smile


MattF wrote:
Smartys wrote:

Right. Numpty mode on. big_smile What's a theoretical guess, (username, id), for a standard setup, then? The last two answers completely befuddled me. big_smile

The answer? Big enough that you shouldn't worry smile

Cheers. That's more the type of answer I understand. big_smile

1,868

(17 replies, posted in Programming)

Smartys wrote:
elbekko wrote:

Maximum size is the same as the int size on your system I think.

I think it's limited only by the memory your scripts are allocated wink

Right. Numpty mode on. big_smile What's a theoretical guess, (username, id), for a standard setup, then? The last two answers completely befuddled me. big_smile

1,869

(17 replies, posted in Programming)

Just realised I have no idea what the output of the lookup would look like, big_smile, so another question if I may.

$db->query("SELECT id, username FROM ".$db->prefix."users");

What would the actual output look like? Apologies for asking so many questions. smile


Matt

1,870

(17 replies, posted in Programming)

Smartys wrote:

So you're trying to read through the folders in a directory and map the user IDs to a username?
Like you said, special characters are the issue: I would suggest just grabbing the id, username for every user and adding it to an array
so $user[1] = 'Guest', $user[2] = 'MattF', etc

Cheers. Single database query and sort it from there it is, then. big_smile

Just as a final 'don't want to miss something obvious' type question, is there a maximum size that an array can be, or should it easily hold all the id's and usernames?


Thanks once again,

Matt

1,871

(18 replies, posted in General discussion)

Using a Postgres DB by any chance?

1,872

(17 replies, posted in Programming)

Also, just working on the create dir as username theory, can register.php be easily enough modded to disallow special characters in usernames, if dirname as username is the preferable way of doing things?

1,873

(17 replies, posted in Programming)

For each subdir in one parent directory, (each subdir being owned by a different user), show the username rather than just the folder name or uid.

Edit: Come to think of it, would it be preferable to create the directory initially with the username rather than with a basic preset dirname appended by the uid?

1,874

(17 replies, posted in Programming)

Quick question. Which would be the preferred method for matching uid's to usernames.

1) Select all id's and names into an array and sort through the array.

2) Make a separate lookup on the db for each uid and username?


Cheers,

Matt

Never seen/used the software personally, but try removing the [] from around the paths. They are usually, in unix fashion, merely there to illustrate where your path goes, in the readme file.