Yazdır butonu ve yazdır sayfasını üye izinlerine bağlamak

Started by bolubeyi61, May 24, 2013, 01:32:29 PM

Previous topic - Next topic

bolubeyi61

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.




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.';


akaewn


pitta

elinize saglik zahmet oldu tesekkür ederim bu özelligi bundan sonraki smf sürümleri icin varsayilan özellik olarak önerirseniz kaybolmaz

bolubeyi61

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


Advertisement: