Orjinal Konu: [url]http://custom.simplemachines.org/mods/index.php?mod=1290[/url]
Name: Limit A Guests Daily PageViews Mod
Yapımcı: karlbenson
Manuel: Var
Uyumlu Sürüm: 1.1.5
Türkçe: Var / By Tattoocu_Cartel

Demo Görünüm
[url]http://custom.simplemachines.org/mods/index.php?action=download;mod=1290;id=60730;image[/url]
[url]http://custom.simplemachines.org/mods/index.php?action=download;mod=1290;id=60732;image[/url]



MANUEL ANLATIM - TÜRKÇESİ ÇEVİRİSİ İLE (Yedek Almayı Unutmayınız)

./index.php
Bul
[code] // Load the current user's permissions.
loadPermissions();[/code]

Sonrasına Ekle
[code]
// Start of Limit A Guests Daily PageViews Mod

// Extra globals we need access to (if not already got access)
global $txt, $context, $func;

// Sanitize - cast as integer / prevent undefined index - especially after initial install of mod
$modSettings['limited_views'] = !empty($modSettings['limited_views']) ? (int) $modSettings['limited_views'] : 0 ;

// Only if guest access is enabled, and a limit is set, AND the user is a guest
if(!empty($modSettings['allow_guestAccess']) && !empty($modSettings['limited_views']) && $context['user']['is_guest'])
{
if(!isset($_SESSION['limited_views']))
// Setup the array
$_SESSION['limited_views'] = array(
'views' => 1,
'last_view' => time()
);
// Have viewed pages before
else
{
// Sanitize - cast as integers
$_SESSION['limited_views']['views'] = ((int) $_SESSION['limited_views']['views']) + 1;
$_SESSION['limited_views']['last_view'] = (int) $_SESSION['limited_views']['last_view'];

// Last view yesterday (done on forum time)
$date = date('dm',forum_time(null, $_SESSION['limited_views']['last_view']));

// Update the session info. If new day set views to 1, else increase by 1.
// Don't increase if already exceeds the limit (prevents views from getting out of control eg bots/spiders)
$_SESSION['limited_views']['views'] = ($date != date('dm')) ? 1 : ($_SESSION['limited_views']['views'] > $modSettings['limited_views'] ? $modSettings['limited_views'] + 1 : $_SESSION['limited_views']['views']);
// Set the latest view to now, unless we've reached the limit - we will keep this timestamp until tomorrow.
$_SESSION['limited_views']['last_view'] = $_SESSION['limited_views']['views'] > $modSettings['limited_views'] ? $_SESSION['limited_views']['last_view'] : time();
// Tidy up
unset($date);

// Don't be stupid - If they've reached the limit, we must allow them the guest actions of register/login
// Also, note you can add other actions (must be on the action array) here to exempt
$temp = array('login[/swf2][swf3]login2[/swf2][swf3]register[/swf2][swf3]register2[/swf2][swf3]reminder[/swf2][swf3]activate[/swf2][swf3]smstats[/swf2][swf3]help[/swf2][swf3].xml[/swf2][swf3]verificationcode');
if (empty($_REQUEST['action']) || !in_array(strtolower($_REQUEST['action']), $temp))
{

// Fatal error, must register as exceeded no. of page views
if($_SESSION['limited_views']['views'] > $modSettings['limited_views'])
{
// Mr Search Engine, don't index this page (its just an error message)
$context['robot_no_index'] = true;

// Switcharoo on smf language string to set the page title for header and for browser <br /> // Make html safe so doesn't break the forum.<br /> $context['page_title'] = $txt['106'] = strtr($func['htmlspecialchars']($txt['limited_views_title']), array("\r" => '', "\n" => '', "\t" => ''));<br /> <br /> fatal_lang_error('limited_views_message', false, array($modSettings['limited_views']));<br /> }<br /> }<br /> // Tidy up<br /> unset($temp);<br /> }<br /> <br /> // Prepare and make html safe the remaining string<br /> if(!empty($modSettings['limited_views']) && !empty($_SESSION['limited_views']['views']))<br /> {<br /> $context['limited_views_remaining'] = strtr(' - '.<br /> $func['htmlspecialchars'](<br /> ($_SESSION['limited_views']['views'] > $modSettings['limited_views'] ? 0 : <br /> ($modSettings['limited_views'] - $_SESSION['limited_views']['views'])<br /> ). <br /> $txt['limited_views_remaining_'.<br /> ($modSettings['limited_views'] - $_SESSION['limited_views']['views'] == 1 ? 'singular' : 'plural')<br /> ]<br /> ),<br /> array(<br /> "\r" => '',<br /> "\n" => '',<br /> "\t" => ''<br /> )<br /> );<br /> if($modSettings['limited_views'] - $_SESSION['limited_views']['views'] >= 0)<br /> {<br /> // Avoid undefined error<br /> $context['html_headers'] = !empty($context['html_headers']) ? '' : $context['html_headers'];<br /> <br /> // Now build javascript message (javascript to try to keep the information title out of the search engine)<br /> // Keep on new line (as there maybe extra headers above/below)<br /> // Tabbed out of sync to keep inline with html output<br /> $context['html_headers'] .= '<br /> <script language="JavaScript" type="text/javascript"><!-- // -->'.<br /> chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(84) . chr(65) . chr(91).'<br /> document.title = document.title + \''.$context['limited_views_remaining'].'\';<br /> // '.chr(93) . chr(93) . chr(62).'</script><br /> ';<br /> }<br /> }<br /> }<br /> // Either a user and/or guest access is disabled or no limit is set, in which case<br /> else<br /> {<br /> // If a session variable for this exists, its no longer needed.<br /> if(isset($_SESSION['limited_views']))<br /> unset($_SESSION['limited_views']);<br /> }<br /> <br /> // End of Limit A Guests Daily PageViews Mod<br /> <br /> [/code]<br /> <br /> <br /> <br /> <br /> <br /> ./Sources/ModSettings.php<br /> Bul<br /> [code] array('check[/swf2][swf3]allow_guestAccess'),[/code]<br /> <br /> Sonrasına Ekle<br /> [code] array('int[/swf2][swf3]limited_views'),[/code]<br /> <br /> <br /> <br /> <br /> <br /> ./Themes/default/languages/Help.english.php<br /> Bul<br /> [code]?>[/code]<br /> <br /> Öncesine Ekle<br /> [code]$helptxt['limited_views'] = 'Limit the no. of page views that guests can view. Warning, spiders/bots WILL be limited by this. <br /><br />(As excluding them would be seen as Black Hat and likely to violate Google & other search engines Terms of Service).';<br /> [/code]<br /> <br /> <br /> <br /> <br /> <br /> ./Themes/default/languages/Help.english-uft8.php<br /> Bul<br /> [code]?>[/code]<br /> <br /> Öncesine Ekle<br /> [code]$helptxt['limited_views'] = 'Limit the no. of page views that guests can view. Warning, spiders/bots WILL be limited by this. <br /><br />(As excluding them would be seen as Black Hat and likely to violate Google & other search engines Terms of Service).';<br /> [/code]<br /> <br /> <br /> <br /> <br /> <br /> ./Themes/default/languages/Modifications.english.php<br /> Bul<br /> [code]?>[/code]<br /> <br /> Öncesine Ekle<br /> [code]$txt['limited_views_remaining_singular'] = ' page view remaining today';<br /> $txt['limited_views_remaining_plural'] = ' page views remaining today';<br /> $txt['limited_views'] = 'Limit guests to x page views per day<div class="smalltext">0 to disable</div>';<br /> $txt['limited_views_message'] = 'All guests are limited to %s page views per day.<br /> We now invite you to <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a> to continue accessing the forum.';<br /> $txt['limited_views_title'] = 'Please Login or Register';<br /> [/code]<br /> <br /> <br /> <br /> <br /> <br /> ./Themes/default/languages/Modifications.english-uft8.php<br /> Bul<br /> [code]?>[/code]<br /> <br /> Öncesine Ekle<br /> [code]$txt['limited_views_remaining_singular'] = ' page view remaining today';<br /> $txt['limited_views_remaining_plural'] = ' page views remaining today';<br /> $txt['limited_views'] = 'Limit guests to x page views per day<div class="smalltext">0 to disable</div>';<br /> $txt['limited_views_message'] = 'All guests are limited to %s page views per day.<br /> We now invite you to <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a> to continue accessing the forum.';<br /> $txt['limited_views_title'] = 'Please Login or Register';<br /> [/code]<br /> <br /> <br /> <br /> <br /> <br /> <br /> ./Themes/default/languages/Modifications.turkish.php<br /> Bul<br /> [code]?>[/code]<br /> <br /> Öncesine Ekle<br /> [code]$txt['limited_views_remaining_singular'] = ' bugun kalan sayfa gosterimi';<br /> $txt['limited_views_remaining_plural'] = ' bugun kalan sayfa gosterimleri';<br /> $txt['limited_views'] = 'Gun basina ziyaretcilere x sayfa gosterimleri limiti<div class="smalltext">0 to disable</div>';<br /> $txt['limited_views_message'] = 'Butun ziyaretciler gun basina %s sayfa gosterimiyle limitlendi.<br /> Simdi Seni Davet Ediyoruz <a href="' . $scripturl . '?action=login">giris</a> or <a href="' . $scripturl . '?action=register">kayit</a> forumdan faydalanmak icin devam et.';<br /> $txt['limited_views_title'] = 'Lutfen Giris Yapin ya da Uye Degilseniz Kayit Olun';<br /> [/code]<br /> <br /> <br /> <br /> <br /> <br /> ./Themes/default/languages/Modifications.turkish-uft8.php<br /> Bul<br /> [code]?>[/code]<br /> <br /> Öncesine Ekle<br /> [code]$txt['limited_views_remaining_singular'] = ' bugun kalan sayfa gosterimi';<br /> $txt['limited_views_remaining_plural'] = ' bugun kalan sayfa gosterimleri';<br /> $txt['limited_views'] = 'Gun basina ziyaretcilere x sayfa gosterimleri limiti<div class="smalltext">0 to disable</div>';<br /> $txt['limited_views_message'] = 'Butun ziyaretciler gun basina %s sayfa gosterimiyle limitlendi.<br /> Simdi Seni Davet Ediyoruz <a href="' . $scripturl . '?action=login">giris</a> or <a href="' . $scripturl . '?action=register">kayit</a> forumdan faydalanmak icin devam et.';<br /> $txt['limited_views_title'] = 'Lutfen Giris Yapin ya da Uye Degilseniz Kayit Olun';<br /> [/code]<br /> <br /> <br /> Admin Paneli >> Forum Seçenekleri >>Gun basina ziyaretcilere x sayfa gosterimleri limiti (bu seçeneğe istediğiniz rakamı yazabilirsiniz. sayfa bakma limitini belirler.<br /> <br /> Not: Orjinal Sitesinden Alıntıdır.</p> <div class="alert alert-info"> <strong>Etiketler:</strong> <ul class="pager"> <li><a href="http://www.main-board.com/bilgi/SMF Ziyaretçilere Günlük Sayfa Gösterimi Limiti (paket+manuel+türkçeleştirildi)">SMF Ziyaretçilere Günlük Sayfa Gösterimi Limiti (paket+manuel+türkçeleştirildi)</a></li> </ul> </div> </div> </div> </div> <div class="container well"> <div class="row"> <div class="col-xs-12 col-md-12"> <div class="list-group col-md-3 col-sm-12"> <span class="list-group-item active"> <strong>MaktüL</strong> <span class="glyphicon pull-right glyphicon-user"></span> </span> <a class="list-group-item" href="http://www.main-board.com/bilgin-33847/"> <img style="border-radius: 5px;" class="img-responsive" src="http://www.main-board.com/img.php?src=v1/default-avatars.png&w=236&h=236" alt="MaktüL"> </a> </div> <div class="list-group col-md-5 col-sm-12"> <span class="list-group-item active">Üyenin Yeni Konuları <i class="fa fa-file-text pull-right" aria-hidden="true"></i></span> <a href="http://www.main-board.com/658752/beyaz-gulum" class="list-group-item">Beyaz Gülüm</a> <a href="http://www.main-board.com/385040/malt-askin-gozu" class="list-group-item">malt - aşkın gözü</a> <a href="http://www.main-board.com/385039/mira-son-melodi" class="list-group-item">Mira - Son Melodi</a> <a href="http://www.main-board.com/384890/paramore-decode" class="list-group-item">Paramore - Decode</a> </div> <div class="list-group col-md-4 col-sm-12"> <span class="list-group-item active">Üyenin Populer Konuları <i class="fa fa-certificate pull-right" aria-hidden="true"></i></span> <a href="http://www.main-board.com/133010/ankara-ilinde-bulunan-liseler" class="list-group-item">Ankara ilinde bulunan liseler</a> <a href="http://www.main-board.com/133006/bursa-ilinde-bulunan-liseler" class="list-group-item">Bursa ilinde bulunan liseler</a> <a href="http://www.main-board.com/133005/tekirdag-ilinde-bulunan-liseler" class="list-group-item">Tekirdağ İlinde bulunan liseler</a> <a href="http://www.main-board.com/77611/39-kontore-30-gunlugune-5000-sms-ister-misiniz" class="list-group-item">39 kontöre 30 günlüğüne 5000 sms ister misiniz</a> </div> </div> </div> </div> <!-- /resim-ana-foto biter --> <div class="container well"> <div class="row"> <div class="col-xs-12 col-md-12"> <!-- resim-ana-istatistik baslar --> <div class="col-md-6"> <div class="alert alert-success"> <div><span class="glyphicon glyphicon-thumbs-up"></span> Beğeniler: 0</div> <div><span class="glyphicon glyphicon-heart"></span> Favoriler: 0</div> <div><span class="glyphicon glyphicon-eye-open"></span> İzlenmeler: 925</div> </div> </div> <div class="col-md-3"> <div class="alert alert-warning"> <span class="glyphicon glyphicon-star g15x"></span> <span class="glyphicon glyphicon-star g15x"></span> <span class="glyphicon glyphicon-star g15x"></span> <span class="glyphicon glyphicon-star g15x"></span> <span class="glyphicon glyphicon-star g15x"></span> </div> </div> <div class="col-md-3"> <div class="pull-right" style="margin:5px;"> <a rel="nofollow" href="http://www.main-board.com/reg.php"><img src="http://www.main-board.com/v1/favori.png" alt="favori"/></a> </div> <div class="pull-right" style="margin:5px;"> <a rel="nofollow" href="http://www.main-board.com/reg.php"><img src="http://www.main-board.com/v1/like.png" alt="like"/></a> </div> <div class="pull-right" style="margin:5px;"> <a rel="nofollow" target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=http://www.main-board.com/143629/smf-ziyaretcilere-gunluk-sayfa-gosterimi-limiti-paket-manuel-turkcelestirildi"><img width="50" src="http://www.main-board.com/v1/profacebook.png" alt="share" /></a> </div> </div> </div> </div> </div> <!-- /resim-ana-istatistik biter --> <!-- resim-ana-yorum baslar --> <div class="container well"> <div class="row"> <div class="col-xs-12 col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <strong><a href="http://www.main-board.com/bilgin-915518/">ertuc</a></strong> <span class="text-muted">Tarih: 21.09.2010 19:29</span> </div> <div class="panel-body"> <img style="border-radius:5px; padding-right:10px;" class="pull-left" src="http://www.main-board.com/img.php?src=v1/default-avatars.png&w=64&h=64" alt=""> bakalım </div> </div> </div> </div> </div> <!-- /resim-ana-yorum biter --> <div class="container"> <div class="row"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- m-b.com-esnek --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3856933101328627" data-ad-slot="6671652747" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="container"> <div class="row"> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <span class="navbar-brand">Farkı Fark Edenlerin Diyarı</span> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav navbar-right"> <li><a href="http://www.main-board.com/kategori/36/board-sorunlari-ve-duyurular/">Board Sorunları Ve Duyurular</a></li> <li><a href="http://www.main-board.com/595626/forum-kurallari-2">Kurallar</a></li> <li><a href="http://www.main-board.com/populeruyeler/">Popüler Üyeler</a></li> <li><a href="http://www.main-board.com/bilginler/">Üyeler</a></li> <li><a href="http://www.main-board.com/editorler.php">Editörler</a></li> <li><a href="http://www.main-board.com/guncel.php">Güncel</a></li> <li><a href="http://www.main-board.com/etiketler.php">Etiketler</a></li> <li><a href="http://www.main-board.com/contact.php">İletişim</a></li> </ul> </div> </div> </nav> </div> </div> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-6135056-95', 'auto'); ga('send', 'pageview'); </script> </body> </html>