News:

Wondering if this will always be free?  See why free is better.

Main Menu

do not allow guest to view URLs

Started by Gandalf, February 11, 2005, 03:36:00 PM

Previous topic - Next topic

Gandalf

Quote from: [Unknown] on March 19, 2005, 01:48:16 AM
No, no, you did it backwards.  I meant to replace that with this:

$arr2[] = '\'[URL REMOVED BECAUSE YOU ARE VISITING THE SITE AS A GUEST, PLEASE LOGIN TO SEE THE URLs]\'';

Meaning, both lines should be that.

-[Unknown]
nope that didn't work and now it's not a good idea
compare these two topics (from two version of the forum, same topic)
http://www.siemens-mobiles.org/slash/index.php/topic,1524.0.html
http://www.siemens-mobiles.org/forum/index.php/topic,1657.0.html

see? the images which supposed to have an url, when a guest visit it he must see the image without an url like the above topic, but replacing the code as you said it just replaced both and it don't work also http://www.siemens-mobiles.org/slash/index.php/topic,1255.0.html

but really thanks, i'm sorry to disturbe you again

code used now:

// Find a (named?) URL... [url]www.simplemachines.org[/url] or [url=www.simplemachines.org]SMF[/url]
if(isset($add['[url='])){
$arr1[] = '~\[url=([^\]]+?)\]([^\]]*?\[url(?:=[^\]]+?)?\].+?\[/url\].*?)\[/url\]~ie';
$arr1[] = '~\[url=(.+?)\](.+?)\[/url\]~ie';

if ($context['user']['is_guest'])
{
$arr2[] = '\'[URL REMOVED BECAUSE YOU ARE VISITING THE SITE AS A GUEST, PLEASE LOGIN TO SEE THE URLs]\'';
$arr2[] = '\'[URL REMOVED BECAUSE YOU ARE VISITING THE SITE AS A GUEST, PLEASE LOGIN TO SEE THE URLs]\'';
}
elseif (isset($disabled['url'])){
$arr2[] = 'preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', \'$2\') . \' ($1)\'';
$arr2[] = '\'$2 ($1)\'';
}else{
$arr2[] = '\'<a href="$1" target="_blank">\' . preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', strtr(\'$2\', array(\'@\' => \'&#64;\'))) . \'</a>\'';
$arr2[] = '\'<a href="$1" target="_blank">\' . strtr(\'$2\', array(\'@\' => \'&#64;\')) . \'</a>\'';
}
}
if(isset($add['[url]'])){
$arr1[] = '~\[url\](?:<br />)*(.+?)(?:<br />)*\[/url\]~i';
$arr2[] = $context['user']['is_guest'] ? '[URL REMOVED BECAUSE YOU ARE VISITING THE SITE AS A GUEST, PLEASE LOGIN TO SEE THE URLs]' : (isset($disabled['url']) ? '$1' : '<a href="$1" target="_blank">$1</a>');
}
Siemens-mobiles.org Visit it and you won't regret it :D

Gandalf

man i'm really sorry it's my mistake i just discovered the error now, and i appreciate also if you tell me how to bypass it
in fact that topic is posted with html not with bbcode like this :

<a href="http://www.siemens-mobiles.org/forum/index.php/topic,302.0.html">Available firmware</a>

i'm really sorry it's my mistake, i apologise again

can you give me please the code to bypass html code also if it's possible if not i just disable html and edit this unique post like this

thank you man again
Siemens-mobiles.org Visit it and you won't regret it :D



profile

Does this work for 1.1 RC2?  Anyone?

Gobo

it dosent work for RC2

can someone do a conversion?

this is a really cool feature to have!

Farmacija

Does it work just for picture links or for any kind of urls?
www.farmaceuti.com
www.farmaceuti.com/tekstovi

Gobo

Quote from: Farmacija on June 02, 2006, 05:03:55 AM
Does it work just for picture links or for any kind of urls?

there is a mod available for this now which works with links and linked pictures

check the mod forum

sorry in a bit of a hurry or i would have provided u with a link

sanax

..any recent updates for this code?

metallica48423

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Advertisement: