changeset 5:85b6a2858cd5

* Add Subsilver template code no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Wed, 17 Jun 2009 15:16:50 +0000
parents a11f14a0b16e
children ba0b22afa613
files Install.xml contrib/SpecialAndNormalRanksIntegration.xml subsilver2.xml
diffstat 3 files changed, 108 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Install.xml	Mon Jun 15 18:35:58 2009 +0000
+++ b/Install.xml	Wed Jun 17 15:16:50 2009 +0000
@@ -14,7 +14,7 @@
 		<description lang="en-gb">This MOD will show a progress bar for each user, showing how far they have progressed towards the next rank in a rank set.</description>
 		<author-notes lang="en-gb"><![CDATA[This mod behaves in the same way as Smix's Rank Progress Bar mod, but has been rewritten for efficiency, additional features and compatibility with other mods. Thanks to Smix for writing the original and to youngjediknight for first pointing me to it.
 
-If you don't want the progress bar to appear in all of the locations below (e.g. you just want it in a topic but not in PMs, profile view or members list) then just ignore the changes to the relevant template (.html) file.
+The styling used by this mod is entirely arbitrary and was included as an example. You may wish to use different HTML and CSS for your template. If you don't want the progress bar to appear in all of the locations below (e.g. you just want it in a topic but not in PMs, profile view or members list) then just ignore the changes to the relevant template (.html) file.
 
 Note: If you are also installing my "Multi-Race Rank Themes" MOD then install the other mod first and then this mod. Because the additional parameter to the get_user_rank function is optional for the Multi-Race Rank Themes mod it must be the last parameter in the list.]]></author-notes>
 		<author-group>
@@ -26,6 +26,7 @@
 			</author>
 		</author-group>
 		<link-group>
+			<link type="template" href="subsilver2.xml" lang="en-gb">subsilver2</link>
 			<link type="contrib" href="contrib/SpecialAndNormalRanksIntegration.xml" lang="en-gb">Special and Normal Ranks MOD integration</link>
 		</link-group>
 		<mod-version>0.2</mod-version>
@@ -40,6 +41,7 @@
 				<rev-version>0.2</rev-version>
 				<changelog lang="en-gb">
 					<change>Add: Add templating for Memberlist, profiles and PMs</change>
+					<change>Add: Add subsilver2 stylings</change>
 					<change>Fix: Add missing lang value</change>
 					<change>Fix: Add extra checks to progress calculation to handle pre-existing values and the final rank in a scheme</change>
 				</changelog>
--- a/contrib/SpecialAndNormalRanksIntegration.xml	Mon Jun 15 18:35:58 2009 +0000
+++ b/contrib/SpecialAndNormalRanksIntegration.xml	Wed Jun 17 15:16:50 2009 +0000
@@ -31,7 +31,7 @@
 		</installation>
 		<history>
 			<entry>
-				<date>2009-06-03</date>
+				<date>2009-06-15</date>
 				<rev-version>0.2</rev-version>
 				<changelog lang="en-gb">
 					<change>Update: Replace large "find and replace" with small modifications in functions_display.php</change>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/subsilver2.xml	Wed Jun 17 15:16:50 2009 +0000
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
+<!--For security purposes, please check: http://www.phpbb.com/mods/ for the
+      latest version of this MOD. Although MODs are checked before being
+      allowed in the MODs Database there is no guarantee that there are no
+      security problems within the MOD. No support will be given for MODs not
+      found within the MODs Database which can be found at
+      http://www.phpbb.com/mods/-->
+<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.1.xsd">
+
+	<header>
+		<license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
+		<title lang="en-gb">Special and Normal Rank Images - Subsilver2 style</title>
+		<description lang="en-gb">This MOD will show a progress bar for each user, showing how far they have progressed towards the next rank in a rank set. These instructions modify subsilver2-based templates.</description>
+		<author-notes lang="en-gb"><![CDATA[The styling used by this mod is entirely arbitrary and was included as an example. You may wish to use different HTML and CSS for your template.]]></author-notes>
+		<author-group>
+			<author>
+				<realname>IBBoard</realname>
+				<email>phpbb@ibboard.co.uk</email>
+				<username>IBBoard</username>
+				<homepage>http://www.ibboard.co.uk</homepage>
+			</author>
+		</author-group>
+		<link-group>
+			<link type="parent" href="Install.xml" lang="en-gb">Main instructions</link>
+		</link-group>
+		<mod-version>0.2</mod-version>
+		<installation>
+			<level>intermediate</level>
+			<time>180</time>
+			<target-version>3.0.5</target-version>
+		</installation>
+		<history>
+			<entry>
+				<date>2009-06-15</date>
+				<rev-version>0.2</rev-version>
+				<changelog lang="en-gb">
+					<change>Add initial instructions for subsilver2</change>
+				</changelog>
+			</entry>
+		</history>
+	</header>
+	<action-group>
+		<open src="styles/subsilver2/template/memberlist_view.html">
+			<edit>
+				<find><![CDATA[
+			<!-- IF RANK_IMG -->
+				<tr>
+					<td align="center">{RANK_IMG}</td>
+				</tr>
+			<!-- ENDIF -->]]></find>
+				<action type="after-add"><![CDATA[
+			<!-- IF PERCENTAGE_PROGRESS_NUM > -1 -->
+				<tr>
+					<td>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{PERCENTAGE_PROGRESS}</span></div></td>
+				</tr>
+			<!-- ENDIF -->]]>
+				</action>
+			</edit>
+		</open>
+		<open src="styles/subsilver2/template/viewtopic_body.html">
+			<edit>
+				<find><![CDATA[			<!-- IF postrow.RANK_IMG -->
+				<tr>
+					<td>{postrow.RANK_IMG}</td>
+				</tr>
+			<!-- ENDIF -->]]></find>
+				<action type="after-add"><![CDATA[
+			<!-- IF postrow.PERCENTAGE_PROGRESS_NUM > -1 -->
+				<tr>
+					<td>{L_PROGRESS_TO_NEXT_RANK}<div class="rank_progress_bar"><span style="width:{postrow.PERCENTAGE_PROGRESS_NUM}%" class="bar"></span><span>{postrow.PERCENTAGE_PROGRESS}</span></div></td>
+				</tr>
+			<!-- ENDIF -->]]>
+				</action>
+			</edit>
+		</open>
+		<open src="styles/subsilver2/themes/stylesheet.css">
+			<edit>
+				<find><![CDATA[/* Misc
+ ------------ */]]></find>
+				<action type="after-add"><![CDATA[.rank_progress_bar {
+	border: 1px solid #A9B8C2;
+	margin-right: 1em;
+	position: relative;
+	clear:right
+}
+.rank_progress_bar span {
+	z-index:2;
+	position:relative
+}
+.rank_progress_bar .bar {
+	background-color: #fff;
+	border-right: 1px solid #A9B8C2;
+	display:block;
+	height: 100%;
+	z-index:1;
+	position:absolute;
+	top: 0;
+	left: 0
+}]]></action>
+			</edit>
+		</open>
+	</action-group>
+</mod>