Quote:
Originally Posted by mightyb
I just had a look at a few codes and they look quite complected. Partly because you can not determine what format these are in by looking at the code as it looks to be dynamic. I don't quite fancy my members using huge banners etc...
Can i just have it accept adsense and 368x60 banners with affiliate links and nothing else? Thanks a lot!
|
You can never determine how big an image will be, but you can put height="368" width="60" in your image code to force anything they put to be that size. As I said, anything is possible but that would be a super-complicated regex if you wanted either/or and it's not something I have time to work out at the moment I'm afraid.
The Adsense alone regular expression is quite simple (based on my own adsense id, you may need to adjust it), use this:
^ca-pub-[0-9]{16}$
That says the custom field must be
ca-pub- then sixteen numbers between 0 and 9. No more, no less. Change {16} to {15-17} to allow 15 to 17 numbers, and so on.