Mod Guest See Part ( Mİsafirlere Kısmi Mesaj)

Eklentiler ile ilgili gelişmeler. Yeni modlar, güncellemeler.

Mod Guest See Part ( Mİsafirlere Kısmi Mesaj)

İleti CrazYAngeR 06.03.2007, 15:07

Sitenizde dolaşan misafirler mesajın sadece bir kısmını görebilirler.


Kod: Tümünü seç
########################################################
##
## MOD Title:   Guest_See_Part_Message
## MOD Version: 1.0.5
## Author:     Wicher (http://www.detecties.com/phpbb2018)
##
## Description:
##    Displays only a part of a full posting if the user is a guest.
##
##
## Installation Level:  easy
## Installation Time:  1 minutes
##
## Files To Edit:         2
##                   - viewtopic.php
##                   - language/lang_main.php
##
## Included Files:      None
##
########################################################
## Guest_See_Part_Message
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
## Before installing this version you should first uninstall previous versions of this mod.
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
        $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
#
#-----[ AFTER, ADD ]------------------------------------------
#

$lettercount = (strlen($message));
if (($userdata['username'] == 'Anonymous') && ($lettercount > 40))
{
        $path = __FILE__;
        $file = basename ($path);
        if ($file != 'portal.php')//needed for portal support, otherwise portal layout will breakout when clips are played.
        {
                        //first check if message has quote in it or a ot, quote box breaks forums layout.
                        $message = strtolower($message);
                        $message = str_replace("[quote", "[ quote", $message);
                        $message = substr(($message), 0, 40).'... <b><a href="http://'.$board_config['server_name'].$board_config['script_path'].'profile.php?mode=register">'.$lang['Register'].'</a> '.$lang['or'].' <a href="http://'.$board_config['server_name'].$board_config['script_path'].'login.php?redirect=viewtopic.php?t='.$postrow[$i]['topic_id'].'">'.$lang['Login'].'</a> '.$lang['GuestWantReadAll'].'</b>';
        }
}

#
#-----[ OPEN ]------------------------------------------
#
language/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ ADD, BEFORE ]------------------------------------------
#
//Guest read part
$lang['GuestWantReadAll'] = 'Mesajın devamını okumak için';
$lang['or'] = 'yada';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Kullanıcı avatarı
CrazYAngeR
Üye
Üye
 
İleti: 262
Kayıt: 13.06.2006, 00:34
Konum: İstanbul

Cvp: Mod Guest See Part ( Mİsafirlere Kısmi Mesaj)

İleti yeniaykarama 06.03.2007, 15:59

üstat kismi mesajdan kastınız nedir anlayamadım
bilgin olmak için bize gelin mutlaka olusunuz www.bilginlerboard.com
yeniaykarama
Üye
Üye
 
İleti: 49
Kayıt: 15.01.2007, 04:28

Cvp: Mod Guest See Part ( Mİsafirlere Kısmi Mesaj)

İleti Flatline 06.03.2007, 18:55

Mod icin tesekkürler fakat ben tüm forumlarin degilde bazilarini bu sekilde yapmak istiyorum.Nasil ayirabilirim ???
Kullanıcı avatarı
Flatline
Üye
Üye
 
İleti: 16
Kayıt: 22.12.2006, 15:24

Cvp: Mod Guest See Part ( Mİsafirlere Kısmi Mesaj)

İleti CrazYAngeR 06.03.2007, 21:00

Yeniaykaram : Kısmi mesaj derken. Mesela bi konu anlatıyorsun 5000 karakterlik bu bunun sadece 100 karakterinin gösteriyor ve devamını okumak için giriş yada kayıt olun diyor.

Flatline o varmı bilmiyorum. Ama bunda olmuyor.
Kullanıcı avatarı
CrazYAngeR
Üye
Üye
 
İleti: 262
Kayıt: 13.06.2006, 00:34
Konum: İstanbul

Cvp: Mod Guest See Part ( Mİsafirlere Kısmi Mesaj)

İleti Flatline 06.03.2007, 23:02

Kod: Tümünü seç
########################################################
##
## MOD Title:   Guest_See_Part_Message
## MOD Version: 1.0.6
## Author:     Wicher (http://www.detecties.com/phpbb2018)
##
## Description: 
##      Displays only a part of a full posting if the user is a guest.
##      You can specify certain forums and or topics to be excluded from not readable by guests.
## 
##
## Installation Level:  easy
## Installation Time:  1 minutes
##
## Files To Edit:         2
##                   - viewtopic.php
##                   - language/lang_main.php
##
## Included Files:      None
##
########################################################
## Guest_See_Part_Message
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
## Before installing this version you should first uninstall previous versions of this mod.
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
   $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
#
#-----[ AFTER, ADD ]------------------------------------------
# here you can specify certain forums and topics to be excluded from not reading by guests

if ((($forum_id == 2) or ($forum_id == 6)) && ($topic_id != 31) && ($topic_id != 23))
{
   $lettercount = (strlen($message));
   if (($userdata['username'] == 'Anonymous') && ($lettercount > 40))
   {
      $path = __FILE__;
      $file = basename ($path);
      if ($file != 'portal.php')//needed for portal support, otherwise portal layout will breakout when clips are played.
      {
            //first check if message has quote in it or a ot, quote box breaks forums layout.
            $message = strtolower($message);
            $message = str_replace("[quote", "[ quote", $message);
            $message = str_replace("[ot", "[ ot", $message);
            $message = substr(($message), 0, 40).'... <b><a href="http://'.$board_config['server_name'].$board_config['script_path'].'profile.php?mode=register">'.$lang['Register'].'</a> '.$lang['or'].' <a href="http://'.$board_config['server_name'].$board_config['script_path'].'login.php?redirect=viewtopic.php?t='.$postrow[$i]['topic_id'].'">'.$lang['Login'].'</a> '.$lang['GuestWantReadAll'].'</b>';
      }
   }
}

#
#-----[ OPEN ]------------------------------------------
#
language/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ ADD, BEFORE ]------------------------------------------
#
//Guest read part
$lang['GuestWantReadAll'] = 'if you want to read the full posting';
$lang['or'] = 'or';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM




Yeni versiyonu sunulmus ve bunda galiba istenilen forumlar misafirlerce okunabilsin diye ayarlanabiliyor.Bu konuda bana yardim edilirse cok büyük bir dertten kurtulmus olacagim.Simdiden tesekkürler.
Kullanıcı avatarı
Flatline
Üye
Üye
 
İleti: 16
Kayıt: 22.12.2006, 15:24

Cvp: Mod Guest See Part ( Mİsafirlere Kısmi Mesaj)

İleti Cold Fusion 07.03.2007, 15:16

Flatline yazdı:########################################################
##
## MOD Title: Guest_See_Part_Message
## MOD Version: 1.0.6
## Author: Wicher (http://www.detecties.com/phpbb2018)
##
## Description:
## Displays only a part of a full posting if the user is a guest.
## You can specify certain forums and or topics to be excluded from not readable by guests.
##
##
## Installation Level: easy
## Installation Time: 1 minutes
##
## Files To Edit: 2
## - viewtopic.php
## - language/lang_main.php
##
## Included Files: None
##
########################################################
## Guest_See_Part_Message
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
## Before installing this version you should first uninstall previous versions of this mod.
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
#
#-----[ AFTER, ADD ]------------------------------------------
# here you can specify certain forums and topics to be excluded from not reading by guests

if ((($forum_id == 2) or ($forum_id == 6)) && ($topic_id != 31) && ($topic_id != 23))
{
$lettercount = (strlen($message));
if (($userdata['username'] == 'Anonymous') && ($lettercount > 40))
{
$path = __FILE__;
$file = basename ($path);
if ($file != 'portal.php')//needed for portal support, otherwise portal layout will breakout when clips are played.
{
//first check if message has quote in it or a ot, quote box breaks forums layout.
$message = strtolower($message);
$message = str_replace("[quote", "[ quote", $message);
$message = str_replace("[ot", "[ ot", $message);
$message = substr(($message), 0, 40).'... <b><a href="http://'.$board_config['server_name'].$board_config['script_path'].'profile.php?mode=register">'.$lang['Register'].'</a> '.$lang['or'].' <a href="http://'.$board_config['server_name'].$board_config['script_path'].'login.php?redirect=viewtopic.php?t='.$postrow[$i]['topic_id'].'">'.$lang['Login'].'</a> '.$lang['GuestWantReadAll'].'</b>';
}
}
}

#
#-----[ OPEN ]------------------------------------------
#
language/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ ADD, BEFORE ]------------------------------------------
#
//Guest read part
$lang['GuestWantReadAll'] = 'if you want to read the full posting';
$lang['or'] = 'or';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM



Yeni versiyonu sunulmus ve bunda galiba istenilen forumlar misafirlerce okunabilsin diye ayarlanabiliyor.Bu konuda bana yardim edilirse cok büyük bir dertten kurtulmus olacagim.Simdiden tesekkürler.


bu renkli olarak gösterdiğim kısımlar gizlenecek forumlar olabilir. pek php bilgim yok ama if komutundan sonra bunlar geldiği için bunlara uygulanacak metod if göstergesinin altındaki mesajın belli kısmını gizlemek için kulanılan kod oluyor. gene vb (Visual Basic) gibi düşünürsek bu mod üzerinde ufak bi uynama ile yani if komutunda gizlenecekler yerine gizlenmeyecekleri yazmak için forum id eşit değildir gizlemek istemediğiniz forum numarası şeklinde olabilir.
bu sadece benim fikrim ama "==" bu eşit değildir anlamına geliyorsa oazamn bu mod gizlemek istemediğiniz forumları gizlemez. ozaman beni renklerdiğim kısmlardaki forum id kısmlarını kendi forumunuzdaki forum id lere göre doldurunuz yeterlidir.
Kullanıcı avatarı
Cold Fusion
Yetkili
Yetkili
 
İleti: 46
Kayıt: 02.02.2007, 16:44
Konum: İstanbul

Cvp: Mod Guest See Part ( Mİsafirlere Kısmi Mesaj)

İleti Flatline 07.03.2007, 15:40

@Cold Fusion

Morris yazdı:Hello and thank you for this mod.

I am wondering about how to get more options for,
if (($forum_id == 2) or ($forum_id == 6))

So that i can put in all the forums except for 3 forums that i want my
guest to read?

You can add as much forums as you like, just add
Kod: Tümünü seç
or ($forum_id == ID)

after or ($forum_id == 6) as many times you want where ID is then the id of the forum


Wicher yazdı:that should be like this:
Kod: Tümünü seç
if ((($forum_id == 2) or ($forum_id == 6) or ($forum_id == 6) or ($forum_id == 6)) && ($topic_id != 31) && ($topic_id != 23))


Be very aware where you place the ) things



Benim okunmasini istedigim 4 forum var.

if ((($forum_id == 1) or ($forum_id == 2) or ($forum_id == 3) or ($forum_id == 15)) fakat ben bu sekilde verdigimde kodu hata veriyor.Topic id yazmak mi lazim cünkü ben o forumlardaki tüm topiklerin okunmasini istiyorum.Bilgilendirme forumlari oldugu icin.

Nasil bir oynama isimizi kolaylastirir?
Kullanıcı avatarı
Flatline
Üye
Üye
 
İleti: 16
Kayıt: 22.12.2006, 15:24


Duyurular & Güncellemeler



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron