slitaz-forge rev 42

people: improve main page and add profile.php info
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 30 22:33:58 2011 +0200 (2011-03-30)
parents 482a0e54ae16
children 4a50c3b5987f
files people/index.php people/profile.php people/slitaz.css tank/files/var/spool/cron/crontabs/root
line diff
     1.1 --- a/people/index.php	Mon Mar 28 15:18:40 2011 +0200
     1.2 +++ b/people/index.php	Wed Mar 30 22:33:58 2011 +0200
     1.3 @@ -51,7 +51,7 @@
     1.4  			code name <a href="http://tank.slitaz.org/">Tank</a>, can 
     1.5  			have a public directory to put personal stuff related to SliTaz.
     1.6  			This Public directory can be reached with URLs in the form of: 
     1.7 -			http://people.slitaz.org/~contributors/. More information on 
     1.8 +			http://people.slitaz.org/~name/. More information on 
     1.9  			<a href="http://www.slitaz.org/">SliTaz Website</a> and
    1.10  			<a href="http://labs.slitaz.org/">SliTaz Labs</a>.
    1.11  		</p>
    1.12 @@ -63,16 +63,48 @@
    1.13  
    1.14  <h2>SliTaz people</h2>
    1.15  
    1.16 +<style type="text/css">
    1.17 +ul span { 
    1.18 +	color: #666; 
    1.19 +	font-size: 11px; 
    1.20 +	font-weight: normal;
    1.21 +	display: block;
    1.22 +	padding: 2px 0;
    1.23 +}
    1.24 +ul { list-style-type: square; }
    1.25 +ul span a { color: #666; }
    1.26 +</style>
    1.27 +
    1.28  <ul>
    1.29  <?php
    1.30  if ($handle = opendir('/home')) {
    1.31 +	$scn_url = 'http://scn.slitaz.org/members';
    1.32  	while (false !== ($dir = readdir($handle))) {
    1.33  		if ($dir != "." && $dir != "..") {
    1.34  			$pub = "/home/$dir/Public";
    1.35  			$user = "$dir";
    1.36  			if (file_exists($pub)) {
    1.37 -			echo "	<li><a href=\"/~$user/\">$user</a></li>\n";
    1.38 +				echo "	<li><a href=\"/~$user/\">$user</a>\n";
    1.39 +				if (file_exists("$pub/profile.php")) {
    1.40 +					require_once("$pub/profile.php");
    1.41 +					echo "<span>Name: $name";
    1.42 +					if (! empty($location)) { 
    1.43 +						echo " | Location: $location"; 
    1.44 +					}
    1.45 +					if (! empty($scn_user)) { 
    1.46 +						echo " | <a href=\"$scn_url/$scn_user/\">SCN activity</a>"; 
    1.47 +					}
    1.48 +					if (! empty($skills)) { 
    1.49 +						echo " | Skills: $skills"; 
    1.50 +					}
    1.51 +					echo "</span>";
    1.52 +					if (! empty($wall)) { 
    1.53 +						echo "<span>$wall</span>";
    1.54 +					}
    1.55 +				}
    1.56 +				echo "</li>";
    1.57  			}
    1.58 +			
    1.59  		}
    1.60  	}
    1.61  	closedir($handle);
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/people/profile.php	Wed Mar 30 22:33:58 2011 +0200
     2.3 @@ -0,0 +1,13 @@
     2.4 +<?php
     2.5 +
     2.6 +// Your custom SliTaz profile at http://people.slitaz.org/. This file must
     2.7 +// be located at ~/Public/profile.php. You must at least provide your real
     2.8 +// name and you can use the $wall variable for a personnal message.
     2.9 +
    2.10 +$name = "Real Name";
    2.11 +$location = "";
    2.12 +$scn_user = "";
    2.13 +$skills = "";
    2.14 +$wall = "";
    2.15 +
    2.16 +?>
     3.1 --- a/people/slitaz.css	Mon Mar 28 15:18:40 2011 +0200
     3.2 +++ b/people/slitaz.css	Wed Mar 30 22:33:58 2011 +0200
     3.3 @@ -152,16 +152,16 @@
     3.4  	text-align: justify;
     3.5  }
     3.6  
     3.7 -#news li {
     3.8 +.news li {
     3.9  	list-style-type: square;
    3.10  	border-bottom: 1px dotted #BEBEBE;
    3.11  	margin-left: -25px;
    3.12  	padding: 4px 0px 4px 0px;
    3.13  }
    3.14  
    3.15 -#news a, .feed-grid a { text-decoration: none; }
    3.16 -#news p a { text-decoration: underline; }
    3.17 -#news p a:hover { text-decoration: none; }
    3.18 +.news a, .feed-grid a { text-decoration: none; }
    3.19 +.news p a { text-decoration: underline; }
    3.20 +.news p a:hover { text-decoration: none; }
    3.21  #twitter { margin: 20px 0; }
    3.22  #gallery { text-align: center; }
    3.23  
    3.24 @@ -185,15 +185,28 @@
    3.25  	border: 1px solid #ddd;
    3.26  }
    3.27  
    3.28 -.feed-grid { height: 180px; overflow: hidden; text-align: left; }
    3.29 -.feed-grid h3 { 
    3.30 -	margin: 15px 0 0; font-size: 16px; 
    3.31 -	padding: 0 22px;
    3.32 -	background: url(images/feed.png) no-repeat left; }
    3.33 -.feed-grid span { font-size: 10px; color: #888; margin-left: 24px; }
    3.34 -.feed-grid ul { color: #666; }
    3.35 -.feed-grid a { color: #666; }
    3.36 -.feed-grid a:hover { color: blue; }
    3.37 +/* Activity Box */
    3.38 +
    3.39 +.activity { 
    3.40 +	margin: 0 0 20px; 
    3.41 +	background: #eaeaea; 
    3.42 +	padding: 5px 2px 0; 
    3.43 +	border: 1px solid #ddd; 
    3.44 +}
    3.45 +.activity div { padding: 5px 10px; background: #fff; margin-top: 5px; }
    3.46 +.activity p { margin: 0; padding: 5px 10px; font-weight: bold; }
    3.47 +.activity a { text-decoration: none; }
    3.48 +.activity ul { list-style-type: none; 
    3.49 +	margin: 4px 0; padding: 0 4px; line-height: 150%; }
    3.50 +.activity_more { text-align: right;  }
    3.51 +.activity_more a { font-weight: normal; color: #000; padding: 0 4px; }
    3.52 +.activity_more a:hover { text-decoration: underline; }
    3.53 +
    3.54 +.activity span, .news span { 
    3.55 +	color: #666; 
    3.56 +	font-size: 11px; 
    3.57 +	font-weight: normal;
    3.58 +}
    3.59  
    3.60  /* Button */
    3.61  
    3.62 @@ -213,7 +226,8 @@
    3.63  
    3.64  /* Round corner */
    3.65  
    3.66 -#block_nav, pre, .box, .searchbox, .button a, #twitter {
    3.67 +#block_nav, pre, .box, .searchbox, .button a, #twitter, .activity,
    3.68 +.activity div {
    3.69  	-moz-border-radius: 4px;
    3.70  	-webkit-border-radius: 4px;
    3.71  	border-radius: 4px;
     4.1 --- a/tank/files/var/spool/cron/crontabs/root	Mon Mar 28 15:18:40 2011 +0200
     4.2 +++ b/tank/files/var/spool/cron/crontabs/root	Wed Mar 30 22:33:58 2011 +0200
     4.3 @@ -9,6 +9,7 @@
     4.4  
     4.5  # Update SliTaz stuff
     4.6  15 02 * * * /usr/bin/tazdev update-www
     4.7 +*/20 * * * * /home/slitaz/www/website/libs/get-latest.sh
     4.8  20 02 * * * /usr/bin/tazpkg-web cooking
     4.9  30 02 * * * /usr/bin/tazpkg-web stable
    4.10