Simple Machines Community Forum

SMF Support => Türkçe Bölümü (Turkish) => Language Specific Support => Dokümantasyon => Topic started by: bolubeyi61 on May 24, 2013, 01:32:29 PM

Title: Yazdır butonu ve yazdır sayfasını üye izinlerine bağlamak
Post by: bolubeyi61 on May 24, 2013, 01:32:29 PM
Bu modifikasyon yazdır butonunu ve yazdır sayfasını görüntülemeyi üye izinlerine bağlar.
İstediğiniz üye grubuna üye izinlerinden yetki verebilirsiniz.
Paketlerden kurabilirsiniz.
Modifikasyon paketi ektedir.
Modifikasyon sıfır default tema ve sıfır smf dosyaları baz alınarak hazırlanmıştır.
Modifikasyon resmi site onayına sunulmuştur.
Konuyu moderatör arkadaşlardan daha uygun bir yere taşımalarını rica ederim. Daha uygum bölümlere konu açma moderatör onayına bağlı olduğu için konunun görüntülenmesi gecikiyor.
(http://img199.imageshack.us/img199/807/screenshot1wfb.png)

(http://img199.imageshack.us/img199/807/screenshot1wfb.png)

Manuel kurulum:

./Themes/default/Display.template.php
Find:
      'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),

Replace:
      'print' => array((allowedTo('printpage_permission')) ? 1 : 'test' => 'nothinglol', 'text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),

./Themes/default/Printpage.template.php
find:
   <body>

Replace:
   <body>';
   if (allowedTo('printpage_permission') )
   echo '


Find:
      echo '
         <dt class="postheader">
            ', $txt['title'], ': <strong>', $post['subject'], '</strong><br />
            ', $txt['post_by'], ': <strong>', $post['member'], '</strong> ', $txt['search_on'], ' <strong>', $post['time'], '</strong>
         </dt>
         <dd class="postbody">
            ', $post['body'], '
         </dd>';
}


Replace:
      if (allowedTo('printpage_permission') ){
      echo '
         <dt class="postheader">
            ', $txt['title'], ': <strong>', $post['subject'], '</strong><br />
            ', $txt['post_by'], ': <strong>', $post['member'], '</strong> ', $txt['search_on'], ' <strong>', $post['time'], '</strong>
         </dt>
         <dd class="postbody">
            ', $post['body'], '
         </dd>';}
      else
      echo '
      <h1 id="title">', $context['forum_name_html_safe'], '</h1>
      <h2 id="linktree">', $txt['print_help'], '</h2>
      ';         
}


./Sources/ManagePermissions.php
Find:
   $groupLevels['board']['restrict'] = array(
      'poll_view',


Replace:
   $groupLevels['board']['restrict'] = array(
      'poll_view',
      'printpage_permission',


Find:
         'karma_edit' => array(false, 'general', 'moderate_general'),

Replace:
         'karma_edit' => array(false, 'general', 'moderate_general'),
         'printpage_permission' => array(false, 'general', 'view_basic_info'),


./Themes/default/languages/Modifications.english.php
add:
$txt['permissionname_printpage_permission'] = 'Show the print page.';
$txt['permissionhelp_printpage_permission'] = 'You can print page according to Member groups.';
$txt['print_help'] = 'You are not authorized to view this page. Contact the site administrator if you believe that an error.';


./Themes/default/languages/Modifications.turkish.php
add:
$txt['permissionname_printpage_permission'] = 'Yazdýr sayfasýný göster.';
$txt['permissionhelp_printpage_permission'] = 'Üye gruplarýna göre yazdýr sayfasýný gösterebilirsiniz.';
$txt['print_help'] = 'Bu sayfayý görüntülemeye yetkiniz yok. Bir hata olduðunu düþünüyorsanýz site yöneticisine baþvurunuz.';

Title: Re: Yazdır butonu ve yazdır sayfasını üye izinlerine bağlamak
Post by: akaewn on May 24, 2013, 02:01:22 PM
güzel olmuş :) teşekkürler
Title: Re: Yazdır butonu ve yazdır sayfasını üye izinlerine bağlamak
Post by: pitta on May 24, 2013, 03:05:22 PM
elinize saglik zahmet oldu tesekkür ederim bu özelligi bundan sonraki smf sürümleri icin varsayilan özellik olarak önerirseniz kaybolmaz
Title: Re: Yazdır butonu ve yazdır sayfasını üye izinlerine bağlamak
Post by: bolubeyi61 on May 24, 2013, 05:04:54 PM
aslında boşuna uğraşmışım. istediğiniz mod daha değişik bir şekilde önceden yapılmış. arama yapmak lazımmış
http://custom.simplemachines.org/mods/index.php?mod=2293
Title: Re: Yazdır butonu ve yazdır sayfasını üye izinlerine bağlamak
Post by: pitta on May 25, 2013, 04:32:00 AM
haklisiniz kusura bakmayin :(