1,176

(4 replies, posted in Programming)

Just another quickie. big_smile Is the following a valid, (and safe), way to check if a ftp server is accepting or denying connections?

if (($handle = @fopen('ftp://anonymous:none@'.$uri, 'r')) !== false)
{
        echo 'Success'."\n";
        fclose($handle);
}

Cheers.

Matt

It's hardly surprising your layout is screwed:

http://validator.w3.org/check?uri=http% … mp;group=0

matt1298 wrote:

I know something that other forums do is alt (or something) so when you hover ove it it will say the first 20 words or so.. But i think i read somewhere about a disabilty for it..

Title, I believe. big_smile It's a dog for screen readers, apparently.

1,179

(6 replies, posted in General discussion)

Find this line just above the config entries near the bottom of the install file:

$db->query('INSERT INTO '.$db_prefix."users (group_id, username, password, email, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, '".$db->escape($username)."', '".pun_hash($password1)."', '$email', 1, ".$now.", ".$now.", '127.0.0.1', ".$now.')')

and change to:

$db->query('INSERT INTO '.$db_prefix."users (group_id, username, password, email, num_posts, last_post, registered, registration_ip, use_avatar, last_visit) VALUES(1, '".$db->escape($username)."', '".pun_hash($password1)."', '$email', 1, ".$now.", ".$now.", '127.0.0.1', 1, ".$now.')')
hurry wrote:

Dynamically update? That's not a cache, that's how things already work.

WP Cache does dynamically change only the WordPress new or edited posts or comments and again adds them to the cache.

I understand what you mean, but what I'm referring to is the fact of: how does it update the cached data? By connecting to the db and updating the cache. So in theory, you are swapping a dynamically generated page for a dynamically updated cached page. As you can guess, the difference there would be, db wise?

Caching is designed to take the load off PHP itself, not the db. If you try to achieve both, you'll end up with an outdated cache.

raymond wrote:

So I ask my webhost to do the PRT changes and it worked now smile

PTR. big_smile If you think you may have any uncertainty with DNS in the future, the best course is to just use the I.P address of the smtp server.

hurry wrote:

If the cache can dynamically update the topic which has changed

Dynamically update? That's not a cache, that's how things already work. Caching the forum doesn't work. Been there, tried it, binned it.

StevenBullen wrote:

And... er... is there anyway of stopping it. tongue

Nope. Not unless you figure out what methodology the likes of Google/MSN/Hotmail, (and you'll be the first if you do), big_smile use for weighting/blocking mail.

Must admit, I'd never noticed the error function had been used. big_smile

1,185

(27 replies, posted in PunBB 1.2 troubleshooting)

Post your viewtopic.php? file up on here.

1,186

(27 replies, posted in PunBB 1.2 troubleshooting)

Look at post number three.

1,187

(7 replies, posted in PunBB 1.2 discussion)

Meowmeow wrote:

I really DON'T like this motto at all.

'Twas funny though. big_smile

1,188

(30 replies, posted in PunBB 1.2 discussion)

Corsario wrote:

Now... the forum translations...?

In that thread link I posted, use that iconv command mentioned in there on the language files, to convert those. smile

1,189

(30 replies, posted in PunBB 1.2 discussion)

I don't think that's anything related to the character set type. smile Smartys or Elbekko are better placed to answer this one. smile

1,190

(30 replies, posted in PunBB 1.2 discussion)

Can you check all the tables in your db admin interface and make sure the encoding is correct, (utf8_general_ci) on all of them?

1,191

(30 replies, posted in PunBB 1.2 discussion)

Corsario wrote:

Ok, I'm going to set all to UTF-8, but I set that because in that way, the translations of the forum works great... and the forum doesn't seens so bad...

Good. smile Once you have everything set as UTF-8, then we can try and help on any specific problems. The way you have it set at the moment though is probably creating as many problems. The system/clients will be schizophrenic. big_smile

1,192

(30 replies, posted in PunBB 1.2 discussion)

Corsario wrote:

As I said in the second message, now is like the 1st case, like generic: iso with the translations ok but the posts...

Why? There is absolutely no point whatsoever to you doing that. You run one or the other. Not both. Set *EVERYTHING* as UTF-8 or ISO_8559-1. Then, and only then, start trying to trace problems, (if by that point they even exist). All headers and everything else should be set to UTF-8 in your case.

1,193

(30 replies, posted in PunBB 1.2 discussion)

Just had another look. You have a mismatch. Your main index page is specifying utf-8 encoding. Your forums index is not, however:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Nice. smile Two things I would suggest, however.

1) Strip any non alphanumeric characters out of the filename and replace them with underscores or hyphens. Non Windoze systems use a lot of characters, the ampersand and quote are two, for special purposes.

2) Enclose the filename, where it is echoed/printed, in pun_htmlspecialchars, i.e:

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))
{
            $message= 'The file '.pun_htmlspecialchars($_FILES['uploadedfile']['name']).' has been uploaded';

I don't think you need basename on that. PHP should only supply the filename itself. Although, you'll probably have a different var name there anyhow if you strip the non-alpha characters. big_smile

1,195

(30 replies, posted in PunBB 1.2 discussion)

Those appear fine for any content added from now onwards. However, did you install initially using the iso-8859 charset, or utf-8? If it was setup as iso, and any data entered then, it would still be iso encoded, so that original data would need converting. Have you entered a test thread using Spanish characters since the settings have been set to utf-8, to see whether those are being stored correctly?

1,196

(5 replies, posted in PunBB 1.2 show off)

Actually, for a light theme, (which I usually dislike as a rule), I'd agree with Steven. Straight forward enough to look at.

1,197

(30 replies, posted in PunBB 1.2 discussion)

Corsario wrote:

That is the 2º case...

Honestly can't say, then. Everything that needs altering should have been covered by that, so I personally have no idea where your problem may lie, although according to the W3C validator, something is amiss:

http://validator.w3.org/check?uri=http% … mp;group=0

The actual content of the db has been converted to UTF-8, I presume?

If you're putting it within a html section, you need to enclose it within php tags, i.e:

<?php
if ($pun_user['g_id'] == PUN_GUEST)
{
     error($lang_common['No permission']);
}
?>

1,199

(30 replies, posted in PunBB 1.2 discussion)

Have a read through this thread and check everything has been set/altered.

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

1,200

(0 replies, posted in General discussion)

Well, I finally got around to writing proper parser rules for MP3 and Flash video, (.flv), playback, in conjunction wth the use of this player: http://www.jeroenwijering.com/?item=JW_Media_Player

Here are the links for the MP3 and vid test threads:

http://forums.bauchan.org/testforum/viewtopic.php?id=5
http://forums.bauchan.org/testforum/viewtopic.php?id=4


How does it look?