Mercurial > repos > phpBB-MODs > Special_And_Normal_Rank_Images
comparison Install.xml @ 1:26a2404a2f38
Initial commit of v1.0.1 instructions
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 07 Jun 2009 17:55:54 +0000 |
parents | |
children | 4d1dd45e6549 |
comparison
equal
deleted
inserted
replaced
0:3e2c3e355f94 | 1:26a2404a2f38 |
---|---|
1 <?xml version="1.0" encoding="utf-8" standalone="yes"?> | |
2 <?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?> | |
3 <!--For security purposes, please check: http://www.phpbb.com/mods/ for the | |
4 latest version of this MOD. Although MODs are checked before being | |
5 allowed in the MODs Database there is no guarantee that there are no | |
6 security problems within the MOD. No support will be given for MODs not | |
7 found within the MODs Database which can be found at | |
8 http://www.phpbb.com/mods/--> | |
9 <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.1.xsd"> | |
10 | |
11 <header> | |
12 <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> | |
13 <title lang="en-gb">Special and Normal Rank Images</title> | |
14 <description lang="en-gb">This MOD will allow users with special ranks (e.g. Administrators) to have a normal rank image in addition to their special rank image in topics and on their profile page.</description> | |
15 <author-notes lang="en-gb"><![CDATA[While this mod doesn't have to be installed along-side the "Multi-Race Rank Theme" mod, it is compatible with the mod and can be used to compliment it. Instructions on how to alter the Multi-Race Rank Theme mod to allow users with special ranks to choose a theme can be found in the /contrib folder. | |
16 | |
17 The styling used by this mod is entirely arbitrary and was included as an example. You may wish to use different HTML in memberlist_view.html and viewtopic_body.html.]]></author-notes> | |
18 <author-group> | |
19 <author> | |
20 <realname>IBBoard</realname> | |
21 <email>phpbb@ibboard.co.uk</email> | |
22 <username>IBBoard</username> | |
23 <homepage>http://www.ibboard.co.uk</homepage> | |
24 </author> | |
25 </author-group> | |
26 <link-group> | |
27 <link type="template" href="subsilver2.xml" lang="en-gb">subsilver2</link> | |
28 <link type="contrib" href="contrib/Install.xml" lang="en-gb">Multi-Race Rank Theme MOD integration</link> | |
29 </link-group> | |
30 <mod-version>1.0.1</mod-version> | |
31 <installation> | |
32 <level>intermediate</level> | |
33 <time>600</time> | |
34 <target-version>3.0.1</target-version> | |
35 </installation> | |
36 <history> | |
37 <entry> | |
38 <date>2008-01-09</date> | |
39 <rev-version>1.0.1</rev-version> | |
40 <changelog lang="en-gb"> | |
41 <change>No code changes - convert instructions to less semantically rich MODX 1.2.1 format</change> | |
42 </changelog> | |
43 </entry> | |
44 <entry> | |
45 <date>2008-01-08</date> | |
46 <rev-version>1.0.0</rev-version> | |
47 <changelog lang="en-gb"> | |
48 <change>No code changes - first release</change> | |
49 </changelog> | |
50 </entry> | |
51 <entry> | |
52 <date>2008-05-12</date> | |
53 <rev-version>0.1.5</rev-version> | |
54 <changelog lang="en-gb"> | |
55 <change>Fix: Stop users without a special rank showing their posting rank twice when SPECIAL_RANK_AS_EXTRA is set to true</change> | |
56 </changelog> | |
57 </entry> | |
58 <entry> | |
59 <date>2008-05-09</date> | |
60 <rev-version>0.1.4b</rev-version> | |
61 <changelog lang="en-gb"> | |
62 <change>Update: Add ability to have the special rank show as the 'extra' rank to allow admins to have their admin rank in a different location to their post rank (add new change to includes/constants.php and overhaul changes in viewtopic.php and memberlist.php)</change> | |
63 </changelog> | |
64 </entry> | |
65 <entry> | |
66 <date>2008-05-05</date> | |
67 <rev-version>0.1.3b</rev-version> | |
68 <changelog lang="en-gb"> | |
69 <change>Fix: Move mis-placed instruction from a template file to memberlist.php and make sure instruction doesn't match multiple locations</change> | |
70 <change>Change: Separate out Subsilver instructions</change> | |
71 </changelog> | |
72 </entry> | |
73 <entry> | |
74 <date>2008-04-13</date> | |
75 <rev-version>0.1.2b</rev-version> | |
76 <changelog lang="en-gb"> | |
77 <change>Fix: "Undeclared index" warnings that were reported in viewtopic.php when viewing guest posts (added setting of blank defaults for guests)</change> | |
78 </changelog> | |
79 </entry> | |
80 <entry> | |
81 <date>2008-04-13</date> | |
82 <rev-version>0.1.1b</rev-version> | |
83 <changelog lang="en-gb"> | |
84 <change>Initial release</change> | |
85 </changelog> | |
86 </entry> | |
87 </history> | |
88 </header> | |
89 <action-group> | |
90 <open src="includes/constants.php"> | |
91 <edit> | |
92 <find><![CDATA[?>]]></find> | |
93 <action type="before-add"><![CDATA[// Special and normal rank images | |
94 define('SHOW_SPECIAL_AS_EXTRA', false); //Set to true if you want topics and profiles to show the special ranks, e.g. Administrator, as the 'extra' rank | |
95 ]]> | |
96 </action> | |
97 </edit> | |
98 </open> | |
99 <open src="includes/functions_display.php"> | |
100 <edit> | |
101 <find><![CDATA[/** | |
102 * Get user avatar]]></find> | |
103 <action type="before-add"><![CDATA[/** | |
104 * Get user's additional (normal) rank title and image if they have a special rank | |
105 * | |
106 * @param int $user_rank the current stored users rank id | |
107 * @param int $user_posts the users number of posts | |
108 * @param string &$rank_title the rank title will be stored here after execution | |
109 * @param string &$rank_img the rank image as full img tag is stored here after execution | |
110 * @param string &$rank_img_src the rank image source is stored here after execution | |
111 * | |
112 */ | |
113 function get_user_additional_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src) | |
114 { | |
115 if (!empty($user_rank)) | |
116 { | |
117 //Always pass 0 to save duplicating get_user_rank and getting the special rank back | |
118 get_user_rank(0, $user_posts, $rank_title, $rank_img, $rank_img_src); | |
119 } | |
120 } | |
121 ]]> | |
122 </action> | |
123 </edit> | |
124 </open> | |
125 <open src="memberlist.php"> | |
126 <edit> | |
127 <find><![CDATA[ if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_user'))]]></find> | |
128 <action type="before-add"><![CDATA[ $extra_rank_title = $extra_rank_img = $extra_rank_img_src = ''; | |
129 | |
130 if (defined('SHOW_SPECIAL_AS_EXTRA') && SHOW_SPECIAL_AS_EXTRA) | |
131 { | |
132 $extra_rank_title = $rank_title; | |
133 $extra_rank_img = $rank_img; | |
134 $extra_rank_img_src = $rank_img_src; | |
135 $rank_title = $rank_img = $rank_img_src = ''; | |
136 | |
137 get_user_additional_rank($data['user_rank'], $data['user_posts'], $rank_title, $rank_img, $rank_img_src); | |
138 } | |
139 else | |
140 { | |
141 get_user_additional_rank($data['user_rank'], $data['user_posts'], $extra_rank_title, $extra_rank_img, $extra_rank_img_src); | |
142 } | |
143 ]]></action> | |
144 </edit> | |
145 <edit> | |
146 <find><![CDATA[ 'ICQ_STATUS_IMG' => (!empty($data['user_icq']))]]></find> | |
147 <action type="before-add"><![CDATA[ | |
148 'EXTRA_RANK_TITLE' => $extra_rank_title, | |
149 'EXTRA_RANK_IMG' => $extra_rank_img, | |
150 'EXTRA_RANK_IMG_SRC'=> $extra_rank_img_src,]]></action> | |
151 </edit> | |
152 </open> | |
153 <open src="styles/prosilver/template/memberlist_view.html"> | |
154 <edit> | |
155 <find><![CDATA[ <!-- IF RANK_IMG --><dd style="text-align: center;">{RANK_IMG}</dd><!-- ENDIF -->]]></find> | |
156 <action type="after-add"><![CDATA[ | |
157 <!-- IF EXTRA_RANK_TITLE --><dd style="text-align: center;">{EXTRA_RANK_TITLE}</dd><!-- ENDIF --> | |
158 <!-- IF EXTRA_RANK_IMG --><dd style="text-align: center;">{EXTRA_RANK_IMG}</dd><!-- ENDIF -->]]> | |
159 </action> | |
160 </edit> | |
161 <edit> | |
162 <find><![CDATA[ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE --> <!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->]]></find> | |
163 <action type="after-add"><![CDATA[ | |
164 <!-- IF EXTRA_RANK_TITLE --><dt> </dt> <dd>{EXTRA_RANK_TITLE}</dd><!-- ENDIF --> | |
165 <!-- IF EXTRA_RANK_IMG --><dt> </dt> <dd>{EXTRA_RANK_IMG}</dd><!-- ENDIF -->]]></action> | |
166 </edit> | |
167 </open> | |
168 <open src="styles/prosilver/template/viewtopic_body.html"> | |
169 <edit> | |
170 <find><![CDATA[ <!-- 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 -->]]></find> | |
171 <action type="after-add"><![CDATA[ <!-- IF postrow.EXTRA_RANK_TITLE or postrow.EXTRA_RANK_IMG --><dd>{postrow.EXTRA_RANK_TITLE}<!-- IF postrow.EXTRA_RANK_TITLE and postrow.EXTRA_RANK_IMG --><br /><!-- ENDIF -->{postrow.EXTRA_RANK_IMG}</dd><!-- ENDIF -->]]> | |
172 </action> | |
173 </edit> | |
174 </open> | |
175 <open src="viewtopic.php"> | |
176 <edit> | |
177 <find><![CDATA[ 'sig' => '',]]></find> | |
178 <action type="before-add"><![CDATA[ | |
179 'extra_rank_title' => '', | |
180 'extra_rank_image' => '', | |
181 'extra_rank_image_src' => '',]]></action> | |
182 </edit> | |
183 <edit> | |
184 <find><![CDATA[ 'username' => $row['username'],]]></find> | |
185 <action type="before-add"><![CDATA[ | |
186 'extra_rank_title' => '', | |
187 'extra_rank_image' => '', | |
188 'extra_rank_image_src' => '',]]></action> | |
189 </edit> | |
190 <edit> | |
191 <find><![CDATA[ if (!empty($row['user_allow_viewemail']) || $auth->acl_get('a_email'))]]></find> | |
192 <action type="before-add"><![CDATA[ | |
193 if (defined('SHOW_SPECIAL_AS_EXTRA') && SHOW_SPECIAL_AS_EXTRA) | |
194 { | |
195 $user_cache[$poster_id]['extra_rank_title'] = $user_cache[$poster_id]['rank_title']; | |
196 $user_cache[$poster_id]['extra_rank_image'] = $user_cache[$poster_id]['rank_image']; | |
197 $user_cache[$poster_id]['extra_rank_image_src'] = $user_cache[$poster_id]['rank_image_src']; | |
198 $user_cache[$poster_id]['rank_title'] = $user_cache[$poster_id]['rank_image'] = $user_cache[$poster_id]['rank_image_src'] = ''; | |
199 | |
200 get_user_additional_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']); | |
201 } | |
202 else | |
203 { | |
204 get_user_additional_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['extra_rank_title'], $user_cache[$poster_id]['extra_rank_image'], $user_cache[$poster_id]['extra_rank_image_src']); | |
205 } | |
206 ]]></action> | |
207 </edit> | |
208 <edit> | |
209 <find><![CDATA[ 'RANK_IMG_SRC' => $user_cache[$poster_id]['rank_image_src'],]]></find> | |
210 <action type="after-add"><![CDATA[ | |
211 'EXTRA_RANK_TITLE' => $user_cache[$poster_id]['extra_rank_title'], | |
212 'EXTRA_RANK_IMG' => $user_cache[$poster_id]['extra_rank_image'], | |
213 'EXTRA_RANK_IMG_SRC'=> $user_cache[$poster_id]['extra_rank_image_src'],]]></action> | |
214 </edit> | |
215 </open> | |
216 </action-group> | |
217 </mod> |