Show BBCode content to guests

Started by emanuele, February 11, 2011, 11:55:19 AM

Previous topic - Next topic

emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

sangham.net


moal

#42
Hello together,

I 've been using for 1year the cb | GeSHi -mod. Now I have also installed the "Show BBCode content to guests"-modification. http://custom.simplemachines.org/mods/index.php?mod=2861
I think it is a very useful modification , thank you for that.

It works for images with no problems. Instead picture the warning message appears .
For code, it only works if I use the normal code container by SMF. Then a code container appears , in which instead code the warning message is displayed.

Do I use the cb | GeSHi -mod the code container is apparently not recognized as such. And there where the code should be container only appears a <
I suspect that is because the SMF code container is opened with [code] and of cb | GeSHi -mod with [code = language ]

Is there any way to use both together ?
I would appreciate the help very much.

Many thanks and best regards
moal


Sorry, incidentally, I do not speak English and therefore use the Google translator.

emanuele

For the way the GeSHi mod is coded, it's not possible to have something really nice without an "exception", but I don't like exceptions and unfortunately at the moment I'm a bit short of time, so I can't have a look at it.
The fastest way is to replace:
$code['validate'] = create_function('&$tag, &$data, $disabled', '
$data = \'' . $warning_text . '\';
');

with:

$code['validate'] = create_function('&$tag, &$data, $disabled', '
if (is_array($data))
$data[0] =\'' . $warning_text . '\';
else
$data = \'' . $warning_text . '\';
');

in Subs-ShowBBCodeToGuests.php.
It's not nice, but it works.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

moal

Danke, das hilft mir weiter...  :laugh:

-Captain Ghost-

Hello,
First of all great mod no problem with it's functioning but is there anyway by which it can show an image instead of text that "sorry guest ..... Please Login or register"

thanks,  :)

Advertisement: