News:

Wondering if this will always be free?  See why free is better.

Main Menu

Post Count Visible Only To Admin

Started by Masterd, August 10, 2010, 07:44:23 PM

Previous topic - Next topic

Masterd

Link to Mod

   
Post Count Visible Only To Admin 1.0.2
                      
Author:
                   
Masterd

This will make the post count visible only to admin. :D 

                           
News in version 1.0.

- Initial release

                                         
News in version 1.0.2 RC1

- Added better support for Simple Portal


                                         
News in version 1.0.2 RC2

- Fixed error with Simple Portal

                                         
News in version 1.0.2

. Added support for SMF 2.0 RC5

- Added support for Ultimate Profile



This modification is licensed under BSD License (http://www.opensource.org/licenses/bsd-license.php)

Copyright (c) 2010-2014, Masterd
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Masterd

#1
Version 1.0.2 RC1 is released!

Masterd

Small update! :D

Still not supporting SMF 2.0 RC4!

Masterd


swan

Hiya I keep getting an error when I am going into the memberlist. 

QuoteTemplate Parse Error!
There was a problem loading the /Themes/default/Memberlist.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Looks like there is something missing but I cant place what it is.  This is what is there:

if ($context['user']['is_admin'])
{
echo '
<td class="windowbg2" style="white-space: nowrap" width="15">', $member['posts'], '</td>
<td class="windowbg statsbar" width="120">';

if $context['user']['is_admin'] && (!empty($member['post_percent']))
echo '
<div class="bar" style="width: ', $member['post_percent'] + 4, 'px;">
<div style="width: ', $member['post_percent'], 'px;"></div>
</div>';

echo '
</td>';
}


Hope you can help.  Thanks!

HunterP


         if $context['user']['is_admin'] && (!empty($member['post_percent']))

Shouldn't that be :

         if ($context['user']['is_admin'] && !empty($member['post_percent']))

??

swan

Fab ty so much!

Still have a little problem but I dont know if thats anything to do with the mod.

Thanks again!

Wim101

QuoteWarning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Hmmm, this is not very hopeful. I did read this topic, and the solution of @HunterP made no difference.
I have the same problem, and I don't understand why this is still a problem. Here it goes:

Template-verwerkingsfout!
Er is een probleem ontstaan bij het laden van het template- of taalbestand /Themes/default/Memberlist.template.php. Controleer de syntaxis hiervan en probeer het opnieuw. Vergeet niet dat apostrofs (') vaak nog eens afgebroken moeten worden (\'). Om meer specifieke foutinformatie van PHP te verkrijgen, kun je het bestand direct benaderen.

Je wilt wellicht deze pagina vernieuwen of het standaardthema gebruiken.
syntax error, unexpected T_BOOLEAN_AND


And I am not sure, but I think it's here somewhere:

// Displays a sortable listing of all members registered on the forum.
function template_main()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Build the memberlist button array.
   $memberlist_buttons = array(
         'view_all_members' => array('text' => 'view_all_members', 'image' => 'mlist.gif', 'lang' => true, 'url' => $scripturl . '?action=mlist' . ';sa=all', 'active'=> true),
         'mlist_search' => array('text' => 'mlist_search', 'image' => 'mlist.gif', 'lang' => true, 'url' => $scripturl . '?action=mlist' . ';sa=search'),
      );

   echo '
   <div class="main_section" id="memberlist">
      <div class="cat_bar">
         <h4 class="catbg">
            <span class="floatleft">', $txt['members_list'], '</span>';
      if (!isset($context['old_search']))
            echo '
            <span class="floatright">', $context['letter_links'], '</span>';
      echo '
         </h4>
      </div>
      <div class="pagesection">
         ', template_button_strip($memberlist_buttons, 'right'), '
         <div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], '</div>
      </div>';

   echo '
      <div id="mlist" class="tborder topic_table">
         <table class="table_grid" cellspacing="0" width="100%">
         <thead>
            <tr class="catbg">';

   // Display each of the column headers of the table.
   foreach ($context['columns'] as $column)
   {
      // We're not able (through the template) to sort the search results right now...
      if (isset($context['old_search']))
         echo '
               <th scope="col" class="', isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' width="' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
                  ', $column['label'], '</th>';
      // This is a selected column, so underline it or some such.
      elseif ($column['selected'])
         echo '
               <th scope="col" class="', isset($column['class']) ? ' ' . $column['class'] : '', '" style="width: auto;"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . ' nowrap="nowrap">
                  <a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" /></a></th>';
      // This is just some column... show the link and be done with it.
      else
         echo '
               <th scope="col" class="', isset($column['class']) ? ' ' . $column['class'] : '', '"', isset($column['width']) ? ' width="' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
                  ', $column['link'], '</th>';
   }
   echo '
            </tr>
         </thead>
         <tbody>';

   // Assuming there are members loop through each one displaying their data.
   if (!empty($context['members']))
   {
      foreach ($context['members'] as $member)
      {
         echo '
            <tr ', empty($member['sort_letter']) ? '' : ' id="letter' . $member['sort_letter'] . '"', '>
               <td class="windowbg2">
                  ', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['text'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" align="middle" />' : $member['online']['label'], $context['can_send_pm'] ? '</a>' : '', '
               </td>
               <td class="windowbg lefttext">', $member['link'], '</td>
               <td class="windowbg2">', $member['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $member['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $member['name'] . '" /></a>', '</td>';

      if (!isset($context['disabled_fields']['website']))
         echo '
               <td class="windowbg">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" class="new_win"><img src="' . $settings['images_url'] . '/www.gif" alt="' . $member['website']['title'] . '" title="' . $member['website']['title'] . '" /></a>' : '', '</td>';

      // ICQ?
      if (!isset($context['disabled_fields']['icq']))
         echo '
               <td class="windowbg2">', $member['icq']['link'], '</td>';

      // AIM?
      if (!isset($context['disabled_fields']['aim']))
         echo '
               <td class="windowbg2">', $member['aim']['link'], '</td>';

      // YIM?
      if (!isset($context['disabled_fields']['yim']))
         echo '
               <td class="windowbg2">', $member['yim']['link'], '</td>';

      // MSN?
      if (!isset($context['disabled_fields']['msn']))
         echo '
               <td class="windowbg2">', $member['msn']['link'], '</td>';

      // Group and date.
      echo '
               <td class="windowbg lefttext">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td>
               <td class="windowbg lefttext">', $member['registered_date'], '</td>';

      if ($context['user']['is_admin'])
      {
         echo '
               <td class="windowbg2" style="white-space: nowrap" width="15">', $member['posts'], '</td>
               <td class="windowbg statsbar" width="120">';

         if ($context['user']['is_admin']) && (!empty($member['post_percent']))
            echo '
                  <div class="bar" style="width: ', $member['post_percent'] + 4, 'px;">
                     <div style="width: ', $member['post_percent'], 'px;"></div>
                  </div>';

         echo '
               </td>';
      }

      echo '
            </tr>';
      }
   }
   // No members?
   else
      echo '
            <tr>
               <td colspan="', $context['colspan'], '" class="windowbg">', $txt['search_no_results'], '</td>
            </tr>';

   // Show the page numbers again. (makes 'em easier to find!)
   echo '
         </tbody>
         </table>
      </div>';

   echo '
      <div class="pagesection">
         <div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], '</div>';

   // If it is displaying the result of a search show a "search again" link to edit their criteria.
   if (isset($context['old_search']))
      echo '
         <div class="floatright">
            <a href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a>
         </div>';
   echo '
      </div>
   </div>';

}


I can't see the memberlist anymore. Everything else is working great. If it's not in the piece of coding provided, I think it's somewhere else in the mod itself.
Thanks for any help you can give.

forum: hxxp:www.blackdesertonline.nl [nonactive] but my memberlist is disabled for the time being.

Advertisement: