Jump to content


Member Since 29 Dec 2005
OFFLINE Last Active Today, 15:13

Posts I've Made

In Topic: Bootstrap 3 in 2.3.4 - Responsive from the Get Go

Today, 15:08

Regarding equal height: Maybe I'm a little bit naive, but shouldn't have the space for images and products names have some predefined heights? You might have pictures of different height an also long product names which need a second line, well I couldn't help myself without doing the ultimate evil - changing core files - ad wrapped around a css class for  both of them.
I wanted for grid view: Equal height space for images, orientated to the bottom in that space,

Just a random thought on this... back in ye olden times, before CSS usage was widespread, people used tables to lay out their pages. Now, I'm not arguing that we should return to the days of table hell, with tables within tables within tables -- CSS is much better for layout purposes. However, tables are a legitimate way to lay out data in a grid, and cells in a row are automatically equal height. The downside is that I don't know how to change the number of cells in a row when the display width changes, so responsive design is difficult, if not impossible, with a table. Something would have to be done in Javascript to restructure the table, based on display width. Has anyone seen such a thing? I suppose you could send several different tables to the browser, and have one selected based on display width, but that seems rather inefficient. With adaptive design, that's easy (to generate a different table on the server, in the first place).

In Topic: spambot hitting my website through my email signup form

Today, 14:45

Indeed, it's a good question: what are they trying to accomplish? I could see making mailing requests to a few selected target emails, in order to swamp (attack) them, or making all sorts of requests to attack you by burying your server under a landslide of outgoing emails, but that seems a lot harder than a normal DoS/DDoS attack. Anyway, to avoid legal and/or SPAM blacklisting trouble for you, your newsletter should always include "You are receiving this because you (or someone pretending to be you) signed you up for it", and give an easy way to get off the mailing list.


Some sort of CAPTCHA is a good idea, to at least weed out most of the bots. The graphical ones (letters + noise) don't work all that well any more, and mostly just annoy legitimate users. Jack or Gary had a nice math-based CAPTCHA that I modified to use on my Contact page. As I said at the time, it may become less effective as it comes into more common use, and spammers start writing bots that understand how to deal with it, but so far, so good.

In Topic: Apostrophe's in Shipping & Returns

Today, 00:04

As instructions in the file remind you (or maybe they're just in other, similar files, and missing from this one), the entire content of a "define" is enclosed in single quotes '. Any ' appearing within this content needs to be escaped: \' so it doesn't end the string early.

In Topic: Need help to put purchased SSL certificate on my website

Yesterday, 14:22

The actual installation of an SSL certificate is normally something that your host does (usually for a small fee). They have to update their system anyway, to point https requests to your cert. So, you should start by contacting your host. I hope the cert you purchased is compatible with their system so you didn't waste your money.

In Topic: Inline PHP in category description?

19 April 2017 - 12:41

Well, yes it should be possible to do something like that, but not easily. The most general case would be to allow embedding of PHP within the HTML of your text (out of the database). This would require that whatever is handling the category description text to look for "<?php", extract that part of the text, do some sort of "eval()" on it, and insert the resulting text back into the HTML text for output to the browser. Note that a browser is expecting pure HTML... it has no idea what to do with PHP code. Also note that you have to be very careful to do this only with trusted sources -- imagine what a hacker could do if they could insert PHP into a product review or something!


A more limited approach would be to modify the category description (or whatever) code to drop your code permanently into the middle of the PHP, and then the normal HTML text from the database is placed before, after, or around the output of your custom code. Either approach would still be vulnerable to being wiped out by updates to the osC code, especially if you're messing around in "core" code.