Changeset 246

Show
Ignore:
Timestamp:
02/13/06 20:57:42 (3 years ago)
Author:
ben
Message:

Improved styling for XSL / working in Internet Explorer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/.htaccess

    r241 r246  
    1010 
    1111RewriteRule ^([0-9\-]+)\.css$ _templates/css.php?template=$1 
     12 
     13RewriteRule ^(.+)\/rssstyles.xsl$ _rss/styles.xsl?rssurl=$1&url=$1 
    1214 
    1315RewriteRule ^([A-Za-z0-9]+)(\/)?$ profile/index.php?profile_name=$1 
  • devel/_files/rss2.php

    r243 r246  
    3737                                $rssdescription = sprintf(gettext("Files for %s, hosted on %s."),$name,$sitename); 
    3838                                $output .= <<< END 
    39 <?xml-stylesheet type="text/xsl" href="{$url}_rss/styles.xsl?url=$mainurl&rssurl=$rssurl"?> 
     39<?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?> 
    4040<rss version='2.0'   xmlns:dc='http://purl.org/dc/elements/1.1/'> 
    4141        <channel xml:base='$mainurl'> 
  • devel/_rss/styles.xsl

    r241 r246  
    88        global $page_owner; 
    99 
    10         $intro = gettext("This is an RSS feed - an XML document that allows you to automatically keep track of website content. It is not meant to be read directly; the intention is for it to be read in a feed aggregator such as your Elgg resources page."); 
     10        $title = gettext("RSS Management"); 
    1111        $subelgg = gettext("To add this feed to your resources page, click here."); 
    1212        $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!"); 
    1316 
    1417        echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"; 
     
    2023<xsl:template match="/"> 
    2124        <html> 
     25        <head> 
     26        <title><?php echo $title; ?></title> 
     27        <style type="text/css"> 
     28 
     29body{ 
     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%; 
     37        } 
     38 
     39a { 
     40                text-decoration: none; 
     41                color: #7289AF; 
     42                font-family:verdana, arial, helvetica, sans-serif; 
     43                font-size:100%; 
     44 
     45        } 
     46 
     47p { 
     48        font-size: 100%; 
     49} 
     50 
     51h1 { 
     52        margin:0px 0px 15px 0px; 
     53        padding:0px; 
     54        font-size:120%; 
     55        font-weight:900; 
     56} 
     57 
     58 
     59h2 { 
     60        margin:0px 0px 5px 0px; 
     61        padding:0px; 
     62        font-size:100% 
     63} 
     64 
     65 
     66h3 { 
     67        margin:0px 0px 5px 0px; 
     68        padding:0px; 
     69        font-size:100% 
     70} 
     71 
     72h4 { 
     73        margin:0px 0px 5px 0px; 
     74        padding:0px; 
     75        font-size:100% 
     76} 
     77 
     78h5 { 
     79        margin:0px 0px 5px 0px; 
     80        padding:0px; 
     81        color:#1181AA; 
     82        background:#fff; 
     83        font-size:100% 
     84} 
     85 
     86img { 
     87  border:0px; 
     88} 
     89 
     90blockquote { 
     91        padding: 0 1pc 1pc 1pc; 
     92        border: 1px solid #ddd; 
     93       background-color: #F0F0F0; 
     94        color:#000; 
     95        background-image: url("/_templates/double-quotes.png"); 
     96        background-repeat: no-repeat; 
     97        background-position: -10px -7px; 
     98} 
     99 
     100/*--------------------------------------- 
     101Wraps the entire page  
     102-----------------------------------------*/ 
     103 
     104#container { 
     105        margin: 0 auto; 
     106        width: 100%; 
     107        min-width: 750px; 
     108        } 
     109 
     110/*--------------------------------------------- 
     111HEADER  
     112------------------------------------------------*/ 
     113 
     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; 
     123        } 
     124 
     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; 
     133        } 
     134 
     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%; 
     144        } 
     145 
     146#intro { 
     147   padding:10px; 
     148} 
     149 
     150#actions { 
     151   padding:10px; 
     152   text-align: center; 
     153} 
     154 
     155#actions p { 
     156   text-align: center; 
     157} 
     158 
     159#external { 
     160   padding:10px; 
     161} 
     162 
     163#gubbins { 
     164   padding:10px; 
     165   background:#fff; 
     166} 
     167 
     168#subscribe { 
     169width: 307px; 
     170height: 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;*/ 
     178} 
     179 
     180#subscribe a { 
     181  background-image: url(/_rss/subscribe.png); 
     182  background-repeat: no-repeat; 
     183  display: block; width: 307px; height: 91px; padding:15px 0 0 0; 
     184} 
     185 
     186#subscribe a:hover { 
     187   background: url(/_rss/subscribe-high.png); 
     188   background-repeat: no-repeat; 
     189   display: block; width: 307px; height: 91px;  padding:15px 0 0 0; 
     190} 
     191 
     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; */ 
     201 } 
     202 
     203#mistake a { 
     204   background-image: url(/_rss/mistake.png); 
     205   background-repeat: no-repeat; 
     206  display: block; width: 307px; height: 91px; padding:15px 0 0 0; 
     207} 
     208 
     209#mistake a:hover { 
     210   background: url(/_rss/mistake-high.png); 
     211   background-repeat: no-repeat; 
     212   display: block; width: 307px; height: 91px; padding:15px 0 0 0; 
     213 
     214} 
     215 
     216 
     217</style> 
     218         </head> 
    22219                <body> 
    23220<?php 
    24221 
    25                 $url = $_GET['url']; 
    26                 $rssurl = $_GET['rssurl']; 
     222                $url = url . $_GET['url']; 
     223                $rssurl = url . $_GET['rssurl']; 
    27224 
    28225                $output = <<< END 
    29  
     226               <div id="header"><!-- start header --> 
     227                <h1>$headertitle <xsl:value-of select="rss/channel/title"/></h1> 
     228                </div><!-- end header --> 
     229                 
     230END; 
     231                 
     232                if (logged_on) { 
     233 
     234                $subscribeurl = url . "_rss/subscriptions.php?profile_name=" . $_SESSION['username']; 
     235                 
     236                $output .= <<< END 
     237                 
     238                <div id="actions">     
    30239                <p> 
    31                        $intro 
     240                     <div id="subscribe"><a href="{$subscribeurl}&amp;url=$rssurl&amp;action=subscribe-new">$subelgg</a></div> 
    32241                </p> 
     242               
     243                <p> 
     244                        <div id="mistake"><a href="javascript:history.go(-1)">$exit</a></div> 
     245                </p> 
     246              </div> 
    33247                 
    34248END; 
    35                  
    36                 if (logged_on) { 
    37  
    38                 $subscribeurl = url . "_rss/subscriptions.php?profile_name=" . $_SESSION['username']; 
     249 
     250                } 
    39251                 
    40252                $output .= <<< END 
    41253                 
    42                 <p> 
    43                         <a href="{$subscribeurl}&amp;url=$rssurl&amp;action=subscribe-new">$subelgg</a> 
    44                 </p> 
    45                  
    46 END; 
    47  
    48                 } 
    49                  
    50                 $output .= <<< END 
    51                  
     254                <div id="external"> 
    52255                <p> 
    53256                        $subother 
    54257                </p> 
    55258                <ul> 
    56                         <li>Subscribe in <a href="http://www.bloglines.com/sub/$rssurl">Bloglines</a></li><li>  
    57                         Add to <a href="http://add.my.yahoo.com/rss?url=$rssurl">MyYahoo!</a> </li><li>  
    58                         Add to <a href="http://my.msn.com/addtomymsn.armx?id=rss&amp;ut=$rssurl&amp;tt=CENTRALDIRECTORY&amp;ru=http://rss.msn.com'">MyMSN</a></li><li>  
    59                         Add to <a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=$rssurl">Newsgator</a> </li> 
    60                         <li><a target="_blank" href="http://solosub.com/sub/$rssurl">Syndicate in any reader via SoloSub</a></li> 
     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> 
    61264                </ul> 
     265              </div> 
    62266                <hr /> 
    63         <h1><xsl:value-of select="rss/channel/title"/></h1> 
    64         <h2><xsl:value-of select="rss/channel/description"/></h2> 
    65         <ul> 
     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> 
    66272                <xsl:for-each select="rss/channel/item"> 
    67273                        <li> 
    68                                 <h3><xsl:value-of select="title"/></h3> 
    69                                 <xsl:value-of select="description"/> 
    70                                 <p><a><xsl:attribute name="href"> 
     274                                <p><xsl:value-of select="title"/> 
     275                                  <a><xsl:attribute name="href"> 
    71276                                        <xsl:value-of select="link"/></xsl:attribute>  
    72                                         <xsl:value-of select="link"/>  
     277                                        &gt;&gt; 
    73278                                        </a></p> 
    74279                                <xsl:for-each select="enclosure"> 
     
    83288                </xsl:for-each> 
    84289        </ul> 
     290        </div> 
    85291         
    86292END; 
  • devel/_weblog/rss2.php

    r243 r246  
    5454                                        $rssurl = $mainurl . "rss/" . urlencode(trim($_REQUEST['tag'])); 
    5555                                        $rssdescription = sprintf(gettext("The weblog for %s, hosted on %s."),$name,$sitename); 
     56 
     57                                        /* <?xml-stylesheet type="text/xsl" href="{$url}_rss/styles.xsl?url=$mainurl&rssurl=$rssurl"?> */ 
     58                                        /* <?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?> */ 
    5659                                        $output .= <<< END 
    57 <?xml-stylesheet type="text/xsl" href="{$url}_rss/styles.xsl?url=$mainurl&rssurl=$rssurl"?> 
     60<?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?> 
     61 
    5862<rss version='2.0'   xmlns:dc='http://purl.org/dc/elements/1.1/'>                                        
    5963        <channel xml:base='$mainurl'> 
  • devel/profile/rss2.php

    r243 r246  
    3535                                $rssdescription = sprintf(gettext("Activity for %s, hosted on %s."),$name,$sitename); 
    3636                                $output .= <<< END 
    37 <?xml-stylesheet type="text/xsl" href="{$url}_rss/styles.xsl?url=$mainurl&rssurl=$rssurl"?> 
     37<?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?> 
    3838<rss version='2.0'   xmlns:dc='http://purl.org/dc/elements/1.1/'> 
    3939        <channel xml:base='$mainurl'> 
  • devel/units/files/function_rss_publish.php

    r239 r246  
    4848                        $rssdescription = sprintf(gettext("Files for %s, hosted on %s."),$name,$sitename); 
    4949                        $output .= <<< END 
    50 <?xml-stylesheet type="text/xsl" href="{$url}_rss/styles.xsl?url=$mainurl&rssurl=$rssurl"?> 
     50<?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?> 
    5151<rss version='2.0'   xmlns:dc='http://purl.org/dc/elements/1.1/'> 
    5252        <channel xml:base='$mainurl'> 
  • devel/units/profile/function_rss_publish.php

    r239 r246  
    4848                        $rssdescription = sprintf(gettext("Activity for %s, hosted on %s."),$name,$sitename); 
    4949                        $output .= <<< END 
    50 <?xml-stylesheet type="text/xsl" href="{$url}_rss/styles.xsl?url=$mainurl&rssurl=$rssurl"?> 
     50<?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?> 
    5151<rss version='2.0'   xmlns:dc='http://purl.org/dc/elements/1.1/'> 
    5252        <channel xml:base='$mainurl'> 
  • devel/units/search/function_search_all_display_rss.php

    r241 r246  
    1717                         
    1818                        $run_result .= <<< END 
    19 <?xml-stylesheet type="text/xsl" href="{$siteurl}_rss/styles.xsl?url=$url&rssurl=$rssurl"?> 
     19<?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?> 
    2020<rss version="0.91"> 
    2121        <channel> 
  • devel/units/weblogs/function_rss_publish.php

    r239 r246  
    4747                        $rssdescription = sprintf(gettext("The weblog for %s, hosted on %s."),$name,$sitename); 
    4848                        $output .= <<< END 
    49 <?xml-stylesheet type="text/xsl" href="{$url}_rss/styles.xsl?url=$mainurl&rssurl=$rssurl"?> 
     49<?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?> 
    5050<rss version='2.0'   xmlns:dc='http://purl.org/dc/elements/1.1/'> 
    5151        <channel xml:base='$mainurl'>