Changeset 1381
- Timestamp:
- 03/04/07 04:50:05 (2 years ago)
- Files:
-
- feedmelinks/modules/main-interface.inc.php (modified) (3 diffs)
- feedmelinks/modules/news.inc.php (modified) (1 diff)
- feedmelinks/portal-uncached.php (modified) (3 diffs)
- feedmelinks/script/funcs.js (modified) (1 diff)
- feedmelinks/style/main.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/modules/main-interface.inc.php
r1379 r1381 14 14 else echo "ERROR: running $qs"; 15 15 ?> 16 < bigstyle='margin-left: 6px;'>16 <h2 style='margin-left: 6px;'> 17 17 You have <?= number_format( $num_links ) ?> links and <?= number_format( $num_tags ) ?> tags. 18 18 <p/> 19 19 <a href="/export">Export a copy of your links</a> 20 </ big>20 </h2> 21 21 <?php 22 22 } … … 104 104 105 105 <div id="rightColumn"> 106 107 <?php 108 $width = 342; 109 include( "$modules/news.inc.php" ); 110 ?> 106 111 107 112 <?php include( "$modules/my-recent.inc.php" ); ?> … … 110 115 111 116 <?php include( "$modules/random-links.inc.php" ); ?> 112 113 <div id="news" class="box"> 114 <?php include( "$modules/news-divs.inc.php" ); ?> 115 </div> 117 116 118 </div> 117 119 feedmelinks/modules/news.inc.php
r1377 r1381 1 <?php 2 include_once( "utils.inc.php" ); 3 $path = get_webserver_root() . "/lib/magpie-rss"; 4 require_once("$path/rss_fetch.inc"); 5 6 $url = "http://blog.feedmelinks.com/rss"; 7 $width = $width ? $width : 250; 8 9 $format = $format ? $format : "divs"; 10 11 ?> 12 <div id="newsfeed" class="box" style="width: <?= $width ?>px;"> 13 14 <?php 15 if( $_COOKIE["show_newsfeed"] != "false" ) { 16 ?> 17 18 <?php 19 if ( $url ) { 20 $rss = fetch_rss( $url ); 21 echo "<div class='subhead'><div style='float: left;'><a style='color: white;' href='http://blog.feedmelinks.com/'>" . preg_replace( "/Blog/", "News", $rss->channel['title']) . "</a></div><div style='float: right'> 22 (<a class='subtle' href='javascript:show_news()'>to hide, just click</a>) 23 <input type='checkbox' onChange='javascript:hide_news();'/> 24 </div><br/></div>"; 25 #echo "<ul>"; 26 $c = 0; 27 foreach ($rss->items as $item) { 28 $href = $item['link']; 29 $title = $item['title']; 30 $class = $c % 2 ? "r1" : "r0"; 31 $class = $c == sizeof( $rss->items ) - 1 ? $class . " last" : $class; 32 echo "<div class='$class'><a href=$href>$title</a></div>"; 33 #echo "<li><a href=$href>$title</a></li>"; 34 $c++; 35 } 36 #echo "</ul>"; 37 } 38 ?> 39 40 <?php 41 } else { 42 ?> 43 44 <div id="ihatecss" class="r0 last" > 45 <div style="float: left;"> 46 (<a class="subtle" href="javascript:show_news()">To show the recent news box again, just click</a>) 47 </div> 48 <div style="float: right;"> 49 <input type="checkbox" onChange="javascript:show_news();"/> 50 </div> 51 <br /> 52 </div> 53 54 <?php 55 } 56 ?> 57 58 </div> 59 60 <script type="text/javascript"> 61 function show_news() { 62 set_cookie( "show_newsfeed", "true", 5, "/", ".feedmelinks.com" ); 63 location.href = "/" ; 64 } 65 function hide_news() { 66 set_cookie( "show_newsfeed", "false", 30, "/", ".feedmelinks.com" ); 67 68 var my_oncomplete = function() { removeElement( 'newsfeed' ); }; 69 var myFx = new Fx.Style('newsfeed', 'opacity', {duration:2000,onComplete:my_oncomplete} ).custom(1,0); 70 } 71 72 </script> feedmelinks/portal-uncached.php
r1329 r1381 34 34 35 35 <div class="title box center" style="border: inherit;"> 36 <h1 style="color: #ff6600"> Feed Me Links!</h1>36 <h1 style="color: #ff6600"><a href="/" class="hot">Feed Me Links!</a></h1> 37 37 <span class="header"><small>Social Bookmarking since 2002</small> 38 38 </span> … … 227 227 </div> 228 228 229 <?php 230 $width = 340; 231 include( "$modules/news.inc.php" ); 232 ?> 233 229 234 <?php 230 235 echo get_their_links_html( "New Links" ); … … 249 254 </div> 250 255 <% include( "$modules/highest-linking-users.inc.php"); %> 251 </div>252 253 <div id="news" class="box">254 <% include( "$modules/news-divs.inc.php" ); %>255 256 </div> 256 257 feedmelinks/script/funcs.js
r1350 r1381 87 87 } 88 88 89 function set_cookie( name, value, num_days, path, domain, secure ) { 90 var today = new Date(); 91 today.setTime( today.getTime() ); 92 93 if ( num_days ) 94 num_days = num_days * 1000 * 60 * 60 * 24; 95 var expires_date = new Date( today.getTime() + (num_days) ); 96 97 document.cookie = name + "=" +escape( value ) + 98 ( ( num_days ) ? ";expires=" + expires_date.toGMTString() : "" ) + 99 ( ( path ) ? ";path=" + path : "" ) + 100 ( ( domain ) ? ";domain=" + domain : "" ) + 101 ( ( secure ) ? ";secure" : "" ); 102 } 103 feedmelinks/style/main.css
r1352 r1381 241 241 } 242 242 div.r1 { 243 background-color: # E0E0E0;243 background-color: #e7e7e7; 244 244 } 245 245 … … 377 377 background-color: #EEEEEE; 378 378 } 379 380 .newsfeed ul li { 381 color: #ff6600; 382 list-style-type: disc; 383 margin-left: -25px; 384 padding-left: 0px; 385 }