[RC]Multiple ranks (not linked to usergroups) - 1.01

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Goztow » Sat May 31, 2008 4:02 pm

No, the changes are already implemented in the prosilver file.

The person who helped me with the modx package said it had to be done like this: not adding the code changes for prosilver as they were already in the file that was added.

Anyway, for prosilver this is what the code changes are. In memberlist_view.html,

FIND

Code: Select all

<!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF --> 
AFTER, ADD

Code: Select all

<!-- IF RANK2_TITLE --><dd style="text-align: center;">{RANK2_TITLE}</dd><!-- ENDIF -->
            <!-- IF RANK2_IMG --><dd style="text-align: center;">{RANK2_IMG}</dd><!-- ENDIF -->
            <!-- IF RANK3_TITLE --><dd style="text-align: center;">{RANK3_TITLE}</dd><!-- ENDIF -->
            <!-- IF RANK3_IMG --><dd style="text-align: center;">{RANK3_IMG}</dd><!-- ENDIF --> 
In viewtopic_body.html

FIND

Code: Select all

<!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd>{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF --> 
AFTER, ADD

Code: Select all

<!-- IF postrow.RANK2_TITLE or postrow.RANK2_IMG --><dd>{postrow.RANK2_TITLE}<!-- IF postrow.RANK2_TITLE and postrow.RANK2_IMG --><br /><!-- ENDIF -->{postrow.RANK2_IMG}</dd><!-- ENDIF -->
<!-- IF postrow.RANK3_TITLE or postrow.RANK3_IMG --><dd>{postrow.RANK3_TITLE}<!-- IF postrow.RANK3_TITLE and postrow.RANK3_IMG --><br /><!-- ENDIF -->{postrow.RANK3_IMG}</dd><!-- ENDIF --> 

Nightvice
Registered User
Posts: 66
Joined: Sat Apr 05, 2008 1:33 am

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Nightvice » Wed Jun 04, 2008 3:18 am

This mod is exactly what i'm looking for.. as our forums have different bass fishing clubs that want to display the logo of the club they belong to... i currently run this on the default ranking system, but the problem is it will display the rank image above the avatar giving it a spammy look of images on the user info bar when they post.. what would i need to change to make it look like this instead?

<username>
<avatar image>
<joined date>
<post count>
<profile fields>
<custom profile fields>
<multiple rank 1>
<multiple rank 2>
<multiple rank 3>

because the rank placement for the mod right now is

<username>
<multiple rank 1>
<multiple rank 2>
<multiple rank 3>
<avatar image>
<joined date>
<post count>
<profile fields>
<custom profile fields>

correct?


thanks for the great mod

Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Goztow » Wed Jun 04, 2008 6:07 pm

Which template do u currently use?

Nightvice
Registered User
Posts: 66
Joined: Sat Apr 05, 2008 1:33 am

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Nightvice » Wed Jun 04, 2008 8:57 pm

sorry about that.. i'm using a subsilver 2 based style

Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Goztow » Thu Jun 05, 2008 7:13 am

You'll have to move:

Code: Select all

            <!-- IF postrow.RANK_TITLE -->
                <tr>
                    <td class="postdetails">{postrow.RANK_TITLE}</td>
                </tr>
            <!-- ENDIF -->
            <!-- IF postrow.RANK_IMG -->
                <tr>
                    <td>{postrow.RANK_IMG}</td>
                </tr>
            <!-- ENDIF -->
            
            <!-- IF postrow.RANK2_TITLE -->
            <tr>
                    <td class="postdetails" align="center">{postrow.RANK2_TITLE}</td>
                </tr>
            <!-- ENDIF -->
            <!-- IF postrow.RANK2_IMG -->
                <tr>
                    <td align="center">{postrow.RANK2_IMG}</td>
                </tr>
            <!-- ENDIF -->
            
            <!-- IF postrow.RANK3_IMG -->
                <tr>
                    <td>{postrow.RANK3_IMG}</td>
                </tr>
            <!-- ENDIF -->
            
            <!-- IF postrow.RANK3_TITLE -->
                <tr>
                    <td class="postdetails">{postrow.RANK3_TITLE}</td>
                </tr>
            <!-- ENDIF --> 
after

Code: Select all

                    <!-- BEGIN custom_fields -->
                        <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
                    <!-- END custom_fields -->
                </span> 
You should try to "read" the <!-- IF blabla --> <!-- ENDIF --> - statements, tyhey make it pretty clear.

Stoutanator
Registered User
Posts: 4
Joined: Thu Jun 05, 2008 5:26 pm

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Stoutanator » Thu Jun 05, 2008 5:29 pm

Wow great mod Goz. I plan on customizing it more adding more slots. (I plan on selling VIP :)) You really helped me but giving me the base of the script. Thank ya very much!

Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Goztow » Thu Jun 05, 2008 6:09 pm

It's a piece of cake to add more ranks :). Don't forget to also add them in the database ;).

Stoutanator
Registered User
Posts: 4
Joined: Thu Jun 05, 2008 5:26 pm

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Stoutanator » Thu Jun 05, 2008 6:38 pm

Yeah. Is it any different when installing on different templates?

Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Goztow » Fri Jun 06, 2008 8:42 am

Most templates are either based on subsilver2 or on prosilver. So you should be able to use the code i implemented.

If your template is very different, then just find the code related to showing the rank and copy-paste it and change "rank" to "rank2", ... If needed, you can post your template files here so i can have a look.

Stoutanator
Registered User
Posts: 4
Joined: Thu Jun 05, 2008 5:26 pm

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Stoutanator » Fri Jun 06, 2008 7:09 pm

I'm having a bit of a problem. I think I have done everything right. I've added new tables into the database, ive changed all the files and stuff. Yet when I put a rank in for rank 3 - rank 3-9 become rank 3 and they won't change unless i change rank 3. And when I change rank 3 obviously they become that rank. I have 6 userbars of the same rank :P Any suggestions? I have no clue where I went wrong.

Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Goztow » Fri Jun 06, 2008 8:30 pm

Very hard to say :S. I'd need all the code you changed in the admin files. Only two of those, though: acp_users.php and acp_users.html.

Nightvice
Registered User
Posts: 66
Joined: Sat Apr 05, 2008 1:33 am

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Nightvice » Sat Jun 07, 2008 4:35 pm

thanks Goztow , i will try it out

satandream
Registered User
Posts: 383
Joined: Thu Mar 06, 2008 12:47 pm

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by satandream » Sat Jun 07, 2008 7:40 pm

I got this error when i am in ACP

Code: Select all

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /var/www/vhosts/dreambox-center.com/httpdocs/forum/includes/acp/acp_users.php on line 1612
line 1612 acp_users.php

Code: Select all

,
//multiple ranks mod by Goz
'S_RANK2'			=> true,
'S_RANK2_OPTIONS'	=> $s_rank2_options,
'S_RANK3'			=> true,
'S_RANK3_OPTIONS'	=> $s_rank3_options

Stoutanator
Registered User
Posts: 4
Joined: Thu Jun 05, 2008 5:26 pm

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Stoutanator » Sun Jun 08, 2008 3:22 am

satandream wrote:I got this error when i am in ACP

Code: Select all

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /var/www/vhosts/dreambox-center.com/httpdocs/forum/includes/acp/acp_users.php on line 1612
line 1612 acp_users.php

Code: Select all

,
//multiple ranks mod by Goz
'S_RANK2' => true,
'S_RANK2_OPTIONS' => $s_rank2_options,
'S_RANK3' => true,
'S_RANK3_OPTIONS' => $s_rank3_options
Thats easy. After

Code: Select all

'S_RANK3_OPTIONS' => $s_rank3_options
add a ")" minus the quotes. Well I hope thats the case.

-Aaron

Nightvice
Registered User
Posts: 66
Joined: Sat Apr 05, 2008 1:33 am

Re: [beta]Multiple ranks (not linked to usergroups) - 0.91

Post by Nightvice » Sun Jun 08, 2008 12:03 pm

Goztow - Thanks very much for the help.. i have successfully installed the mod to my forums thats using a Avalon Style template (subsilver 2) but had to change the code a bit to match my template style.. it looks like this

Code: Select all

				    <!-- IF postrow.RANK_TITLE --><div class="posterrank">{postrow.RANK_TITLE}</div><!-- ENDIF -->
				    <!-- IF postrow.RANK_IMG --><div class="postrankimg">{postrow.RANK_IMG}</div><!-- ENDIF -->
                    <!-- IF postrow.RANK2_TITLE --><div class="postdetails">{postrow.RANK2_TITLE}</div><!-- ENDIF -->
                    <!-- IF postrow.RANK2_IMG --><div class="postrankimg">{postrow.RANK2_IMG}<!-- ENDIF -->
					<!-- IF postrow.RANK3_TITLE --><td class="postdetails">{postrow.RANK3_TITLE}</td><!-- ENDIF --> 
					<!-- IF postrow.RANK3_IMG --><div class="postrankimg">{postrow.RANK3_IMG}</td><!-- ENDIF -->

one more question, if i wanted to add more ranks.. say 6 in total by adding 3 more.. would this be possible? and what would i need to change..

thanks again in advance

Locked

Return to “[3.0.x] MODs in Development”