marie b. Posted May 19, 2005 Posted May 19, 2005 I've seen this set up on some blogs while surfing BlogExplosion - a specific welcome message (that isn't there when I view the blog otherwise) containing information on how to navigate the site and contact the author, etc. Well, my problem is a tad more serious than that. One of my friends has a long-running series on his blog wherein he posts semi-naked pictures of women for others' "enjoyment." Some of his readers come to my blog and look through my image folders, obviously under the impression that I'm running some sort of Playboy getup. Instead of banning them outright -- because a lot of his readers are nice people -- I'd rather a welcome message to let them know that they'll be S.O.L if they look for anything pornographic (other than certain textual entries). Anyway, long story short . . . is this possible and, if so, how? Thanks. Quote
TCH-Dick Posted May 19, 2005 Posted May 19, 2005 Just drop an index page into your image directories with a general comment. Quote
marie b. Posted May 20, 2005 Author Posted May 20, 2005 I was actually looking for something that would go on the main index of my blog, as I have some friends who I allow to sift through my image folders and I don't want a broad, all-encompassing page just because of a few morons. I'd rather just have something on the index, as this is where they first arrive at. I've seen it done on other blogs, as I said, but never get a response whenever I include a query in a comment. Quote
Guest Serpentine Posted May 20, 2005 Posted May 20, 2005 So you want a specific message to display depending on where the visitor is coming from? Quote
marie b. Posted May 20, 2005 Author Posted May 20, 2005 Exactly. It seems like it'd be extremely simple, but I can't wrap my head around it. (Exam burnout.) Quote
TCH-Andy Posted May 20, 2005 Posted May 20, 2005 Depending on how familiar you are with PHP you could check on the referrer, and then add a set of text, if they are coming from that site (or even display a different page) Quote
TweezerMan Posted May 20, 2005 Posted May 20, 2005 If your main index page is a PHP page, you definitely could use PHP to do this: ><?php if (strpos($_SERVER['HTTP_REFERER'], 'bad-domain.com') !== false) { echo('No naughty pics here for you!'); } ?> But if your main index page is not a PHP page, I think you'd have to use java script: ><script type="text/javascript"> if (document.referrer.indexOf('bad-domain.com') > 0) { document.write('No naughty pics here for you!'); } </script> Quote
marie b. Posted May 20, 2005 Author Posted May 20, 2005 Oh good lord .. I can't believe I didn't think to do this - especially since I already have something like it in place already. Duur. Thanks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.