[ABD] Nyquist Show Groups Info (multiple ranks)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
Nyquist
Registered User
Posts: 70
Joined: Sat Dec 16, 2006 2:09 pm
Location: Italy

[ABD] Nyquist Show Groups Info (multiple ranks)

Post by Nyquist »

MOD Name: Nyquist Show Groups Info
MOD Version: 1.0.0
Author: Nyquist
Installation Level: Easy
Installation Time: 11 Minutes
Format: MODX
MOD Description:This MOD shows the user's groups' ranks together with the user's personal rank, both in the viewtopic page and in the personal profile page. It can be used to have multiple ranks per user since you can add ranks to a user by just adding the user to groups.

Since additional ranks are obtained by adding users to groups, you can use standard phpBB3 groups management panel to manage your additional ranks, with no modification to the database schema. Furthermore, by using standard phpBB3 groups management features, you can have ranks which can be given only by admin (closed groups ranks), by other users (Request Groups), or that can be freely chosen by users as in guilds forums (open groups).

The MOD only shows the ranks' images, so if you have groups' ranks that you don't want to list you can just let them without any rank image.

In the standard phpBB3, when a user changes his/her default group he/she inherits the new default group's rank. Since with this MOD you show both user's rank and group's rank you can avoid this inheriting feature. You can choose that the user does not inherit the default group's rank. In this way the user can keep his/her personal rank (or the basic number-of-post related rank), but having the group's color and the group's rank (as an additional rank).

The MOD can be easily configured through a module in the ACP. Within this module you can choose the maximum number of groups' ranks shown in the viewtopic page and in the personal profile page. Also you can change the inherit/don't-inherit behaviour on the fly.
Changes to DB schemas: none
Changes to styles template:
  • prosilver/viewtopic_body.html
    • 1 code add
  • prosilver/memberlist_view.html
    • 1 code add
  • subsilver2/viewtopic_body.html
    • 1 code add
  • subsilver2/memberlist_view.html
    • 1 code add
Changes to files:
  • viewtopic.php
    • 3 code add
  • memberlist.php
    • 2 code add
  • includes/functions_user.php
    • 3 code add
    • 3 code replacements
phpBB version: phpBB 3
Language: English and Italian (3 Dutch translations by RdJ1, bbjimbb and Rotsblok can be found a few posts ahead)

Download File: http://www.4shared.com/file/39422885/b7 ... sinfo.html
Notes: I am not a programmer and I am new to phpbb. So I would appreciate very much any help/suggestion for the improvement of the MOD. I am also aware that the MOD may have some bug due to my lack of expertise. So please be careful when installing and using the MOD.

Preview: In the image below you can see the user having his normal number-of-post-related rank (the stars pointed by the red arrow), two ADMIN chosen groups' ranks (blue arrows) and two user chosen groups' ranks (green arrows). For italian users: PdS has nothing to do with politics ;)
Image

Acknowledgment: thanks to RdJ1, Eelke and FlexyClown for help and suggestions.
Have fun.
Last edited by Sam on Fri Jun 04, 2010 4:33 pm, edited 17 times in total.
Reason: Marked mod as abandoned, if the original poster wish to continue this, please PM any MOD team member to have it unlocked.
User avatar
bbjimbb
Registered User
Posts: 98
Joined: Sat Jan 12, 2008 10:08 am

Re: [BETA] Nyquist Show Groups Info (for multiple ranks)

Post by bbjimbb »

Handly on grand forums! Then you will see directly who have experience on the forum :D (Sorry for my bad english)

Dutch Translation:

Code: Select all

<?php
/** 
*
* acp_nyqshowgroupsinfo [Dutch]
*
* @package language
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (empty($lang) || !is_array($lang))
{
    $lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

$lang = array_merge($lang, array(
        'ACP_NYQ_SHOWGROUPSINFO_TITLE'   =>    'Nyquist Groepen informatie',
        'NYQ_SHOWGROUPSINFO_EXPLAIN' =>    'In deze module kan je het nummer van de groepranken van elke user bepalen op de viewtopic pagina. Als je dit op 0 zet word er niks weergegeven.',
        'NYQ_SHOWGROUPSINFO_NUMBERTITLE'=> 'Schrijf een nummer',
        'NYQ_SHOWGROUPSINFO_NUMBERUSE'=>    'Zet een goed nummer in dit vak. Dit zijn het aantal ranken die worden weergegeven.',
));

?>

Excuse me for my bad english. I hope you understand my posts. ;)
User avatar
Nyquist
Registered User
Posts: 70
Joined: Sat Dec 16, 2006 2:09 pm
Location: Italy

Re: [BETA] Nyquist Show Groups Info (for multiple ranks)

Post by Nyquist »

thanks for the translation. Can you please let me know how the MOD works on large forums? I am managing small communities and the MOD seems to work very well. But I would like to know if there are performance inpacts of the MOD on the speed of forums with many users.

Thanks.
RdJ1
Registered User
Posts: 119
Joined: Thu Oct 25, 2007 8:18 am
Location: The Netherlands

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by RdJ1 »

Nice mod!

One thing:

When I am in .Mods module in ACP (I installed the acp-module there) and in System > Module Management I get errors:

Code: Select all

[phpBB Debug] PHP Notice: in file /adm/index.php on line 149: Cannot modify header information - headers already sent by (output started at /includes/acp/info/acp_nyq_showgroupsinfo.php:48)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 151: Cannot modify header information - headers already sent by (output started at /includes/acp/info/acp_nyq_showgroupsinfo.php:48)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/acp/info/acp_nyq_showgroupsinfo.php:48)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/acp/info/acp_nyq_showgroupsinfo.php:48)
How can I fix this?
User avatar
Nyquist
Registered User
Posts: 70
Joined: Sat Dec 16, 2006 2:09 pm
Location: Italy

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by Nyquist »

RdJ1 wrote:Nice mod!

One thing:

When I am in .Mods module in ACP (I installed the acp-module there) and in System > Module Management I get errors: [cut]
it seems there is a problem with the system module files location. You should have the following 4 files uploaded:
  1. root/adm/style/acp_nyq_showgroupsinfo.html
    and its content should start with:

    Code: Select all

    <!-- INCLUDE overall_header.html -->
    				
    <a name="maincontent"></a>
    								
    <h1>{ACP_NYQ_SHOWGROUPSINFO_TITLE}</h1>
    
  2. root/includes/acp/acp_nyq_showgroupsinfo.php
    and its content should start with:

    Code: Select all

    <?php
    /** 
    *
    * @package acp
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */
    
    /**
    * @package acp
    */
    class acp_nyq_showgroupsinfo
    {
    
  3. root/includes/acp/info/acp_nyq_showgroupsinfo.php
    and its content should start with:

    Code: Select all

    <?php
    /**
    *
    * @author Nyquist
    *
    *
    * @package acp
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */
    
    /**
    * @package module_install
    */
    class acp_nyq_showgroupsinfo_info
    {
    
    note that the class in this file has a name ending with _info
  4. root/language/en/mods/info_acp_nyq_showgroupsinfo.php
    note that here the info_ thing is in the file name and not in its content.
    The content of this file should be:

    Code: Select all

    <?php
    /** 
    *
    * acp_nyqshowgroupsinfo [English]
    *
    * @package language
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */
    
    /**
    * DO NOT CHANGE
    */
    if (empty($lang) || !is_array($lang))
    {
    	$lang = array();
    }
    
    // DEVELOPERS PLEASE NOTE
    //
    // All language files should use UTF-8 as their encoding and the files must not contain a BOM.
    //
    // Placeholders can now contain order information, e.g. instead of
    // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
    // translators to re-order the output of data while ensuring it remains correct
    //
    // You do not need this where single placeholders are used, e.g. 'Message %d' is fine
    // equally where a string contains only two placeholders which are used to wrap text
    // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
    
    $lang = array_merge($lang, array(
            'ACP_NYQ_SHOWGROUPSINFO_TITLE'   =>    'Nyquist Show Groups Info',
            'NYQ_SHOWGROUPSINFO_EXPLAIN' =>    'In this module you can set the number of group-ranks shown above each user\'s rank in the viewtopic page. If you set this number to 0 no group rank will be shown.',
            'NYQ_SHOWGROUPSINFO_NUMBERTITLE'=> 'Write a number',
            'NYQ_SHOWGROUPSINFO_NUMBERUSE'=>    'Please write a correct number in the box. Be sure to write a number.',
    ));
    
    ?>
    
Can you please confirm this is exactly the way your uploaded files appear?
RdJ1
Registered User
Posts: 119
Joined: Thu Oct 25, 2007 8:18 am
Location: The Netherlands

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by RdJ1 »

Yes, I only have another language.
User avatar
Eelke
Registered User
Posts: 2903
Joined: Thu Dec 20, 2001 8:00 am
Location: NL, Bussum
Name: Eelke Blok

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by Eelke »

Make sure neither /includes/acp/info/acp_nyq_showgroupsinfo.php nor the language file you're using has anything in front of the initial <?php
A single space could already be enough to cause this.
RdJ1
Registered User
Posts: 119
Joined: Thu Oct 25, 2007 8:18 am
Location: The Netherlands

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by RdJ1 »

I got it:

You have to remove everything before <?php and after ?> in every file :!:
Eelke wrote:Make sure neither /includes/acp/info/acp_nyq_showgroupsinfo.php nor the language file you're using has anything in front of the initial <?php
A single space could already be enough to cause this.
I've found it already, but thanks for helping ;)
User avatar
Nyquist
Registered User
Posts: 70
Joined: Sat Dec 16, 2006 2:09 pm
Location: Italy

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by Nyquist »

Thanks guys: I have changed the MOD files accordingly.
User avatar
Rotsblok
Registered User
Posts: 648
Joined: Fri Nov 11, 2005 12:47 pm
Location: Upper north of Holland
Name: Rikkert Westa

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by Rotsblok »

Code: Select all

<?php
    /** 
    *
    * acp_nyqshowgroupsinfo [Dutch]
    *
    * @package language
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */

    /**
    * DO NOT CHANGE
    */
    if (empty($lang) || !is_array($lang))
    {
        $lang = array();
    }

    // DEVELOPERS PLEASE NOTE
    //
    // All language files should use UTF-8 as their encoding and the files must not contain a BOM.
    //
    // Placeholders can now contain order information, e.g. instead of
    // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
    // translators to re-order the output of data while ensuring it remains correct
    //
    // You do not need this where single placeholders are used, e.g. 'Message %d' is fine
    // equally where a string contains only two placeholders which are used to wrap text
    // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

    $lang = array_merge($lang, array(
            'ACP_NYQ_SHOWGROUPSINFO_TITLE'   =>    'Nyquist Groepen informatie',
            'NYQ_SHOWGROUPSINFO_EXPLAIN' =>    'In deze module kan je het nummer van de groepranken van elke user bepalen op de viewtopic pagina. Als je dit op 0 zet word er niks weergegeven.',
            'NYQ_SHOWGROUPSINFO_NUMBERTITLE'=> 'Schrijf een nummer',
            'NYQ_SHOWGROUPSINFO_NUMBERUSE'=>    'Zet een goed nummer in dit vak. Dit zijn het aantal ranken die worden weergegeven.',
    ));

    ?>

There are several translation errors in it. Here is the correct one

Code: Select all

    <?php
    /** 
    *
    * acp_nyqshowgroupsinfo [Dutch]
    *
    * @package language
    * @translation by Rotsblok of http://www.phpbbservice.nl 
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */

    /**
    * DO NOT CHANGE
    */
    if (empty($lang) || !is_array($lang))
    {
        $lang = array();
    }

    // DEVELOPERS PLEASE NOTE
    //
    // All language files should use UTF-8 as their encoding and the files must not contain a BOM.
    //
    // Placeholders can now contain order information, e.g. instead of
    // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
    // translators to re-order the output of data while ensuring it remains correct
    //
    // You do not need this where single placeholders are used, e.g. 'Message %d' is fine
    // equally where a string contains only two placeholders which are used to wrap text
    // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine

    $lang = array_merge($lang, array(
            'ACP_NYQ_SHOWGROUPSINFO_TITLE'   =>    'Nyquist Groepen informatie',
            'NYQ_SHOWGROUPSINFO_EXPLAIN' =>    'In deze module kan je het nummer van de groepsrangen van elke gebruiker bepalen op de viewtopic pagina. Indien je dit op 0 zet wordt er niks weergegeven.',
            'NYQ_SHOWGROUPSINFO_NUMBERTITLE'=> 'Voer een nummer in',
            'NYQ_SHOWGROUPSINFO_NUMBERUSE'=>    'Zet een nummer in dit vak. Dit zijn het aantal rangen die worden weergegeven.',
    ));

    ?>

Nederlandse Support site
Several dutch translations for 3.1 extensions if you need one or there is an update of an extension feel free to notify me.
RdJ1
Registered User
Posts: 119
Joined: Thu Oct 25, 2007 8:18 am
Location: The Netherlands

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by RdJ1 »

You're right, but I would 'Nyquist Groepen informatie' not change from English version ('Nyquist Show Groups Info'), as it's a name.

But thanks for the good Dutch version!
User avatar
Rotsblok
Registered User
Posts: 648
Joined: Fri Nov 11, 2005 12:47 pm
Location: Upper north of Holland
Name: Rikkert Westa

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by Rotsblok »

RdJ1 wrote:You're right, but I would 'Nyquist Groepen informatie' not change from English version ('Nyquist Show Groups Info'), as it's a name.

But thanks for the good Dutch version!
Yes I know but for the understanding part (as what it does) is it better to change it also. But I get your point..
Nederlandse Support site
Several dutch translations for 3.1 extensions if you need one or there is an update of an extension feel free to notify me.
RdJ1
Registered User
Posts: 119
Joined: Thu Oct 25, 2007 8:18 am
Location: The Netherlands

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by RdJ1 »

Rotsblok wrote:
RdJ1 wrote:You're right, but I would 'Nyquist Groepen informatie' not change from English version ('Nyquist Show Groups Info'), as it's a name.

But thanks for the good Dutch version!
Yes I know but for the understanding part (as what it does) is it better to change it also. But I get your point..
OK

But I want to suggest something for the mod-user: you can use this mod together with Auto Group mod. I tried it, it works very good.

And something for the mod-writer:

When a user joins a group with a rank and he doesn't have his own special rank, his special rank will be set to the group-rank and than it will be displayed twice (one for the user, one for the group).
User avatar
Nyquist
Registered User
Posts: 70
Joined: Sat Dec 16, 2006 2:09 pm
Location: Italy

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by Nyquist »

RdJ1 wrote: And something for the mod-writer:

When a user joins a group with a rank and he doesn't have his own special rank, his special rank will be set to the group-rank and than it will be displayed twice (one for the user, one for the group).
right. I didn't think about this. I need to work on it. Will fix for the next release.
FlexyClown
Registered User
Posts: 88
Joined: Thu May 13, 2004 7:20 pm

Re: [BETA] Nyquist Show Groups Info (multiple ranks)

Post by FlexyClown »

How many additional SQL queries does this perform?

Also, if user is a member of the default group, registered users, which has the default rank structure e.g.

0-10 posts = *
11 - 20 posts = **
21 - 30 posts = ***

etc and then a user is made a member of say, gold group, it is more than likely that you will have the gold group shown on the legend of logged on members. Surely the member is going to want to reflect this by having a different coloured username in the legend, so they change their default group to gold group. The problem is now when you view posts from that user the default rank structure is no longer displayed as it is overwritten by the users default group rank. Surely the default rank group should still be displayed?

Obviously the way round this is to go to the user and set their rank to no special rank assigned. Now when viewing topics we have the default rank shown, the gold group rank shown and in the online user legend the user is shown as a member of gold group.

Make sense?!?
Last edited by FlexyClown on Mon Feb 04, 2008 7:20 pm, edited 2 times in total.

Return to “[3.0.x] Abandoned MODs”