1

Topic: Urgent ( ?! ) Replace images by another for GUESTs

I explain ...

I've to plan to do games with photos : I take photos in my town, I'll put a pic like ... :

[img]blablabla.jpg[/img]

and people have to search where the photo was taken : finding it = gift (cinema place, or concert place) : .... but I want ONLY registred users SEE The photo

For NON REGISTRED users, I would like a general pic which invit guest to suscribe to see the pic .... do you understand ?!

If someone could be able to help me ...

2

Re: Urgent ( ?! ) Replace images by another for GUESTs

Rod,

Speaking of images, South Beach New Year's Eve: http://hcgtv.org/2004/12/31,120/

Finally put up all my images, the styling is simple.

Re: Urgent ( ?! ) Replace images by another for GUESTs

PunBB 1.1 or 1.2?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Urgent ( ?! ) Replace images by another for GUESTs

hcgtv wrote:

Speaking of images, South Beach New Year's Eve: http://hcgtv.org/2004/12/31,120/

Are you in any of those photos?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: Urgent ( ?! ) Replace images by another for GUESTs

Rickard wrote:

Are you in any of those photos?

Why yes: http://hcgtv.org/2004/12/31/cimg0011.jpg

6

Re: Urgent ( ?! ) Replace images by another for GUESTs

ou are great !!! smile

but I think you have not understood my request ... sad

for Rickard, I'm waiting the final 1.2 to replace 1.1.5 smile

Re: Urgent ( ?! ) Replace images by another for GUESTs

Nice wig, you must use conditioner smile

Rod wrote:

but I think you have not understood my request ... sad

for Rickard, I'm waiting the final 1.2 to replace 1.1.5 smile

I think I understand what you want to do. You want to hide (or replace) user posted images from guests. Correct?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8 (edited by Frank H 2005-01-04 19:40)

Re: Urgent ( ?! ) Replace images by another for GUESTs

With the attachment mod of mine, you can set guests not allowed to see attachments in that forum, and then attach the pic to the post you want to show the picture in
(and if you want an [ img ] I think you can check the url for the viewed image (I think a GET variable of download=1 is needed) ... haven't tried img with an 'unallowed' image, but I'd guess it will just show up as an broken image)

The mod currently only works for versions up to 1.1.5, and a complete rewrite will happen once 1.2 is released, so it'll take a little while until it's on 1.2.

9

Re: Urgent ( ?! ) Replace images by another for GUESTs

OK ... and Yes Rickard, it's simply THAT.

smile

Re: Urgent ( ?! ) Replace images by another for GUESTs

Ok. Then I ask again, for PunBB 1.1 or 1.2?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

11

Re: Urgent ( ?! ) Replace images by another for GUESTs

As I wrote it before (yesterday, 16:01)

Rod wrote:

ou are great !!! smile

but I think you have not understood my request ... sad

for Rickard, I'm waiting the final 1.2 to replace 1.1.5 smile

So for the moment ... 1.1.5

Re: Urgent ( ?! ) Replace images by another for GUESTs

Try this. Open up include/parser.php and look for:

            if ($cur_user['show_img'] != '0')
                $message = preg_replace('#\[img\]((ht|f)tp://)([^\r\n\t<"]*?)\[/img\]#si', '<img src="$1$3" border="0" align="top" alt="">', $message);

and replace it with:

            if ($cur_user['is_guest'])
                $message = preg_replace('#\[img\]((ht|f)tp://)([^\r\n\t<"]*?)\[/img\]#si', '<img src="yourimage.jpg" border="0" align="top" alt="">', $message);
            else if ($cur_user['show_img'] != '0')
                $message = preg_replace('#\[img\]((ht|f)tp://)([^\r\n\t<"]*?)\[/img\]#si', '<img src="$1$3" border="0" align="top" alt="">', $message);

Edit the the URL to yourimage.jpg.

Please note that the above piece of code appears twice in the 1.1 parser.php, so you'll need to do the replacement in both places.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

13

Re: Urgent ( ?! ) Replace images by another for GUESTs

thanx. thanx. and THANX ! smile

14

Re: Urgent ( ?! ) Replace images by another for GUESTs

I have put your code Rickard ...
http://www.sortons.net/forum/viewtopic.php?id=2643

but in "guest" mode, I still see the picture sad

Re: Urgent ( ?! ) Replace images by another for GUESTs

That's odd. E-mail me (rickard at this domain) your parser.php and I'll have a look.

"Programming is like sex: one mistake and you have to support it for the rest of your life."