From a5472764c9bcd3eda58540e2cc97c5a42bb1bc1c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 10 Aug 2007 06:22:04 +0100 Subject: [PATCH] add XSL stylesheet to generated feeds --- functions.php | 6 +- images/active_tab_new.png | Bin 0 -> 287 bytes images/feed-icon-64x64.png | Bin 0 -> 3015 bytes images/ttrss_logo_blackred.png | Bin 0 -> 5908 bytes images/ttrss_logo_blackred.svg | 144 +++++++++++++++++++++++++++++++++ rss.xsl | 59 ++++++++++++++ utility.css | 43 ++++++++++ xsl_mop-up.js | 86 ++++++++++++++++++++ 8 files changed, 336 insertions(+), 2 deletions(-) create mode 100644 images/active_tab_new.png create mode 100644 images/feed-icon-64x64.png create mode 100644 images/ttrss_logo_blackred.png create mode 100644 images/ttrss_logo_blackred.svg create mode 100644 rss.xsl create mode 100644 xsl_mop-up.js diff --git a/functions.php b/functions.php index 7a959153..eb14f52e 100644 --- a/functions.php +++ b/functions.php @@ -2722,9 +2722,11 @@ $feed_site_url = $qfh_ret[2]; $last_error = $qfh_ret[3]; -# if (!$feed_site_url) $feed_site_url = "http://localhost/"; +// if (!$feed_site_url) $feed_site_url = "http://localhost/"; - print " + print " + + $feed_title $feed_site_url diff --git a/images/active_tab_new.png b/images/active_tab_new.png new file mode 100644 index 0000000000000000000000000000000000000000..a08308c09bb3bed4b3741dadae5f6a488181c11b GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^tUxTs!2~3;Wt?9DDYhhUcNd2LAh=-f^2tCE&H|6f zVg?3oVGw3ym^DWND9B#o>FdgVomG%aSoaj~!XBWIY>8_`iF1B#Zfaf$gL6@8Vo7R> zLV0FMhC)b2s)Dd_Vb?nWtjZ4(|Kdd#4itO|E6oLn$IR}9^Y_Q{lng>%5~Lsvp#QgxBG9t b{|EDZ-V~nsJ43$$ox|Yi>gTe~DWM4ff{SNv literal 0 HcmV?d00001 diff --git a/images/feed-icon-64x64.png b/images/feed-icon-64x64.png new file mode 100644 index 0000000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2cJE!1~vSZzAhs<8pp|UQ^Xg*)s1K{{xVo#8fvPPU`>w002ov JPDHLkV1m)$@_zsT literal 0 HcmV?d00001 diff --git a/images/ttrss_logo_blackred.png b/images/ttrss_logo_blackred.png new file mode 100644 index 0000000000000000000000000000000000000000..a9b081ab46b76e3a26de7d886c8654ae3f117c74 GIT binary patch literal 5908 zcmV+v7whPWP)t4ZxFhGFFBft?s5{!go@|a}a zubxTQ{euLP>7L0<2oE9ObNU=kRsDYbt53S7s;jCCiV%XXQf_YU7b=x1SuD?Pw_Ee` z^E12bX5G4^4!B$L^Yh1C?U=fCeM#1p&g63W;Khp<4;RZ@x^!uISKg~zzo?sgw>r|L zhR!fdX0Kko*2-iu-oKF3>Eu?dSn<278`{mGZtmT>8fx34$J~4Gy~)|x*>e9vt5&W0 z`6|YAv#FbVx30J(*E)c1b*o!fUS0Z*?sB+juWtRK4!CnyJDzS` zf9lePo}Zt8XIJ{`R%q(x-mQ+*r49W`i(!}^0B(~?rHN9hRL*hS4*-5-S=N26W4n>n z&ApSN=>!1DkVtgUYJ0)ua)RTm0Db~+7J7Z>Mq4zk1&|6L1{zH-5CS+H767#Xet=$Y z@i(F7&71eVPN(y694CM9!3UE@jvOgy{2MlGXsD{HGWe%E91dAyW8*}YWh($+;lhP) zXf&FM5{X1GgKV?ePA*%v>{0*p+}zxaTCH}Ne>%_eQoG&0Y5DTyuQ3eMCpI?ry~xPO z+fq_eqT}M?G*YRQs;sOu{rvOKZnN23RbOBK2+Oj9;p^PFbDxinj-C?{5#jOAb2^

?4o4ZV{RzDCX_f1-@_7?wiKko5yadGcywc1;QaG%Ap>`(rF z=FXivH#$1{nJdWsA8XdEc{`AOhnhNdB_bp5g9tO2&ByTh=T86tXj%=mdNN{SCO|4p zgy{&olXIjiUP+0HXDcY=dCz<)&--{ z2Df_;>gv`3_zrq~;7u(worHvhg-|MK^zN-eTABv2v1({EQV;^z?aipKx8w9_JL>A3 za5zq*q2ZtKdUryvcjB$L-nu|KsjXYL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pBNxdnG3dH?XH}@-}o3ck&sZ>kcZa1}e?_R+&QFV2- q#B4VI`X_^~L#b4%#ogSmjs723GNK4dIUd9S0000 + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + tiny tiny + rss + + diff --git a/rss.xsl b/rss.xsl new file mode 100644 index 00000000..04da62d3 --- /dev/null +++ b/rss.xsl @@ -0,0 +1,59 @@ + + + + + + + + + <xsl:value-of select="rss/channel/title"/> + + + + + + +

+ +
+ + feed icon + +

+ +

This is an RSS feed exported from + Tiny Tiny RSS. + You must install a news aggregator to subscribe to it. + This feed contains the following items:

+ + + + +

+ +
+ +
+ +
+ + +

Extra...

+
+ +
+ +
+ +
+ + + + + + + diff --git a/utility.css b/utility.css index d6cac4f2..b94b0d5d 100644 --- a/utility.css +++ b/utility.css @@ -76,3 +76,46 @@ h2 { border-color : black; border-style : solid; */ } + +div.rss h1 { + border-width : 0px 0px 1px 0px; + border-color : gray; + border-style : dotted; + color : gray; + margin-right : 90px; +} + +div.rss h2 { + font-size : 12pt; + margin : 0px; +} + +div.rss a.extlink { + color : gray; + border-width : 0px 0px 1px 0px; + border-color : #778899; + border-style : dotted; + font-size : 9pt; +} + +div.rss p.description { + color : gray; + font-size : 9pt; +} + +div.rss p.content { + margin-left : 2em; + +} + +div.rss img.feedicon { + float : right; +} + +div.rss hr { + border-width : 0px 0px 1px 0px; + border-style : dashed; + border-color : #e0e0e0; +} + + diff --git a/xsl_mop-up.js b/xsl_mop-up.js new file mode 100644 index 00000000..87c96709 --- /dev/null +++ b/xsl_mop-up.js @@ -0,0 +1,86 @@ +// -*-coding: latin-1;-*- +// Time-stamp: "2006-05-17 22:06:46 ADT" sburke@cpan.org + +// A workaround for XSL-to-XHTML systems that don't +// implement XSL 'disable-output-escaping="yes"'. +// +// sburke@cpan.org, Sean M. Burke. +// - I hereby release this JavaScript code into the public domain. + +var is_decoding; +var DEBUG = 0; + +function complaining (s) { alert(s); return new Error(s,s); } + +if(!( document.getElementById && document.getElementsByName )) + throw complaining("Your browser is too old to render this page properly." + + " Consider going to getfirefox.com to upgrade."); + +function check_decoding () { + var d = document.getElementById('cometestme'); + if(!d) { + throw complaining("Can't find an id='cometestme' element?"); + } else if(!('textContent' in d)) { + // It's a browser with a halfassed DOM implementation (like IE6) + // that doesn't implement textContent! Assume that if it's that + // dumb, it probably doesn't implement disable-content-encoding. + + } else { + var ampy = d.textContent; + if(DEBUG > 1) { alert("Got " + ampy); } + + if(ampy == undefined) throw complaining("'cometestme' element has undefined text content?!"); + if(ampy == '' ) throw complaining("'cometestme' element has empty text content?!" ); + + if (ampy == "\x26" ) { is_decoding = true; } + else if (ampy == "\x26amp;" ) { is_decoding = false; } + else { throw complaining('Insane value: "' + ampy + '"!'); } + } + + var msg = + (is_decoding == undefined) ? "I can't tell whether the XSL processor supports disable-content-encoding!D" + : is_decoding ? "The XSL processor DOES support disable-content-encoding" + : "The XSL processor does NOT support disable-content-encoding" + ; + if(DEBUG) alert(msg); + return msg; +} + + +function go_decoding () { + check_decoding(); + + if(is_decoding) { + DEBUG && alert("No work needs doing -- already decoded!"); + return; + } + + var to_decode = document.getElementsByName('decodeme'); + if(!( to_decode && to_decode.length )) { + DEBUG && alert("No work needs doing -- no elements to decode!"); + return; + } + + if(!( ( "innerHTML" in to_decode[0]) && ( "textContent" in to_decode[0]) )) + throw complaining( "Your JavaScript version doesn't implement DOM " + + "properly enough to show this page correctly. " + + "Consider going to getfirefox.com to upgrade."); + + var s; + for(var i = to_decode.length - 1; i >= 0; i--) { + s = to_decode[i].textContent; + + if( + s == undefined || + (s.indexOf('&') == -1 && s.indexOf('<') == -1) + ) { + // the null or markupless element needs no reworking + } else { + to_decode[i].innerHTML = s; // that's the magic + } + } + + return; +} + +//End -- 2.39.5