If even a small percentage of that was queries from users, problem reports etc, that would be the real hassle factor.
Definitely agree with you there.
You are not logged in. Please login or register.
PunBB Forums → Posts by MattF
If even a small percentage of that was queries from users, problem reports etc, that would be the real hassle factor.
Definitely agree with you there.
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. 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.
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.
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.
Quick question. Have you read this?
Another alternative to using iframes is greybox:
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.
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.
Just add PUN_ROOT before the links in header.php
In 1.3, full URLs are generated for each link
Cheers. I'll just stick with dropping 'em in the root dir for the moment then.
Another one of those questions where I think I may be missing the blindingly obvious.
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
Just popping up a quick post to say thanks for all the help and advice. Have got that part of things working a treat now. Thanks again.
Matt
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?
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
I take it it should be a safe bet then, looking at those numbers.
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
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. I *think* I've seen the light now. 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.
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. Php has more features than you can shake a stick at, but it definitely doesn't do anything the easy way.
Smartys wrote:Right. Numpty mode on. What's a theoretical guess, (username, id), for a standard setup, then? The last two answers completely befuddled me.
The answer? Big enough that you shouldn't worry
Cheers. That's more the type of answer I understand.
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
Right. Numpty mode on. What's a theoretical guess, (username, id), for a standard setup, then? The last two answers completely befuddled me.
Just realised I have no idea what the output of the lookup would look like, , 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.
Matt
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.
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
Using a Postgres DB by any chance?
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?
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?
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.
PunBB Forums → Posts by MattF
Powered by PunBB, supported by Informer Technologies, Inc.