[ hide ] Hack Resurrection v1.02 ..!!!!! - TurkishNuke
PHP Nuke - Themes - Modules - Blocks - Addons - Turkish Nuke: Forumlar

Turkish Nuke ~ Başlığı Görüntüle - [ hide ] Hack Resurrection v1.02 ..!!!!!

Sorularınızı sorarken başlıkta "Acil, yardım, biri yardım etsin, bir bakın, çözümü nedir?, yardım edecek yok mu?" gibi başlıklar kullanmayınız. Başlıklar okuyan kişilere mesaj içeriği ile ilgili bilgi vermesi için var. Ve bilgi vermeyen başlık yöneticiler tarafından kilitlenebilir, silinebilir, değiştirilebilir.

 

Turkish Nuke Forum Ana Sayfası -> vBulletin -> Eklentiler -> [ hide ] Hack Resurrection v1.02 ..!!!!!
AhmetPasha
MesajTarih: Sal Tem 05, 2005 8:36 pm 
[, hide, ], Hack, Resurrection, v1.02, ..!!!!!, [ hide ] Hack Resurrection v1.02 ..!!!!!,
Alıntıyla Cevap Ver
   
Site Admin
Site Admin


Kayıt: Jan 28, 2005
Mesajlar: 1707
Nerden: İstanbul/Avcılar


Hide 'yi bilmeyeniniz yoktur diye tahmin ediyorum. Fakat bu yeni versiyonda biraz farklılık var. Mesajı gizlediniz; üyenin o mesajı görebilmesi için sadece cevap yazması yeterli değil, belirleyeceğiniz bir sayıda, üyenin mesaj sayısına göre izin veriliyor....

Kullanılışı şu şekilde :
Kod:

[hide=30]mesajınız[/hide]

Burada 30'un anlamı şudur; üye bu konuya cevap yazsa bile, forumda en az 30 mesajı yoksa, gizli metni gene göremez.... Tabi 30 yerine istediğiniz değeri verebilirsiniz... Şimdi kuralım.....

Not : php dosyaları üzerinde değişiklik yapmadan önce, her ihtimale karşı yedeklerini alın..!!!!

includes/functions.php 'yi açın. Dosyadaki en son ?>, kodunun önüne şunları ekleyin;
Kod:

// ###################### Start parseHide #######################
function parseHide($text) {

    // #########################################################################################
    // ### CONFIGURATION
    // #########################################################################################

    // ### Do not set for 0, otherwise it will make no sense using this tag ###
    // ### What should [HIDE] without number of posts assumed as? ###
    $hidetag['default_posts_to_view'] = 5;

    // #########################################################################################
    // ### END CONFIGURATION
    // #########################################################################################

    // ### apply the default value. user preg-replace since it is case-insensitive ###

    $text = preg_replace("/\[hide\]/siU", "[hide=".$hidetag['default_posts_to_view']."]", $text);

    // ### apply the parser ###

    $text = preg_replace_callback("/\[hide=([0-9]*)\](.*)\[\/hide\]/siU",
        create_function(
            '$matches',
            'return parseHide2($matches[1],$matches[2]);'
        ),
        $text);

    // ### return parsed text to original caller variable ###

    return $text;
}

function parseHide2($postsrequired,$text) {
    global $bbuserinfo,$thread;

    $bbuserinfo[posts] = intval($bbuserinfo[posts]);

    // #########################################################################################
    // ### CONFIGURATION                                                                     ###
    // ### NOTE: Specify both bbcode & html versions - they'll be required for some scripts  ###
    // #########################################################################################

    // ### specifies scripts to use html version - just for compatibility's sake ###
    $hidetag['htmlscripts'] = array('showthread', 'showpost');
    // ### choose color to be applied to hidden text ###
    $hidetag['color'] = "blue";

    // ### text to be returned when user is an admin, supermoderator or moderator of a given forum ###
    $hidetag['admin_view_html'] = "<font color='".$hidetag['color']."'><b>Hidden Content ($postsrequired posts are required, you have ".$bbuserinfo['posts']."):</b><br />".$text."</font>";
    $hidetag['admin_view_bbcode'] = "[color=".$hidetag['color']."][b]Hidden Content ($postsrequired posts are required, you have ".$bbuserinfo['posts']."):[/b]\n".$text."[/color]";

    // ### text to be returned when user is a regular user and has enough posts ###
    $hidetag['user_view_html'] = "<font color='".$hidetag['color']."'><b>Hidden Content ($postsrequired posts are required, you have ".$bbuserinfo['posts']."):</b><br />".$text."</font>";
    $hidetag['user_view_bbcode'] = "[color=".$hidetag['color']."][b]Hidden Content ($postsrequired posts are required, you have ".$bbuserinfo['posts']."):[/b]\n".$text."[/color]";

    // ### text to be returned when user is a regular user and does NOT have enough posts ###
    $hidetag['user_deny_html'] = "<font color='".$hidetag['color']."'><b>Hidden Content ($postsrequired posts are required, you only have ".$bbuserinfo['posts'].")</b></font>";
    $hidetag['user_deny_bbcode'] = "[color=".$hidetag['color']."][b]Hidden Content ($postsrequired posts are required, you only have ".$bbuserinfo['posts'].")[/b][/color]";

    // ### text to be returned when user is a guest ###
    $hidetag['guest_deny_html'] = "<font color='".$hidetag['color']."'><b>Hidden Content (you need to be registered ".iif($postsrequired > 0, "and have $postsrequired posts", "")." to see it)</b></font>";
    $hidetag['guest_deny_bbcode'] = "[color=".$hidetag['color']."][b]Hidden Content (you need to be registered ".iif($postsrequired > 0, "and have $postsrequired posts", "")." to see it)[/b][/color]";

    // #########################################################################################
    // ### END OF CONFIGURATION                                                              ###
    // #########################################################################################

    if ($bbuserinfo[userid] == 0) {
        $text = iif(in_array(THIS_SCRIPT, $hidetag['htmlscripts']), $hidetag['guest_deny_html'], $hidetag['guest_deny_bbcode']);
    } elseif (in_array($bbuserinfo[usergroupid], array(5,6)) OR (can_moderate($thread['forumid']) AND THIS_SCRIPT == 'showthread')) {
        $text = iif(in_array(THIS_SCRIPT, $hidetag['htmlscripts']), $hidetag['admin_view_html'], $hidetag['admin_view_bbcode']);     
    } elseif ($bbuserinfo[posts] >= $postsrequired) {
        $text = iif(in_array(THIS_SCRIPT, $hidetag['htmlscripts']), $hidetag['user_view_html'], $hidetag['user_view_bbcode']);
    } else {
        $text = iif(in_array(THIS_SCRIPT, $hidetag['htmlscripts']), $hidetag['user_deny_html'], $hidetag['user_deny_bbcode']);
    }

    // ### return parsed text to parseHide() ###
    return $text;
}

// ###################### Start stripHide #######################
// strips hidden content from where it should not be shown
// ##############################################################

function stripHide($text,$where='') {

    // #########################################################################################
    // ### CONFIGURATION
    // #########################################################################################

    $hidetag['editor_text'] = "[b]You may not quote hidden text[/b]";
    $hidetag['email_text'] = "(there is a hidden text in this post - please visit the thread to see it if you have \\1 posts, or if you are an admin or a moderator)";

    // #########################################################################################
    // ### END OF CONFIGURATION
    // #########################################################################################

    if ($where == 'editor') {
        $replacement = $hidetag['editor_text'];
    } else {
        $replacement = $hidetag['email_text'];
    }

    $text = preg_replace("/\[hide\](.*)\[\/hide\]/siU", $replacement, $text);
    $text = preg_replace("/\[hide=([0-9]*)\](.*)\[\/hide\]/siU", $replacement, $text);

    return $text;
}

Dosyayı kaydedip upload edin.

archive/index.php 'yi açın. Alttaki komut satırını bulun;
Kod:

$post['pagetext'] = strip_bbcode($post['pagetext']);

Üst kısmına şunu ekleyin;
Kod:

$post['pagetext'] = parseHide($post['pagetext']);

Dosyayı kaydedip upload edin.

functions/functions_digest.php 'yi açın. Alttaki kod satırını bulun;
Kod:

$post['pagetext'] = unhtmlspecialchars(strip_bbcode($post['pagetext']));

Üst kısmına şunu ekleyin;
Kod:

$post['pagetext'] = stripHide($post['pagetext']);

Dosyayı kaydedip upload edin.

functions/functions_forumdisplay.php 'yi açın. Alttaki kısmı bulun;
Kod:

$thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($thread['preview'], false, true), $vboptions['threadpreview']));

Bunun üst kısmına şunu ekleyin;
Kod:

$thread['preview'] = parseHide($thread['preview']);

Dosyayı keydedip upload edin.

functions/functions_newpost.php 'yi açın. Alttaki satırı bulun;
Kod:

$previewmessage = parse_bbcode($newpost['message'], $foruminfo['forumid'], iif($newpost['disablesmilies'], 0, 1));

Bunu şununla değiştirin;
Kod:

$previewmessage = parseHide($newpost['message']);
    $previewmessage = parse_bbcode($previewmessage, $foruminfo['forumid'], iif($newpost['disablesmilies'], 0, 1));

Sonra şu satırı bulun;
Kod:

// strip bbcode and quotes from notification text

Altına şunu ekleyin;
Kod:

$pagetext = stripHide($pagetext);

Dosyayı kaydedip upload edin.

functions/functions_showthread.php 'yi açın. Alttaki kısmı bulun;
Kod:

$post['message'] = parse_bbcode($post['pagetext'], 'announcement', $post['allowsmilies']);

Ve şununla değiştirin;
Kod:

$post['message'] = parseHide($post['pagetext']);
            $post['message'] = parse_bbcode($post['message'], 'announcement', $post['allowsmilies']);

Sonra şunu bulun;
Kod:

$post['message'] = &$post['pagetext_html'];
                }

Altına şunu ekleyin;
Kod:

$post['message'] = parseHide($post['message']);

Sonra şunu bulun;
Kod:

$post['message'] = parse_bbcode($post['pagetext'], $forum['forumid'], $post['allowsmilie']);

Altına şunu ekleyin;
Kod:

$post['message'] = parseHide($post['message']);

Dosyayı kaydedip upload edin.

functions/newreply.php 'yi açın. Alttaki kısmı bulun;
Kod:

$newpost['message'] = "$quotemessage $newpost[message]";

Bunun üstüne şunu ekleyin;
Kod:

$quotemessage = stripHide($quotemessage, 'editor');

Sonra şu kısmı bulun;
Kod:

if ($_REQUEST['do'] == 'newreply')
{

    // falls down from preview post and has already been sent through htmlspecialchars() in build_new_post()
    $title = $newpost['title'];

Altına şunu ekleyin;
Kod:

if (!isset($_POST['submit']) AND !isset($_POST['preview'])) {
        $newpost['message'] = stripHide($newpost['message'], 'editor');
    }

Daha sonra şu satırı bulun;
Kod:

$currentpage = urlencode("newreply.php?do=newreply&p=$postinfo[postid]&noquote=" . intval($_REQUEST['noquote']));

Üstüne şunu ekleyin;
Kod:

$threadreviewbits = parseHide($threadreviewbits);

Dosyayı kaydedip upload edin.

search.php 'yi açın. Alttaki kısmı bulun;
Kod:

$post['pagetext'] = preg_replace('#\[quote(=(&quot;|"|\'|)??.*\\2)?\](((?>[^\[]*?|(?R)|.))*)\[/quote\]#siUe', "process_quote_removal('\\3', \$display['highlight'])", $post['pagetext']);

Bunun üstüne şunu ekleyin
Kod:

$post['pagetext'] = parseHide($post['pagetext']);

Dosyayı kaydedip upload edin.

showthread_quickreply ve editor_toolbar_standard isimli templatelerde her ikisinde de alttaki değişikliği yapın;

Alttaki kısmı bulun;
Kod:

<td><div class="imagebutton"><a href="#" onclick="return vbcode('U', '')" accesskey="u"><img class="image" src="$stylevar[imgdir_editor]/underline.gif" alt="$vbphrase[underline]" width="21" height="20" border="0" /></a></div></td>

Ve altına şunu ekleyin;
Kod:

<td><img src="$stylevar[imgdir_editor]/separator.gif" alt="" width="6" height="20" border="0" /></td>
            <td><div class="imagebutton"><a href="#" onclick="return vbcode('HIDE', '')" accesskey="h"><img class="image" src="$stylevar[imgdir_editor]/hide.gif" alt="$vbphrase[underline]" width="41" height="20" border="0" /></a></div></td>

Değişiklikler bukadar.. En son olarak eklentideki gif dosyasını; forum dizini/images/editor klasörüne upload edin... Bukadar....
http://www.turkishnuke.net/forum_img/hide.rar
Hazırlayan:organik81
 
Başa dön
Kullanıcı profilini gör Özel mesaj gönder Kullanıcının web sitesini ziyaret et MSN Messenger
Mesajları göster:   
Tüm saatler GMT +2 Saat

Sonraki başlık
Önceki başlık
1. sayfa (Toplam 1 sayfa)
Turkish Nuke Forum Ana Sayfası  ~  Eklentiler

Yeni Başlık Gönder   Cevap Gönder


 
Forum Seçin:  

Bu forumda yeni konular açamazsınız
Bu forumdaki mesajlara cevap veremezsiniz
Bu forumdaki mesajlarınızı değiştiremezsiniz
Bu forumdaki mesajlarınızı silemezsiniz
Bu forumdaki anketlerde oy kullanamazsınız

Copyright © Haziran 2005, TurkishNuke ™ Her hakkı saklıdır.
Web sitemizin PHP-Nuke tabanlıdır.

Bu site en iyi 1024x768 ve üzeri çözünürlüklerde, İnternet Explorer ve Firefox ile görüntülenir.
 

stories | temizlik | Kırcaali

AktifPHP!