phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

FAQFAQ - PIERWSZA POMOC!!  regulaminREGULAMIN  SzukajSZUKAJ  UżytkownicyUżytkownicy  GrupyGrupy  StatystykiStatystyki
RejestracjaRejestracja  ZalogujZaloguj  DownloadDownload  katalog Forów DyskusyjnychKatalog Forów   FAQ Video tutoriale

Poprzedni temat «» Następny temat
[Modification] BBCode spoiler.
Autor Wiadomość
evilmc


Posty: 289
Wysłany: 10-11-2010, 17:35   [Modification] BBCode spoiler.

I have problems with large images that users post on the forum and want to add Spoiler MOD, but not the Spoiler that in quoting like this.

I want to add bbcode like as YouTube, quote button for new topic and new post...

Where can I find this bbcode?

Thanx
_________________
Looptroop - Bandit Queen
Ostatnio zmieniony przez Matteo 11-11-2010, 19:36, w całości zmieniany 1 raz  
 
     
Gadatliwa Kasia 

   
Matteo



Pomógł: 1932 razy
Posty: 5714
Wysłany: 10-11-2010, 21:19   

evilmc napisał/a:
I have problems with large images that users post on the forum
Could you give adress to topic/post with example?
evilmc napisał/a:
I want to add bbcode like as YouTube, quote button for new topic and new post...
You want add a new bbcode tag, like [youtube] ?
_________________
Fora, strony, sklepy internetowe i wiele więcej...
matteo.fcb(at)gmail.com
 
     
evilmc


Posty: 289
Wysłany: 11-11-2010, 16:31   

Matteo napisał/a:
You want add a new bbcode tag, like [youtube] ?

yes! :)
Matteo napisał/a:
Could you give adress to topic/post with example?

example:
http://www.serbian-fm.net...on-vt219,40.htm
_________________
Looptroop - Bandit Queen
 
     
Matteo



Pomógł: 1932 razy
Posty: 5714
Wysłany: 11-11-2010, 16:44   

evilmc napisał/a:
example:
http://www.serbian-fm.net...on-vt219,40.htm
It's normal. When image is large - forum script decrease the image size and after few seconds the view topic looks great.
evilmc napisał/a:
yes! :)
You can install this modification.
_________________
Fora, strony, sklepy internetowe i wiele więcej...
matteo.fcb(at)gmail.com
 
     
Bucu


Pomógł: 487 razy
Posty: 2127
Wysłany: 11-11-2010, 18:20   

Cytat:
You can install this modification.

I do not recommend installing this MOD. If you remove this mod, all posts written when mod was active, will be without bbcodes - there is one solution for them, edit every post and save. If you can wait - i'll try to find some time today, and make spoiler bbcode mod.
_________________
Zanim napiszesz głupi temat, zapoznaj sie z FAQ
Pisanie / Instalacja Modyfikacji / For / CMS , przenoszenie For / CMS / Baz Danych (odpłatnie) - Osoby zainteresowane Proszę o kontakt GG.
Przez GG Pomagam tylko odpłatnie!
 
     
Matteo



Pomógł: 1932 razy
Posty: 5714
Wysłany: 11-11-2010, 18:21   

Bucu napisał/a:
If you remove this mod, all posts written when mod was active, will be without bbcodes - there is one solution for them, edit every post and save.
Yep. It's true.
_________________
Fora, strony, sklepy internetowe i wiele więcej...
matteo.fcb(at)gmail.com
 
     
Bucu


Pomógł: 487 razy
Posty: 2127
Wysłany: 11-11-2010, 18:43   

Kod:
@@@ open includes/bbcode.php and find:
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);

@@@ after add:
$bbcode_tpl['spoiler'] = str_replace('{SPOILER}', '\\1', $bbcode_tpl['spoiler']);

@@@ find:
// [email]user@domain.tld[/email] code..
$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];

@@@ after add:
// spoiler code
$patterns[] = "#\[spoiler\]([^?].*?)\[/spoiler\]#si";
$replacements[] = $bbcode_tpl['spoiler'];

@@@ open templates/*/bbcode.tpl and add in the end of the file:
<!-- BEGIN spoiler -->
<div id="spoilerhead" class="thead">
<b><a href="#">Spoiler</a></b></div>
<div id="spoilercontent">{SPOILER}</div>
<!-- END spoiler -->

@@@ open templates/*/overall_header.tpl and find:
</head>

@@@ before add:
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script>
        $(document).ready(function(){
                $("#spoilercontent").hide();
                $("#spoilerhead").click(function () {
                        if ($("#spoilercontent").is(":hidden")) {
                                $("#spoilercontent").slideDown("slow");
                        } else {
                                $("#spoilercontent").slideUp("slow");
                        }
                });
        });
</script>

@@@  save and close all files


Simple, but works excellent.
_________________
Zanim napiszesz głupi temat, zapoznaj sie z FAQ
Pisanie / Instalacja Modyfikacji / For / CMS , przenoszenie For / CMS / Baz Danych (odpłatnie) - Osoby zainteresowane Proszę o kontakt GG.
Przez GG Pomagam tylko odpłatnie!
 
     
Gadatliwa Kasia 

   
evilmc


Posty: 289
Wysłany: 12-11-2010, 14:22   

Bucu, nice work! It is possible that when I click the ''spoiler'' to me back on TOP forum, that you can do to resolve?

thanx again!

[ Added: 26-10-2011, 01:20 ]
Bucu, I add this your mod on my new forum, and spoiler works only first post, when I add second post spoiler not working, when I click on Spoiler take me back to top...How fix?

[ Added: 19-03-2012, 00:34 ]
Does anyone can test the spoiler, and how to solve the problem?

Bucu napisał/a:
Kod:
@@@ open includes/bbcode.php and find:
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);

@@@ after add:
$bbcode_tpl['spoiler'] = str_replace('{SPOILER}', '\\1', $bbcode_tpl['spoiler']);

@@@ find:
// [email]user@domain.tld[/email] code..
$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];

@@@ after add:
// spoiler code
$patterns[] = "#\[spoiler\]([^?].*?)\[/spoiler\]#si";
$replacements[] = $bbcode_tpl['spoiler'];

@@@ open templates/*/bbcode.tpl and add in the end of the file:
<!-- BEGIN spoiler -->
<div id="spoilerhead" class="thead">
<b><a href="#">Spoiler</a></b></div>
<div id="spoilercontent">{SPOILER}</div>
<!-- END spoiler -->

@@@ open templates/*/overall_header.tpl and find:
</head>

@@@ before add:
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script>
        $(document).ready(function(){
                $("#spoilercontent").hide();
                $("#spoilerhead").click(function () {
                        if ($("#spoilercontent").is(":hidden")) {
                                $("#spoilercontent").slideDown("slow");
                        } else {
                                $("#spoilercontent").slideUp("slow");
                        }
                });
        });
</script>

@@@  save and close all files


Simple, but works excellent.
_________________
Looptroop - Bandit Queen
 
     
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Możesz załączać pliki na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!

Powered by phpBB modified by Przemo © 2003 phpBB
Strona wygenerowana w 0,1 sekundy. Zapytań do SQL: 14
Polecane serwisy

Najlepsze oprogramowanie do prowadzenia sklepu internetowegoNajlepszy program do sklepu firmowany przez Przem'a

Sklep z gadżetami

serwis laptopów

phpbb

Design Cart - Tworzenie sklepu internetowego

iRonin.IT

• Zamów reklamę