251

(4 replies, posted in Programming)

It's CDATA escaped. That's the whole point of the enclosure. It's no longer treated as HTML, merely text.

252

(17 replies, posted in PunBB 1.3 discussion)

esupergood wrote:

Sounds fun.
I might have to upgrade my server for more hard disk space if I install it though!
It would be good if there was a maximum file size or perhaps the system could resize/optimise each uploaded photos. With all the 10MP cameras about these days, file sizes are getting too big for web use

Code from my resizing function:

function image_resize($input, $width, $height, $delete = false)
{
        list($currwidth, $currheight, $type) = @getimagesize($input);

        if (empty($currwidth) || empty($currheight) || $type > '3')
        {
                return false;
        }

        $ratio = $currwidth/$currheight;

        if ($currwidth < $width && $currheight < $height)
        {
                if (file_exists($input))
                {
                        return $input;
                }
                else
                {
                        return false;
                }
        }
        else
        {
                $output = $input.time();

                if ($width/$height > $ratio)
                {
                        $width = $height*$ratio;
                }
                else
                {
                        $height = $width/$ratio;
                }

                $zwidth = $width;
                $zheight = $height;

                $dimg = imagecreatetruecolor($zwidth, $zheight);

                if ($type == '1')
                {
                        $simg = imagecreatefromgif($input);
                        imagecopyresampled($dimg, $simg, 0, 0, 0, 0, $zwidth, $zheight, $currwidth, $currheight);
                        imagegif($dimg, $output);
                }
                else if ($type == '2')
                {
                        $simg = imagecreatefromjpeg($input);
                        imagecopyresampled($dimg, $simg, 0, 0, 0, 0, $zwidth, $zheight, $currwidth, $currheight);
                        imagejpeg($dimg, $output, 85);
                }
                else if ($type == '3')
                {
                        $simg = imagecreatefrompng($input);
                        imagecopyresampled($dimg, $simg, 0, 0, 0, 0, $zwidth, $zheight, $currwidth, $currheight);
                        imagepng($dimg, $output);
                }

                @imagedestroy($dimg);
                @imagedestroy($simg);

                if (file_exists($output))
                {
                        if ($delete)
                        {
                                unlink($input);
                        }
                        return $output;
                }
                else
                {
                        return false;
                }
        }
}

I just had to Google to find out what that means. big_smile

I'll just add, btw, the part quoted below had an errant 'only' in it that shouldn't be there. Only just noticed my typo. big_smile

which updates prev_url to only ignore certain pages


whatrevolution wrote:

Yes, though a whitelist could become long and be laborious to compile.  A simple first sollution could be a preg_match() check for file extension (disallow images, .css, .xml)

True. Those shouldn't be directly accessed URI's from the prev_url viewpoint, however, (other than .xml) so they theoretically shouldn't be a problem. Never hurts to be overly draconian  though. big_smile

Another possibility would be having a define which could be set in pages which aren't to be logged, similar to the quiet_visit define in 1.2*, and only updating if that isn't defined. (Is that still used in 1.3)? That would give extension authors more control too regarding whether their pages update the online list.

whatrevolution wrote:

In this case, you just might have reset the page redirect url in your cookie, thus you are sent there.  Is it possible that Firefox is causing this same event, by pinging for updates to your forum RSS?

That's pretty much what I still think is causing the issue. A lot of it could be negated however by altering the function which updates prev_url to only ignore certain pages when updating the DB online entry.

KeyDog wrote:

where did you download them?
which section?
don't sound like they're made for 1.3.2 !

This is the 1.2* section. smile They'll have been downloaded from PunRes.

257

(5 replies, posted in PunBB 1.3 troubleshooting)

colak wrote:

you can use htaccess

Order Deny,Allow
Deny from 89.41.71.234
Allow from all

The O.P shouldn't need to resort to that however if things are working as they should. Banning an I.P should ban an I.P. Nothing more or less.

KeyDog wrote:

any news on porting it?

You don't port it. You merely include it in whatever code you use for the display to access its functions.

Cereal wrote:
$query = array(
                'INSERT'        => 'txt, author',
                'INTO'          => 'forum_qq',
                'VALUES'        => '\''.$_POST['txt'].'\', \''.$_POST['author'].'\''
        );

Not specifically related to you alone, but more of a general comment for which you are included. smile

Will you people please start sanitising your code. There isn't a $forum_db->escape in sight there, and I'm assuming from that omission that little else input sanitisation and verification is done either. Code correctly from the start.

260

(24 replies, posted in General discussion)

KeyDog wrote:

I was wondering about those statistics. Kind of give the impression they catch everything and competitors don't catch X'XXX.

Yeah. Those statistics they've posted seem mostly to be compared to specialised scanners though, so obviously they will only detect what they are designed for. Plus, they don't give the reverse figures of what they miss which other products catch. Those figures are purely marketing hype.


They all say in their installation options not to run others alongside I thought? Some don't even let you install if they've detected certain other known products.(McAfee?)

Not if you run the decent products they won't. I wouldn't touch Norton/McAfee with a bargepole, (or anyone elses for that matter). big_smile Anti-virus wise, ClamAV/ClamWin is a nice cross platform option. Spyware, there are plenty of options for.

261

(24 replies, posted in General discussion)

There is no best option per se. Your best option is to run several products alongside each other. Relying upon one alone will always miss something. That one you've posted the link to seems to be a general cover everything type programme, (with misleading statistics, might I add). I'd personally suggest running tools which are designed for each specific area. They tend to be far better in their specific field.

KeyDog wrote:

once again v. helpful.

What were you expecting? There is no bot orientated deterrent on a plain install. What do you expect to happen? If you are going to ask stupid questions and post sarcastic responses at the obvious answer, don't ask the stupid question to start with.

They aren't exploiting anything. They are merely submitting a registration.

264

(11 replies, posted in PunBB 1.3 discussion)

Utchin wrote:

On a side note, As far as I am aware, the developers should have been back. However. They arnt.

Anatoly was online within the last couple of days or so, I believe.

265

(9 replies, posted in PunBB 1.3 extensions)

Nice. Good to see you are keeping it upto date. smile

266

(23 replies, posted in PunBB 1.3 extensions)

That's better. smile At the end of the day, for a standard information box, (or whatever other use it may find), all that's needed is some container which can have raw HTML entered into it. The options are then open as to exactly what it is used for. Unless the specific requirement is, for example, it to appear after the first post only in the display, any other page placement can be accomodated by CSS and template placement.

267

(23 replies, posted in PunBB 1.3 extensions)

KeyDog wrote:

if you can help on that front : post
if you can't : save space and don't waste their time

However, I'm momentarily bored and you're talking crap to justify your opinion. Btw, that quote above applies all ways. smile

268

(11 replies, posted in PunBB 1.3 discussion)

Garciat wrote:

You can't.

Yet. big_smile I'd guess the feature may be implemented at some point via an extension.

269

(23 replies, posted in PunBB 1.3 extensions)

KeyDog wrote:

if unicef or wwf or greenpeace or XXX wants to run ads on my site. then what's bad about that? they are benefiting humanity... mostly

ads can be run at no cost - it's not about making money.

anyway the discussion isn't about should 100% of pun forums run ads - we're talking about extensions and if enough people want them they should all be able to say that they'd like such an extension.

no one said pun devs have to spend time on it - or you. but don't stand in the way of those that need/want it. my opinion.

If you wish to keep a topic on path to discussing specifics of implementation and usability, then don't start romanticising on the subject, i.e:


KeyDog wrote:

sometimes people will have this need. by attracting users admins who do ads you're enlarging the userbase and ultimately enlarging the community and speed of responses and coding.

That is totally irrelevant to the point of a feature request. It's romanticising to try and justify your viewpoint. Nothing more. So, if you wish others to stay on subject, don't post claptrap. I've yet to see how an advertisement will improve the timeframe for completion of a job by any coders.

270

(23 replies, posted in PunBB 1.3 extensions)

KeyDog wrote:

people associate the word ad with bad things

call it : fancy notices - images and flash objects embedded across your site....

That second sentence is supposed to contradict the first sentence? You have an unusual idea of what's acceptable.


KeyDog wrote:

there's a market for the extension that is considerable

whoever makes it will probably benefit no end....

Benefit from it how, might one ask?

271

(23 replies, posted in PunBB 1.3 extensions)

Abbas wrote:

Tasteful ad's running on the side perhaps, moving with the scrolls.

There is no such thing as a tasteful advert. They are an annoyance at best.

272

(23 replies, posted in PunBB 1.3 extensions)

Garciat wrote:

Sorry, but I don't support ads.

Top man. Glad to see some sanity around. smile

273

(32 replies, posted in PunBB 1.3 extensions)

KeyDog wrote:

what format do you suggest?

Provided you can see all the same information and access the downloads, specifics are fairly irrelevant. Your coding abilities will dictate that more than anything else. smile

274

(3 replies, posted in Discussions)

There's a good possibility it was this one:

http://www.punbb-hosting.com/

275

(32 replies, posted in PunBB 1.3 extensions)

The appearance and general functioning appear quite nice. smile

It's sod all use if someone has javascript disabled, however. There always has to be a fallback method inplace.