Small tweak to the default template.
[elgg.git] / _rss / styles.xsl
blob92e962bad102ae9958c4d0f6f5440382d5a535be
1 <?php
3 // XSL template
5 require("../includes.php");
6 header("Content-type: text/xml; charset=utf-8");
8 global $page_owner;
10 $title = gettext("RSS Management");
11 $subelgg = gettext("To add this feed to your resources page, click here.");
12 $subother = gettext("To add this feed to an external RSS aggregator, click the link that corresponds to your aggregator:");
13 $gubbins = gettext("Summary");
14 $headertitle = gettext("This is an RSS feed for ");
15 $exit = gettext("Didn't mean to come here? Click to exit!");
17 echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
21 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
23 <xsl:template match="/">
24 <html>
25 <head>
26 <title><?php echo $title; ?></title>
27 <style type="text/css">
29 body{
30 padding: 0;
31 font-family: arial, verdana, helvetica, sans-serif;
32 color: #333;
33 background: #fff;
34 width:100%;
35 margin:auto;
36 font-size:80%;
39 a {
40 text-decoration: none;
41 color: #7289AF;
42 font-family:verdana, arial, helvetica, sans-serif;
43 font-size:100%;
47 p {
48 font-size: 100%;
51 h1 {
52 margin:0px 0px 15px 0px;
53 padding:0px;
54 font-size:120%;
55 font-weight:900;
59 h2 {
60 margin:0px 0px 5px 0px;
61 padding:0px;
62 font-size:100%
66 h3 {
67 margin:0px 0px 5px 0px;
68 padding:0px;
69 font-size:100%
72 h4 {
73 margin:0px 0px 5px 0px;
74 padding:0px;
75 font-size:100%
78 h5 {
79 margin:0px 0px 5px 0px;
80 padding:0px;
81 color:#1181AA;
82 background:#fff;
83 font-size:100%
86 img {
87 border:0px;
90 blockquote {
91 padding: 0 1pc 1pc 1pc;
92 border: 1px solid #ddd;
93 background-color: #F0F0F0;
94 color:#000;
95 background-image: url("<?php echo $CFG->wwwroot; ?>_templates/double-quotes.png");
96 background-repeat: no-repeat;
97 background-position: -10px -7px;
100 /*---------------------------------------
101 Wraps the entire page
102 -----------------------------------------*/
104 #container {
105 margin: 0 auto;
106 width: 100%;
107 min-width: 750px;
110 /*---------------------------------------------
111 HEADER
112 ------------------------------------------------*/
114 #header {
115 width: 100%;
116 background-color: #1181AA;
117 color: #333333;
118 border: 0px solid #ccc;
119 border-bottom: 4px solid #FAC83D;
120 padding: 0px;
121 margin: 0px;
122 text-align: left;
125 #header h1 {
126 padding: 0 0 4px 0;
127 margin: 0px 0 0 10px;
128 background-color: #1181AA;
129 color: #fff;
130 text-align: left;
131 font-size:140%;
132 font-weight:normal;
135 #header h2 {
136 padding: 0 0 7px 0;
137 margin: 0 0 0 20px;
138 font-weight: normal;
139 background-color: #1181AA;
140 color: #fff;
141 border: none;
142 font-family: "Lucida Grande", arial, sans-serif;
143 font-size:120%;
146 #intro {
147 padding:10px;
150 #actions {
151 padding:10px;
152 text-align: center;
155 #actions p {
156 text-align: center;
159 #external {
160 padding:10px;
163 #gubbins {
164 padding:10px;
165 background:#fff;
168 #subscribe {
169 width: 307px;
170 height: 91px;
171 /*border:1px solid #4473A1;*/
172 /*padding:15px 0;*/
173 text-align:center;
174 font-size:1.15em;
175 font-weight:bold;
176 font-size:140%;
177 /* -moz-border-radius: 0.5em;*/
180 #subscribe a {
181 background-image: url(<?php echo $CFG->wwwroot; ?>_rss/subscribe.png);
182 background-repeat: no-repeat;
183 display: block; width: 307px; height: 91px; padding:15px 0 0 0;
186 #subscribe a:hover {
187 background: url(<?php echo $CFG->wwwroot; ?>_rss/subscribe-high.png);
188 background-repeat: no-repeat;
189 display: block; width: 307px; height: 91px; padding:15px 0 0 0;
192 #mistake {
193 width: 307px;
194 height:91px;
195 /*border:1px solid #E504BD; */
196 text-align:center;
197 font-size:1.15em;
198 font-weight:bold;
199 font-size:140%;
200 /* -moz-border-radius: 0.5em; */
203 #mistake a {
204 background-image: url(<?php echo $CFG->wwwroot; ?>_rss/mistake.png);
205 background-repeat: no-repeat;
206 display: block; width: 307px; height: 91px; padding:15px 0 0 0;
209 #mistake a:hover {
210 background: url(<?php echo $CFG->wwwroot; ?>_rss/mistake-high.png);
211 background-repeat: no-repeat;
212 display: block; width: 307px; height: 91px; padding:15px 0 0 0;
217 </style>
218 </head>
219 <body>
220 <?php
222 $url = $CFG->wwwroot.optional_param('url','',PARAM_LOCALURL);
223 $rssurl = $CFG->wwwroot.optional_param('rssurl','',PARAM_LOCALURL);
225 $output = <<< END
226 <div id="header"><!-- start header -->
227 <h1>$headertitle <xsl:value-of select="rss/channel/title"/></h1>
228 </div><!-- end header -->
230 END;
232 if (logged_on) {
234 $subscribeurl = url . "_rss/subscriptions.php?profile_name=" . $_SESSION['username'];
236 $output .= <<< END
238 <div id="actions">
240 <div id="subscribe"><a href="{$subscribeurl}&amp;url=$rssurl&amp;action=subscribe-new">$subelgg</a></div>
241 </p>
244 <div id="mistake"><a href="javascript:history.go(-1)">$exit</a></div>
245 </p>
246 </div>
248 END;
252 $output .= <<< END
254 <div id="external">
256 $subother
257 </p>
258 <ul>
259 <li><a href="http://www.bloglines.com/sub/$rssurl"><img src="http://solosub.com/img/bloglines.png" alt="Bloglines" /></a></li><li>
260 <a href="http://add.my.yahoo.com/rss?url=$rssurl"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif" alt="My Yahoo" /></a> </li><li>
261 <a href="http://my.msn.com/addtomymsn.armx?id=rss&amp;ut=$rssurl&amp;tt=CENTRALDIRECTORY&amp;ru=http://rss.msn.com'"><img src="http://solosub.com/img/mymsn.gif" alt="MyMSN" /></a></li><li>
262 <a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=$rssurl"><img src="http://www.newsgator.com/images/ngsub1.gif" alt="Newsgator" /></a> </li>
263 <li><a target="_blank" href="http://solosub.com/sub/$rssurl">Syndicate in any reader via <img src="http://solosub.com/feed_button.gif" alt="SoloSub" /></a></li>
264 </ul>
265 </div>
266 <hr />
267 <div id="gubbins">
268 <h2>$gubbins</h2>
269 <h3><xsl:value-of select="rss/channel/title"/></h3>
270 <h4><xsl:value-of select="rss/channel/description"/></h4>
271 <ul>
272 <xsl:for-each select="rss/channel/item">
273 <li>
274 <p><xsl:value-of select="title"/>
275 <a><xsl:attribute name="href">
276 <xsl:value-of select="link"/></xsl:attribute>
277 &gt;&gt;
278 </a></p>
279 <xsl:for-each select="enclosure">
280 <p>File:
281 <a><xsl:attribute name="href">
282 <xsl:value-of select="@url"/></xsl:attribute>
283 <xsl:value-of select="@url"/>
284 </a> (<xsl:value-of select="@type"/>)
285 </p>
286 </xsl:for-each>
287 </li>
288 </xsl:for-each>
289 </ul>
290 </div>
292 END;
294 echo $output;
297 </body>
298 </html>
299 </xsl:template>
301 </xsl:stylesheet>