Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mati/domains/forum.programosy.pl/public_html/includes/bbcode.php on line 112

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 27

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 28

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 29

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 30

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 31

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 32

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 33

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 35

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 36

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 37

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 38

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 39

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 40

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 41

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 42

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 43

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 44

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 45

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 47

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 48

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 49

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 50

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 51

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 52

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 53

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 54

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 55

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 56

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 80

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 81

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 82

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 83

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 84

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 85

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 86

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 87

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 88

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 89

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 90

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 91

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 92

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 93

Deprecated: Function eregi() is deprecated in /home/mati/domains/forum.programosy.pl/public_html/includes/functions_gfxua.php on line 94

Strict Standards: Non-static method utf_normalizer::nfkc() should not be called statically in /home/mati/domains/forum.programosy.pl/public_html/includes/utf/utf_tools.php on line 1663
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3900: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3902: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3903: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3904: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
wyłączenie reklam ze stron na darmowych serwerach • programosy.pl

  • Ogłoszenie:

wyłączenie reklam ze stron na darmowych serwerach

Poradniki związane z tworzeniem i prowadzeniem stron www.

wyłączenie reklam ze stron na darmowych serwerach

Postprzez Jabol121 28 Lut 2008, 17:20

reklama
W poniższym poradniku postaram się wam przedstawić garść porad dzięki którym będziecie mogli wyłączyć wyświetlanie uciążliwych reklam na stronach postawionych na darmowych serwerach www

Pragnę zaznaczyć, że żaden z użytkowników oraz nikt administracji forum nie ponosi odpowiedzialności za ewentualne szkody spowodowane dokonaniem przedstawionych tu modyfikacji – wszystko robicie na własne ryzyko.

Zabrania się powielania i rozpowszechniania poniższego poradnika w całości lub we fragmentach bez zgody autora. Podczas pisania tego poradnika kierowałem się jedynie własną wiedzą oraz umiejętnościami.



By móc korzystać z dobrodziejstw poniższego poradnika niezbędna jest umiejętność posługiwania się dowolnym klientem FTP, chociażby takim jak Total Commander. Mile widziana jest też choć minimalna znajomość języka HTML. Poradnik jest banalny i raczej nikt nie powinien mieć z nim problemu.

Naszym zadaniem jest wyłączenie reklam wyświetlanych na stronach www. Warto wiedzieć, że wyświetlanie tych reklam jest spowodowane działalnością javascriptów doklejanych do kodu naszych stron www przez specjalne programy działające na serwerach*. By osiągnąć zamierzony cel musimy skupić się na blokadzie wykonywania tych skryptów. Dokonamy tego poprzez odpowiednie zastosowanie komentarzy HTML. Przykładowy kod javascript odpowiedzialny za wyświetlanie reklam wygląda tak:

Kod: Zaznacz wszystko
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-1482806-8"; urchinTracker(); </script>

<script src="/yoyo.pnq" type="text/javascript"></script>

<script src="http://ad.yoyo.pl/advertisements/sticker.js?site_id=745683&amp;site_name=www.aaaz.yoyo.pl" type="text/javascript"></script>


Na nasze szczęście odnalezienie takiego kodu nawet na bardzo rozbudowanych stronach jest bardzo łatwe, ponieważ te skrypty zwykle są doklejane tuż za tagiem <body> otwierającym ciało dokumentu, lub tuż przed </body>, czyli elementem je zamykającym (Wyjątek stanowi np. Prv gdzie javascript jest dodawany powyżej Tagu </head>).

Najłatwiej przedstawia się sprawa dla wyłączenia reklam dla prostych stron www. Posłużymy się tutaj stroną www umieszczoną na serwerze Yoyo. W tym serwisie skrypty zagnieżdżane są nad tagiem zamykającym ciało dokumentu. Tak wygląda strona przed modyfikacją – zawiera brzydki banner na górze:

Image

By zablokować wyświetlanie się tego bannera musimy nieco zmodyfikować kod naszej strony. Modyfikacja polega na tym, że standardowe zakończenie dokumentu:

Kod: Zaznacz wszystko
</body>
</html>


Zastępujemy na:

Kod: Zaznacz wszystko
<!-- </body> -->
</body>
</html>


Jak możecie zauważyć, przed tagiem kończącym ciało dokumentu umieściliśmy ten sam tag pomiędzy znakami komentarza. Dzięki temu trikowi nabieramy programy odpowiedzialne za doklejanie javascriptów, tak, że te skrypty dodawane są do obszaru oznaczonego komentarzem.

Kod: Zaznacz wszystko
<!--
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-1482806-8"; urchinTracker(); </script>

<script src="/yoyo.pnq" type="text/javascript"></script>

<script src="http://ad.yoyo.pl/advertisements/sticker.js?site_id=745683&amp;site_name=www.aaaz.yoyo.pl" type="text/javascript"></script>
</body> -->
</body>
</html>


Zawartość komentarzy nie jest interpretowana przez parser więc te skrypty nie są wykonywane. Reklama nie wyświetla się. Bingo.

Tak wygląda nasza strona po dokonaniu modyfikacji:

Image

Po bannerze ani śladu. Teraz zajmiemy się niemal identycznym przykładem, tyle, że na serwerze ugu doklejającym reklamy poniżej tagu <body>.

Image

Także skrypt powodujący wyświetlanie reklam jest nieco inny:

Kod: Zaznacz wszystko
<noscript></noscript><div><script type="text/javascript" src="http://img.ugu.pl/advert.js"></script></div>


Tym razem składnię:

Kod: Zaznacz wszystko
</head>
<body>


Podmieniamy na:

Kod: Zaznacz wszystko
</head>
<!-- <body> -->
<body>


I znów osiągamy zamierzony cel.

Image

Teraz przed nami nieco trudniejsze zadanie – wyłączymy reklamy na forum (wybrałem phpBB2 ze względu na jego popularność). Tradycyjnie zabawę zaczniemy od Joja :). Tak wygląda nasze forum przed naszymi przeróbkami:

Image

Jak widać tym razem musimy zablokować banner reklamowy (1) ale i wyrzucić niechciane odnośniki ze stopki (2). Pierw zajmiemy się sprawą blokady bannera. W tym celu będziemy musieli wyedytować jeden z plików szablonu forum a dokładnie:

Kod: Zaznacz wszystko
\Templates\Nazwa_Stylu\overall_footer.tpl


Mamy taki kod:

Kod: Zaznacz wszystko

<div align="center"><span class="copyright"><br />{ADMIN_LINK}<br />
<!--
   We request you retain the full copyright notice below including the link to www.phpbb.com.
   This not only gives respect to the large amount of time given freely by the developers
   but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
   reason) retain the full copyright we request you at least leave in place the
   Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse
   to include even this then support on our forums may be affected.

   The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>
      </td>
   </tr>
</table>
</body>
</html>


Teraz podobnie jak w przypadku zwykłej strony www powielamy znak </body> I umieszczamy go pomiędzy znakami komentarza. Banner znikł.

Image

Teraz pobawimy się z napisem dodawanym w stopce forum. By się go pozbyć będziemy musieli wyedytować 2 pliki: Index_body.tpl i podobnie jak poprzednio overall_footer.tpl. Na samym końcu pliku Index_body.tpl dopisujemy znak rozpoczęcia komentarza czyli <!--, natomiast na początku pliku overall_footer dodajemy znak zamknięcia komentarza. -->. Teraz nasze forum wygląda tak:

Image

Znów nam się udało. Teraz wykonamy analogiczny przykład na serwerze Ugu. Na tym serwerze będzie nam łatwiej, gdyż w przeciwieństwie do Yoyo dodawany jest tyko kod powodujący wyświetlanie reklam u góry. By go zablokować musimy tym razem dokonać zmian w pliku:

Kod: Zaznacz wszystko
\templates\Nazwa_Stylu\overall_header.tpl


Jak zapewne się domyślacie modyfikujemy ten plik podobnie do strony www i składnię:

Kod: Zaznacz wszystko
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">


Zamieniamy na:

Kod: Zaznacz wszystko
</head>
<!-- <body> -->
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">


I w efekcie pozostaje nam ładne forum bez żadnych reklam:

Image


Na koniec pokaże wam jak poradzić sobie z zablokowaniem reklam dodawanych do PHP-Fusion zainstalowanego na Yoyo.


Image
Jak widać tym razem do wyeliminowania mamy tylko górny banner reklamowy. By go zlikwidować musimy otworzyć plik footer.php:

Kod: Zaznacz wszystko
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: index.php"); exit; }

render_footer(false);

echo "</body>\n</html>\n";

if (iADMIN) {
   $result = dbquery("DELETE FROM ".$db_prefix."flood_control WHERE flood_timestamp < '".(time()-360)."'");
   $result = dbquery("DELETE FROM ".$db_prefix."thread_notify WHERE notify_datestamp < '".(time()-1209600)."'");
   $result = dbquery("DELETE FROM ".$db_prefix."captcha WHERE captcha_datestamp < '".(time()-360)."'");
   $result = dbquery("DELETE FROM ".$db_prefix."new_users WHERE user_datestamp < '".(time()-86400)."'");
}

mysql_close();

ob_end_flush();
?>


A następnie linię:

Kod: Zaznacz wszystko
echo "</body>\n</html>\n";


Zamienić na:

Kod: Zaznacz wszystko
echo "<!-- </body> --> </body>\n</html>\n";


I znów udało nam się dopiąć swego. Reklamy nie wyświetlają się.

Image

Tradycyjnie teraz zrobimy to samo ze stroną postawioną na serwisie Ugu.
Image

Otwieramy do edycji plik subheader.php i pomiędzy tagami </head> i <body> umieszczamy <!-- <body> -->. Interesujący nas fragment powinien wyglądać następująco:

Kod: Zaznacz wszystko
</head><!-- <body> -->
<body bgcolor='$body_bg' text='$body_text'>\n";


I to już wszystko. Banner został zablokowany.

Image


Tut by Jabol121 dla forum.programosy.pl

Nie udzielam pomocy na PW. Jeśli masz jakieś pytanie lub problem załóż własny temat w dziale Grafika & Webmastering.


* Dokładnie mówiąc do kodu naszej strony nie są doklejane pełne javascripty, lecz jedynie odnośniki powodujące uaktywnienie skryptów znajdujących się na serwerze.
Nigdy nie mów ludziom JAK coś zrobić. Powiedz im CO zrobić, a oni zaskoczą cię pomysłowością.
Awatar użytkownika
Jabol121
 
Posty: 286
Dołączenie: 08 Sie 2006, 21:37
Pochwały: 34



Powróć do Tworzenie stron www

Kto jest na forum

Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 0 gości