just a personal cut & paste page

martedì, luglio 26, 2005

DRUPAL: PHP page snippets

PHP page snippets: putting dynamic content into your main page

Once Drupal is installed you will notice an option under CREATE CONTENT to create a PAGE. It is a standard out-of-the-box drupal feature and when creating a PAGE you have 3 filter options when submitting i.e. Filtered HTML, Full HTML or PHP.

The PHP Snippets below are intended for use within a drupal page filtered as PHP that simply enables you to "pull" specific content from your drupal database. Allowing you to create dynamic and sophisticated page layouts such those found at busy portals, such as www.mtv.com or www.yahoo.com.

Make sure you check the custom block examples as well.

  • Very simple to use and implement. Copy n paste snippets into your page
  • Allows users to insert "block style" content in the main page
  • build simple or sophisticated main page layouts with dynamic content
  • pull specific content from your drupal database to insert into a page

PLEASE NOTE! The following snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

How to insert and use the PHP Snippets in your pages

The PHP SNIPPETS come with a brief introduction on what it does and if it only works with specific versions of Drupal.

Some are very similar to how you SETUP CUSTOM BLOCKS WITH CONTENT THAT APPEAR IN THE SIDEBARS but the snippets below are intended for use within your main NODE page as opposed to your sidebars.

Once you get used to how the PHP Snippets work and if you are familiar with how to setup up a HTML table or using DIVs, you can mix snippets together in the same page creating sophisticated layouts like those found at http://www.mtv.com or http://www.yahoo.com.

  1. Go to CREATE CONTENT -->> PAGE
  2. Give your page a TITLE
  3. In the BODY text area, paste in your PHP Snippet. Make sure you include the opening and closing PHP statements and remove any extra spaces, line breaks after the final ?> which tells drupal that this is the end of the php page.
  4. Select the PHP CODE filter.
  5. Click SUBMIT or PREVIEW to view your page.

More sophisticated layout/styling of node pages

The following is intended for people not familiar with PHP coding and illustrates how to apply styling to content inserted into a page using PHP.

Here is an example of a very simple PHP snippet that displays the Site slogan.

<?php
/**
* the following displays the site slogan
*
*/
print variable_get("site_slogan", "");
?>

Click for a simple example of how to add styling to the content displayed by the php snippet .

Using some simple HTML functions, such as creating a table or using DIVS, you can start creating much more sophisticated layouts using multiple snippets in the same page. For some guidance and tips it is worth looking at a more sophisticated php Snippet that inserts the site mission and a list of upcoming events in a 2 column table side by side, followed by a list of the recent weblog entries.

!--------------!---------------!
!--------------!---------------!
!------site----!--upcoming-----!
!----mission---!---events------!
!--------------!---------------!
!--------------!---------------!
!--------------!---------------!
!----recent weblog entries-----!
!--------------!---------------!
!--------------!---------------!

How to use the PHP Snippets with the front_page.module

USING PHP SNIPPETS WITH THE FRONT_PAGE.MODULE

Probably the most common use of php snippets will be the front page of your site.

To use any of these snippets using the front_page.module (allows you to specify a "splash" page to your site and different front pages for anonymous/authenticated users) Simply follow these steps once you have the front_page.module installed properly:

Step 1: Go to ADMINISTER -->> SETTINGS -->> FRONT_PAGE

Step 2: In the teaxt areas available, paste in your PHP Snippet(s).

Step 3: Select the ALLOW EMBEDDED PHP option.

Step 4: Select if you want a FULL/THEMED Front Page.

Step 5: Click on SAVE CONFIGURATION once you are happy with your front_page settings.

A guide to submitting your own PHP snippets

Please post your own snippets up here for others and follow these simple guidelines.

  1. Click on ADD CHILD PAGE from the main page in this section (PHP PAGE SNIPPETS: PUTTING DYNAMIC CONTENT INTO YOUR MAIN PAGE ).
  2. Give your snippet a short and obvious title so it is easy for others to see what your snippet does.
  3. Please include a simple introduction at the top of your PHP Snippet which explains:
    • What the snippet does
    • Which versions of Drupal has it been tested with
    • Any extra information for newbies that you think is relevant

Countdown (x) days to a specific date and display a dynamic message

PLEASE NOTE! The following snippet is user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* This php snippet displays (x) days left to a specific event
*
*
* Change the values for keyMonth, keyDay and keyYear to suit
*
*
* Tested and works with drupal 4.6 and 4.5
*/
$keyMonth = 7;
$keyDay = 14;
$keyYear = 2005 ;
$month = date(F);
$mon = date(n);
$day = date(j);
$year = date(Y);
$hours_left = (mktime (0,0,0,$keyMonth ,$keyDay,$keyYear) - time ())/3600;
$daysLeft = ceil( $hours_left/24);
$z = (string)$daysLeft ;
if (
$z > 1) {
print
"There are <font size=\"4\" color=\"red\">" ;
print
$z;
print
"</font> days left until whatever happens</p>" ;
}
?>

Create a list of node titles of a specific type, within certain dates/times

<?php
/**
* Creates a list of node titles of a specific type, within certain dates
* with a link to each node.
*
* To change which type is listed, simply edit the $node_type string.
* To change the starting date, simply change the $start_stamp.
* To change the ending date, simply change the $end_stamp.
*
* This works with drupal 4.6
*/
$node_type = "image";
$start_stamp = 'June 9 2005';
$end_stamp  = 'June 10 2005' ;
$start_stamp = strtotime($start_stamp);
$end_stamp = strtotime($end_stamp);
$sql = "SELECT node.title, node.nid FROM node WHERE node.created < $end_stamp AND node.created > $start_stamp AND node.type = '$node_type'" ;
$output .= "<ul>";
$result = db_query($sql);
while (
$anode = db_fetch_object($result)) {
$output .= "<li>".l($anode-> title, "node/$anode->nid")."</li>";
}
$output .= "</ul>";
return
$output ;
?>

display (x) random thumbnails in a page

PLEASE NOTE! The following snippet is user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* This php snippet displays (x) random thumbnails with a link to
* the full images in a page.
*
* (assumes you already have the IMAGE.MODULE installed)
*
* To increase/decrease the number of thumbnails listed
* change the $thumbs field to suit.
*
* Tested and works with drupal 4.6
*/
$thumbs = 0;
while (
$thumbs< 10) {
$images = (image_get_random($count = 1, $tid = 0));
print
l(image_display($images[ 0], 'thumbnail'),'node/'.$images [0]->nid, array(), null, null, FALSE, TRUE);
$thumbs ++;
}
?>

Display a list of (x) most recent weblog entries

PLEASE NOTE: The php snippets are user submitted and it is impossible to check every one, so use at your own risk. For users who have setup drupal using an alternate database to the default, please note that the snippets may contain some database queries that may or may not work.

<?php
/**
* the following displays a list of the 10 most recent weblog titles
* and links to the full weblogs. If you want to increase/reduce
* the number of titles displayed..simply change $listlength value
*
* This php snippet works with drupal 4.6.
*
*/
$listlength= "10";
$output = node_title_list(db_query_range (db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), 0, $listlength));
print
$output;
?>

Display a list of (x) node titles of a specific type

<?php
/**
* Creates a list of node titles of a specific type
* with a link to each node.
*
* To change which type is listed, simply edit the $node_type string.
* To change the number of node titles listed, simply edit the $list_no number.
*
* This works with drupal 4.5 and drupal 4.6
*/
$node_type = "flexinode-1";
$list_no =5;
$sql = "SELECT node.title, node.type, node.nid FROM node WHERE node.type = '$node_type' LIMIT $list_no";
$output .= "<ul>";
$result = db_query($sql);
while (
$anode = db_fetch_object ($result)) {
$output .= "<li>" .l($anode->title , "node/$anode->nid")."</li>";
}
$output .= "</ul>";
return
$output;
?>

Display a list of (x) upcoming events in a scrolling box without javascript

PLEASE NOTE! The following snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* The following snippet displays the next 10 upcoming events
* in a scrolling box that is set in a simple DIV styled inline.
* To increase or decrease the number of events listed just change
* the $listlength value
*
* no javascript is required and the current
* height, width is 150 X 320 pixels.
* to increase decrease that simply change the values for
* the $boxheight and $boxwidth
*
* works with most popular browsers
* Tested in IE6, Mozilla Firefox 1.0 & 1.5, and NN7
*
* Tested and works with with drupal 4.5.x and Drupal 4.6.x
*
*
*/
$listlength="15";
$boxheight= "150px";
$boxwidth="320px";
print
"<h1>Upcoming Events</h1><div style=\"unicode-bidi:bidi-override; direction:rtl; display:block; width:$boxwidth; height:$boxheight; overflow:auto; padding-left:10px; border:1px solid #ba8; \"><div dir=\"ltr\"><p>" ;
print  
event_block_upcoming($limit=$listlength );
print
"</p></div></div>";
?>

Display a list of a certain content type, with teasers

<?php
/**
* This php snippet displays content of a specified type, with teasers
*
* To change the type of content listed, change the $content_type.
*
* Works with drupal 4.6
*/
  
$content_type = 'story';
  
$result1 = pager_query(db_rewrite_sql("SELECT n.nid , n.created FROM {node} n WHERE n.type = '$content_type' AND n.status = 1 ORDER BY n.created ASC"));
  while (
$node = db_fetch_object($result1)) {
    
$output .= node_view(node_load(array('nid' => $node ->nid)), 1);
  }
print
$output ;
?>

Display a list of category titles with links to the full term

Please note: These snippets are user submitted. Use at your own risk. For users who have setup Drupal using a database other than the default (MySQL), please note that the snippets may contain some database queries specific to MySQL.

<?php
/**
* Creates a list of category titles with a link to each category term.
* And the number of items in each term in brackets. (x)
*
* Category term title (x) and link to full term
* date of last update
*
*
* This works with drupal 4.6 and 4.5.
*
* If you improve this snippet please post a new comment below.
*
*/
$result = db_query("SELECT d.tid, d.name, MAX(n.created ) AS updated, COUNT(*) AS count FROM {term_data} d INNER JOIN {term_node} USING (tid) INNER JOIN {node} n USING (nid) WHERE n.status = 1 GROUP BY d.tid, d.name ORDER BY updated DESC, d.name");
  
$items = array();
  while (
$category = db_fetch_object($result)) {
    
$items[] = l ($category->name .' (' . $category->count .')', 'taxonomy/term/'. $category->tid) .'<br />' . t('%time ago', array('%time' => format_interval(time() - $category-> updated)));
  }
print
theme('item_list', $items);
?>

Display a list of node titles from a specific category

PLEASE NOTE! The following snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* Creates a list of node titles from a specific category
* with a link to each node.
*
* To change which taxonomy is listed, simply edit the $taxd_id number.
* To change the number of node titles listed, simply edit the $list_no number.
*
* This works with drupal 4.5 and drupal 4.6
*/
$taxo_id = 1;
$list_no =5;
$sql = "SELECT node.title, node.nid FROM node INNER JOIN term_node ON node.nid = term_node.nid WHERE term_node.tid = $taxo_id LIMIT $list_no";
$output .= "<ul>";
$result = db_query($sql);
while (
$anode = db_fetch_object ($result)) {
$output .= "<li>" .l($anode->title , "node/$anode->nid")."</li>";
}
$output .= "</ul>";
return
$output;
?>

Display a list of the next (x) upcoming events

PLEASE NOTE! The following snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* the following displays a list of the 10 upcoming event titles and
* links to their full event nodes. To increase/decrease
* the number of titles displayed..simply change the $listlength value
*
* Works with drupal 4.5.x and drupal 4.6
*/
  
$listlength= "10";
  print
event_block_upcoming($limit = $listlength);
?>

Display a list with last post w/links

This is a very useful code (at least for me). It shows a list of node types, node posts count, last post date and a link to the last node published.

<?php
$header
= array ('Content', 'Count', 'Last post date','Last post');
$rows = array();
$q = "SELECT n.type as tipo,count(n.type) as cant,max(DATE_FORMAT(FROM_UNIXTIME(n.changed ), '%Y-%m-%d')) as lastpost
FROM
{node} n
group by n.type"
;
$result = db_query ($q);
while (
$row = db_fetch_object ( $result ) )
{
  
$q = "SELECT max(n.nid) as max FROM {node} n where n.type='$row- >tipo'";
  
$result2 = db_query ($q );
  
$r = db_fetch_object ( $result2 );
  
$q = "SELECT n.nid as nid,n.title as title FROM {node} n where n.nid=$r->max";
  
$result2 = db_query ($q);
  
$r = db_fetch_object ( $result2 );
  
$link = l($r->title, "node/".$r->nid);
  
$rows[] = array ( 'data' => array ( t($row ->tipo), $row->cant ,$row->lastpost, $link  )) ;
}
if (!
$rows) {
  
$rows[] = array(array('data' => t('No log data available.'), 'colspan' => 2));
}
print
theme('table', $header , $rows);
?>

Display different page content to anonymous and authenticated users

PLEASE NOTE! The following snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* The following simple snippet
* displays different information to anonymous/logged in users within a page.
*
* This works with drupal 4.5 and drupal 4.6
*/
global $user;
if (
$user ->uid) {
    return
"This message is only visible for logged-in users.";
}
if (!
$user->uid) {
    return
"This message is only visible for not-logged-in users." ;
}
?>

Display the (x) most recent nodes in full from a specific category

PLEASE NOTE! The following snippet is user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* This php snippet displays the most recent node in full
* from a specific category
*
* To increase/decrease the number of nodes listed
* change the $list_length value to suit.
*
* Works with drupal 4.6.x & 4.5.x
*
* Snippet submitted by Robert Garrigos (robertgarrigos)
*/
$taxo_id = 10;
$list_length = 1;
$sql = "SELECT * FROM node INNER JOIN term_node ON node.nid = term_node.nid WHERE term_node.tid = $taxo_id ORDER BY node.created DESC LIMIT $list_length" ;
$result = db_query($sql );
while (
$anode = db_fetch_object($result)) {
$output .= theme('node', $anode, $teaser = TRUE, $page = FALSE);
}
print
$output;
?>

Display the (x) most recent weblog entries from a specific user

PLEASE NOTE! The following snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* the following displays a list of the 10 most recent weblog titles
* and links to the full weblogs of a certain user.
* If you want to increase/reduce
* the number of titles displayed..simply change the $listlength value
*
* for a different user change the $userid value
*
* works with drupal 4.6.
*
*/
$listlength="10";
$userid="8" ;
$output = node_title_list(db_query_range (db_rewrite_sql("SELECT n.nid, n.title, n.created FROM {node} n WHERE n.type = 'blog' AND n.uid = $userid AND n.status = 1 ORDER BY n.created DESC"), 0, $listlength));
print
$output;
?>

Display the (x) most recent weblog entries with teasers & info.

PLEASE NOTE! The following snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* This php snippet displays the 10 most recent weblog entries with
* teaser & info.
*
* To increase/decrease the number of weblogs listed
* change the $listlength field to suit.
*
* Works with drupal 4.6
*/
  
$listlength= 10;
  
$result1 = pager_query(db_rewrite_sql ("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC"), variable_get('default_nodes_main', $listlength));
  while (
$node = db_fetch_object($result1)) {
    
$output .= node_view(node_load(array('nid' => $node->nid)), 1);
  }
print
$output;
?>

Display/hide content from a specific IP address within a page

PLEASE NOTE These snippets are user submitted. Use at your own risk. For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* this Snippet allows you to display content ONLY to a visitor from
* a specific IP addresses in a page.
*
* Change the $allowed value to the IP address you want.
*
* This works with drupal 4.5 and drupal 4.6
*/
$allowed  = '100.100.100.100';
$userip = $_SERVER ['REMOTE_ADDR'];
if(
$userip == $allowed){
    print
"This content can only be viewed by the IP address you specify.";
}
?>

To reverse the situation and HIDE content to a user from a specific IP address

<?php
/**
* this Snippet allows you to hide content from a visitor at
* a specific IP addresses.
*
* Change the $hidden value to the IP address you want.
*
* This works with drupal 4.5 and drupal 4.6
*/
$hidden  = ' 100.100.100.100' ;
$userip = $_SERVER['REMOTE_ADDR' ];
if(
$userip != $hidden){
    print
"This content is displayed to everyone except the person from the IP address you specify." ;
}
?>

Insert a quicklist of recent forum topic titles and links

PLEASE NOTE! The following snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* Creates a quicklist of recent forum topic titles and a link to their
* node.
*
* works and tested with 4.6
* does not work with 4.5
*
* To increase the length of the list, change $listlength
*
*/
$listlength="10" ;
$sql = "SELECT n.nid, n.title, l.last_comment_timestamp, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND n.type='forum' ORDER BY l.last_comment_timestamp DESC";
$sql = db_rewrite_sql($sql);
$content  = node_title_list (db_query_range($sql, 0 , $listlength), t('Active forum topics:'));
if (
$content) {
  
$content .= '<div class="more-link">' . l(t('more'), 'forum', array('title' => t('Read the latest forum topics.' ))) .'</div>';
}
print
$content;
?>

Insert an image before the promoted nodes on the frontpage

The front_page module allows for the display of a customized front page. This PHP snippet keeps the original front page (containing nodes promoted to the front page) and inserts an image (or other static content) in front of it.

Prerequisite: front_page module must be installed and configured properly.
Go to ADMINISTER - SETTINGS - FRONT_PAGE, check "Allow embedded PHP code" and enter the PHP snippet into the "Front page HTML" box.

<center><img src="my_image.gif"></center>

<?php
   
print node_page_default();
?>

Tested with drupal version 4.6.0.

Insert the most recent poll

PLEASE NOTE! The PHP snippets are user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* the following displays the most recent poll
* and assumes you have the poll.module enabled
*
* Works with drupal 4.6
* Does not work with 4.5.x
*
*/
$sql = db_rewrite_sql( "SELECT MAX(n.created) FROM {node} n INNER JOIN {poll} p ON p.nid = n.nid WHERE n.status = 1 AND p.active = 1 AND n.moderate = 0");
      
$timestamp = db_result(db_query($sql ));
      if (
$timestamp) {
        
$poll = node_load (array('type' => 'poll', 'created' => $timestamp, 'moderate' => 0, 'status' => 1));
        if (
$poll->nid ) {
          
// poll_view() dumps the output into $poll->body.
          
poll_view( $poll, 1, 0, 1);
        }
      }
      print
$poll->body;
?>

maintenance redirect: automatically redirecting everyone but you away from the drupal site

PLEASE NOTE! The following snippet is user submitted. Use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* This php snippet redirects everyone but you away from the drupal site
* to a htm page. Useful for "undergoing maintenance" type occasions
*
* put this snippet at the very top of your INDEX.PHP file in your root drupal folder
* or in your front_page settings page and place your closed.html
* file in the same folder.
*
* change the your_ip address to be your IP address so you can still access the site
*
*/
$your_ip = '100.100.0.1 ';
if (
$_SERVER['REMOTE_ADDR'] != $your_ip) {
  
header ('location:closed.html');
}
?>

Printing PHP variables from GET or POST forms

PLEASE NOTE These snippets are user submitted. Use at your own risk. For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.

<?php
/**
* this Snippet illustrates how you display the values of a submitted form
* in a Drupal page.
*
* Submitted by puregin
*
* This works with drupal 4.5 and drupal 4.6
*/
print "variable1: " . $_POST["variable1"] ."<br/>";
print
"product: " . $_POST["product"] . "<br/>";
print
"size: " . $_POST[ "size"] ."<br/>";
?>

NOTES:

Change $_POST to $_GET if you used GET as your form method or if you are using a URL to set the variables. (e.g., example.com/page.php?variable1=hello )

Using more than one php snippet in the same node (or front_page)

In some circumstances, if you are using two or more php snippets in the same node - or on your front_page.module page - you need add the following line at the beginning of each php snippet you intend to use

<?php
unset ($output);
?>

why?

The reason is to avoid the problem of using the return $output; more than once in the same node. The return $output command will end the reading of code and all subsequent code or text in that node (or front_page) will be ignored.

To avoid potential problems, rather than return $output;, you can use...

<?php
print $output;
?>
...for the last line of code.

But...

With each subsequent php-generated list you create in that same node (or front_page), you will get a cumulative list -- the content generated by each additional php snippet will be added to the $output list. (For example, the second php snippet's list of posts on "apples" would be added to the first php snippet's list of posts on "oranges," when what you really want is just a list of posts on "apples.")

So how would one "clear" the output results so one can have another php snippet creating output? Start each of your subsequent snippets of php code with this:

<?php
unset ($output);
?>

This will clear the previous results so that your 2nd, 3rd ... nth list will have unique results relevant to its own query.

Thus you will be able to have several php-generated outputs on the same page (such as lists of recent posts in several different taxonomy terms) without conflict or intermingling of results.

Cresce la pressione sui musulmani italiani



Cresce la pressione sui musulmani italiani

Cresce la pressione sui musulmani italiani dopo la seconda
ondata di attentati a Londra. Due giorni fa Khaldi Samir,
l'imam della moschea di Al Huda, nel quartiere romano di
Centocelle, si è visto arrivare a casa, alle sette di
mattina, dieci agenti della polizia in borghese con un
mandato di perquisizione. Per tre ore hanno perlustrato da
cima a fondo l'appartamento di Latina dove Samir abita con
la moglie e i figli, e hanno scaricato la rubrica
telefonica dal suo cellulare. Gli agenti hanno spiegato che
stavano cercando degli indizi sugli attentati di Londra, ma
il mandato di perquisizione non indicava che l'imam era
sospettato. "Lo stato sta punendo i suoi migliori contatti
con il mondo musulmano: non ce lo saremmo mai aspettati
dall'Italia", ha commentato Samir.

International Herald Tribune, Francia



Pressure is growing on Muslims in Italy
By Elisabeth Rosenthal International Herald Tribune
MONDAY, JULY 25, 2005

ROME As a second wave of London bomb attacks hit the news Thursday, Imam Khaldi Samir clicked nervously at his office computer, next to the prayer hall at the Alhuda Islamic Cultural Association on the outskirts of Rome. Bombs in London, he has seen, produce fallout for him.
 
Just two days earlier, with Italy stepping up surveillance after the first round of London attacks, 10 plainclothes police officers with a search warrant turned up at 7 a.m. at the imam's home in Latina, 70 kilometers, or 40 miles, south of Rome. During a three-hour raid, while his children slept, they scoured the home he shares with his Italian wife, and then downloaded numbers from his cellphone.
 
The police explained that they were looking for clues related to the London bombings, although they found nothing, said the imam, who preaches to up to 800 mostly poor immigrant worshipers each week. The search warrant did not indicate that the imam himself was suspected of a crime. Instead, the police politely explained, the search was "preventive" - the warrant stating he might have "unknowingly" had contact with people connected to terrorism. Five other leaders of the Italy's Muslims were searched the same day, he said.
 
"The state is punishing its best links to the Muslim community - we never expected that the Italian state would do something like this," said Samir, a soft-spoken man in a shirt and slacks, clearly shaken by the course of events.
 
"Every day I stress the need for moderation and integration," Samir said, "but these searches bring into question my credibility in our community. People will say, 'This is your payback for your moderation.'"
 
He said such events served to radicalize young people.
 
As antiterrorism officials across Europe are intensifying their hunt to root out sleeper cells, they walk a delicate line between thwarting terrorists and radicalizing innocent Muslims who are already largely isolated and marginalized in many European nations.
 
The challenge of controlling terrorism without creating new terrorists, is particularly acute in countries like France and Italy.
 
In those two countries, large and growing Muslim populations are kept by law and by custom on the fringes of mainstream society. There are an estimated 1.5 million Muslims in Italy, a country of about 58 million people. The vast majority of the Muslims are immigrants, who have little chance of getting citizenship. Less than 10 percent have an Italian passport.
 
An official at Italy's law enforcement agency, the Ministry of the Interior, said that he did not know specifics of recent raids, but that he was "not surprised" that such searches were occurring. "This is an ongoing process," he said.
 
On Friday, Italy's Council of Ministers adopted a series of new antiterrorism provisions, which are likely to take effect soon. These include new registration requirements for Internet cafés and cellphone users, new limits on pilots licenses, and quick expulsions for foreigners considered a danger to national security or who assist in terrorist activities.
 
But the search on the imam's house occurred legally under the current rules, which give judges wide leeway in issuing warrants.
 
"What if I had reason to believe that a terrorist had gone to your house and was worried he left something - some documents or even a suitcase?" said a senior Italian antiterrorism official, explaining the search.
 
In 2001, the police searched the Alhuda center, which includes a prayer hall and a cultural center and where Arabic and Islamic culture are taught to children. Last year, they searched the home of Ben Mohamed Mohamed, the center's president.
 
But since the attacks in London, the Italian government has beefed up security measures and has also attempted to reach out to Muslims. In Michelangelo's beautiful Campidoglio, on the afternoon of the second London bombings, the city of Rome invited prominent Muslims to convey a message of coexistence.
 
"Rome is a city that it open to everybody," said Giuseppe Mannino, chairman of the City Council. "You are our brothers."
 
He shared the podium with Mahmoud Hammad Sheweita, imam of Rome's only official mosque, the Grand Mosque - an architectural masterpiece filled with light and soaring arches, which operates with the permission and cooperation of the Ministry of the Interior.
 
Samir and Mohamed listened from the back row.
 
Unlike the Alhuda center, a subterranean former warehouse where young men wander in and out all day, the luxurious official mosque is open to worshipers only on Friday.
 
For the rest of the week, its primary function is to serve as a sort of liaison between Islam and the Italian government. From here, Mario Scialoja, a former Italian diplomat and convert to Islam, who is head of the Italian branch of the World Muslim League, meets with Islamic ambassadors and lobbies Italian politicians, pushing them to allow Muslims better access to citizenship, and religious education for Muslim children.
 
Scialoja said that the worshipers in his mosque, filled on Fridays, were typical Italian Muslims - poor immigrants who come to Italy for a better existence.
 
He said that "99.7 percent of them couldn't care less about fundamentalism" and that only 4 percent of Italy's Muslims attend mosque on a regular basis.
 
While he has noted some acts of intolerance since the London bombings, he praised Giuseppe Pisanu, the interior minister, whom he meets with regularly, and he called Italy's new antiterrorism proposals "very responsible." And though he blames the U.S. invasion of Iraq for creating terrorism, he does not support an immediate withdrawal. Italy has troops in Iraq in support of the U.S.-led invasion.
 
"To stay is to feed this anger, but to leave now would create a mess," he said.
 
But his official version of Islam seems to have little resonance or even connection with Samir's prayer hall, where many worshipers speak halting Italian and the lingua franca is Arabic.
 
When Scialoja tried to form a national association of Muslim groups five years ago, "the experiment was a failure," he said, "since some groups had views I couldn't support."
 
In 2003, when the Grand Mosque expelled its new Imam for a fiery sermon that justified Palestinian bombings in Israel (though not in Italy), Alhuda's Web site posted an article defending his right to free speech.
 
In part because Italy does not recognize Islam as a religion, Samir's flock does not have a real mosque. Italian Muslims must work on their religion's holy days. As aliens, the vast majority have no right to vote.
 
"Now, with the increasing security, they search our houses - this is a very bad sign," Samir said. "We hear all about the policies on integration, but we never seen any concrete measures."
 
They remain largely outsiders and, especially now, visitors to the Alhuda center and the surrounding Islamic shops were greeted with intense suspicion. Requests to interview the Imam were met with deflections and questions: Where are you from? Why do you want him?
 
Samir, a Tunisian who has lived in Italy for 15 years, insists that he would report suspicious activity to the police.
 
Asked if anyone from the Alhuda had attended the religious schools in Pakistan that have been a breeding ground for terrorists, he said: "Not that I know of, but they certainly wouldn't tell me if they had."

venerdì, luglio 08, 2005

Fourplay - Between the Sheets (MP3 Download)
To sum up this CD in four words ... sultry, sexy, soothing, and smooth. These guys are the masters of smooth jazz and truly emphasize the super in super group.

(Total: 10 files)
01. Fourplay - Chant [6:25]
02. Fourplay - Monterey [6:12] (MP3 Download)
03. Fourplay - Between The Sheets [6:46] (MP3 Download)
04. Fourplay - Li'l Darlin' [5:16] (MP3 Download)
05. Fourplay - Flying East [6:08] (MP3 Download)
06. Fourplay - Once In The A.M. [6:31] (MP3 Download)
07. Fourplay - Gulliver [6:49] (MP3 Download)
08. Fourplay - Amoroso [5:48] (MP3 Download)
09. Fourplay - A Summer Child [5:34] (MP3 Download)
10. Fourplay - Anthem [5:40] (MP3 Download)
11. Fourplay - Song For Somalia [6:28] (MP3 Download)

Powered By Qumana
200 diggs (07.07.05)
Today 11.30
This episode covers the following digg stories: The world according to Livejournal, Flickr - London bomb blasts, HOWTO: Save nearly any multimedia file, New Firefox update system, Water that does not get things wet, Look mom! No parachute, Google maps transparencies, and Man Charged With Felony For Stealing Wi-FI.
Today 11.25
A list of default passwords for logins for different models of devices. Excellent reference as many forget to set passwords! ;D
Today 11.24
Motion Computing could ignite a new wave of enthusiasm for Tablet PCs with its new LS 800 model. The device is a full-featured Tablet PC running Windows XP and integrating a Pentium M processor in a case that is slightly larger than a pocket book.
Today 11.23
the chief executive of BP, said "if just 5 per cent of the world's electricity generating capacity was based on the new technology then by 2050 global carbon dioxide emissions could be reduced by one billion tonnes a year".
Today 11.23
Amazon recruited celebrities such as Harrison Ford, Jason Alexander and Moby to deliver products to Amazon customers across the United States, beginning today. The deliveries will be webcast on its Web page culminating with performances by Norah Jones and Bob Dylan streamed live on Amazon's home page.
Today 10.47
Maxtor / DiamondMax 10 / 160GB / 7200 / 8MB / ATA-133 / EIDE / OEM / Hard Drive...tigerdirect
Today 10.46
A great way to learn morse code is to use this new chart!
Today 10.45
A library of pre-written regular expressions that you can plug into your code. Also, features a regular expression online testing engine against inputted text or a website text. Very handy resource!
Today 10.45
TiVo said it is cutting the cost of its 40-hour Series2 digital video recorder (DVR) in half--from $199 to $99--in an effort to drive sales this summer. A representative said the dropped price will stay at $99 until August 20.
Today 10.45
Microsoft and the entertainment industry's holy grail of controlling copyright through the motherboard has moved a step closer with Intel Corp. now embedding digital rights management within in its latest dual-core processor Pentium D and accompanying 945 chipset.
Today 9.30
Just when you thought you could escape cell phones by communing with nature . . . you may need to ignore that ringing in the nearby tree.
Today 7.22
A Delaware court has agreed to an AMD request for documents to be preserved in its anti-trust suit against Intel. AMD asked the court on Friday to serve subpoenas for the preservation of documents in the possession of specified third parties so they may be used as evidence in the litigation. The court granted the request shortly after.
Today 7.18
Presenting at the Power Everywhere Forum 2005 in Japan, IBM today formally introduced a dual-core version of its PowerPC 970 (G5) processor, which could find its way into Apple Power Macs in the coming months. The 64-bit chips, code-named Antares, contain two processing units per chip, each with their own execution core and...
Today 7.18
Now your Captain N costume can finally be complete! This guy makes belt buckles from actual NES controllers. A bit pricey at $30, but the geek factor is high.
Today 7.15
Job listings for internal studio Rare confirm the software giant is making games for its archrival's latest handheld.
Today 5.16
Here you will find the 'forbidden' video clips ... all the clips (eventually) that Fox CUT from the DVDs. I'm hoping that Fox will sanction this and not ask me to remove them. However, if they ask, I will remove them. So get em quick!
Today 4.45
Having 30,000 Lego building bricks at your disposal has it's advantages..."I'm scared. You've figured out how to blend Nintendo and Legos" my girlfriend said this when she found out that I was doing this.
Today 4.30
Newegg has Mushkin 1GB PC3200 Memory for $79.95 after rebate, free shipping. $10 rebate Exp 7/23/05 Great for overclocking!
Today 4.11
Store, share and transport data with ease. Micro Vault plugs directly into your computer's USB port and acts like another drive. No cables or adaptors needed, no power cord, no driver software
Today 4.10
User's of the Internet are avoiding Fileshare,certain Websites and Changing Browser's for Fear of Adware And Spyware
Today 2.30
Maddox's latest rant about blogs and the new words coined because of them: Blogosphere, Blawg, Moblog, Podcast, etc.
Today 1.37
A PhD student in the Information and Language Processing Systems group at the University of Amsterdam has programmed a Livejournal mood tracker. Pretty interesting stuff!
Today 1.35
The Belle collaboration at the KEK laboratory in Japan has observed a rare process whereby a bottom quark decays into a down quark, researchers announced at the Lepton-Photon symposium in Uppsala in Sweden this week.
Today 1.34
Sometimes an excellent software product comes to market, gets rave reviews, and then disappears. This happens regardless of a clear need and want for the product. The problem is not specific to any particular software domain; BeOS, and Lotus Improv were both great products but seem to have nothing in common apart from being good ideas that failed.
Today 1.32
You have to try to keep the mobile out of the water, after a certain amount of time you get more things to add. Via Plastic Bugs. (I got to the red boulder)
Today 1.26
Tips for minimizing DNS cache poisoning.
Today 1.22
Between 75% and 98.8% of visitors to Web sites come from searches made at search engines. If you’re going to get high levels of traffic, and the levels of ROI you’re looking for, it’s very important that the search engines can access all the information on your site. Here is how to ensure that the engines know about all your pages.
Today 1.21
Here is a great review of the Logitech Playgear Pocket Case for the PSP. PSP 411 gave it a 99/100, and they state that this is the best case on the market at the moment. Price is $20, which is reasonable, and is strong and durable. Works as a stand, shade, and case!
Today 1.19
CompUSA has the Compaq Presario SR1010z Athlon 64 3000+ Desktop System for $360 - $50 compaq rebate - $250 CompUSA rebate = $60 + $69 shipping = $129. Great deal for a solid system. No monitor.
Today 1.10
To celebrate their 10th anniversary, C|NET compiled a list representing what they consider to be the top 10 biggest trends in downloading over the 10 years they've been around.
Today 1.02
If you have been looking into using BSD as your operating system but have been afraid to make the switch because of the intimidation of BSD, this might be the answer for you. Clean install interface and easy install manager makes this a valid replacement for any other os.
Today 0.30
simple as the title ...
Today 0.21
Email programs, such as Mail.app 2.0, are starting to get "smart" with Smart Mailboxes. Here is a new product for Tiger which allows you to organize your email intelligently.
Today 0.11
As promised, Google today released 3 Firefox extensions with the anticipated Google toolbar.
Yesterday 23.33
Computer chips that use light rather than electricity to dramatically speed computing...research efforts aimed at producing nanoscale optics could make chip-scale communications devices and scientific equipment practical within a decade.
Yesterday 23.29
Amber Mac: Here's a quick overview of the free services I've used. The summary - Dropload is awesome if you want to send files under 100MB (so if you use 'em, definitely donate to this great little service!).
Yesterday 23.10
The number of people who download free serial audio programs, or podcasts, is set to explode over the next few years, according to a new report.
Yesterday 23.10
We picked the brains of gurus and geeks to come up with our 13th annual list of upstarts who are changing the game. Today's esprit de cool runs from San Diego to Beijing and includes everything from gadgets to biotech.
Yesterday 22.44
TiVo has moved from desktop operating systems to embedded system using Linux and there are a number of people trying to hack into TiVo services. Here are a few tips before you try to do that.
Yesterday 22.40
Swiss adventurer Bertrand Piccard is constructing a solar-powered plane to fly around the world. His aim is to support sustainable development by demonstrating what renewable energy and new technologies can achieve.
Yesterday 22.32
AMDs lawsuit against Intel might serve up some drama about high-tech personalities and offer insight into the inner workings of the chip business. Industry and legal experts agree that if AMD's claims about Intel having illegally coerced its customers are true, it could be a landmark case.
Yesterday 22.02
Most medical records are currently kept on paper, with only 10 to 15 percent of U.S. physicians using electronic medical records. This is expected to save up to $74 billion per year or 5% of health care spending
Yesterday 21.59
Mobile phone manufacturer LG Electronics has agreed to use a version of the Palm OS designed by Palmsource in a future smart phone, which might be the first phone to use a Linux-based version of Palm OS that is currently under development.
Yesterday 21.15
The company whose name is nearly synonymous with Indian tech support now intends to double the size of its customer service center in ... Oklahoma City.
Yesterday 21.15
Feedburner has announced enhancements their popular SmartCast service. Podcasters can now manage all of the descriptive data for your podcast directly from Feedburner so that podcasts will be fully described in iTunes and other directory service leveraging the iTunes namespace extensions.
Yesterday 20.55
download the performances from the artists at the live 8 concerts around the world.
Yesterday 20.25
Google, Goldman Sachs Group & Hearst Corp are investing around $100 million in Current Communications Group, a start-up that offers high-speed Internet connections over electricity lines, The Wall Street Journal reported on Thursday.
Yesterday 20.23
Yahoo today launched an SMS search service very similar to a feature offered by Google. To try out the service, send a query to the short code 92466 (that spells YAHOO on most phone keyboards).A local search can be performed by simply sending a business name or type and the location such as 'pizza 90210'.
Yesterday 20.21
Wikipedia responds to London bombings with good information
Yesterday 20.17
Soon, TV stations will give up their old analog licenses and broadcast solely in digital format. This means older TV sets will no longer receive broadcast signals. Here's how you can prepare for the big changeover
Yesterday 19.33
Here's a step by step guide on how to turn your backpack into a walking wi-fi hot spot. You have the complete mechanism explained effectively.
Yesterday 19.31
Move over Wi-Fi, broadband over power lines, which allows people to get Internet access simply by plugging into the electrical outlet on their wall, could become the next super-easy way to connect to the Net.
Yesterday 19.23
Link and screen shot of the Islamic website that has claims by Al-Qaeda for responsibility of the London attack and says that Italy and Denmark are next.
Yesterday 18.32
This guy hacked a pool heater out of his barbecue grill. The device heats water 30 to 35 degrees at 3 to 4 gallons per minute flow. See link for pictures
Yesterday 16.45
"I've never walked off the set of a TV show in disgust before, but this week I did. There's a first time for everything, I guess. After enduring it for about 10 or 15 minutes it was clear that the whole situation had been a set-up from outset."
Yesterday 16.15
An organized Flickr photo collection of London's terrorist attack on July 7, 2005.
Yesterday 15.45
Instead of directing the sound for conversion to digital-to-analogue in a PC sound card, a patch for InterVideo WinDVD 5, 6 or 7 will stream the audio data directly to a .WAV file circumventing the CPPM protected AOB and VOB files. DVD-A Ripper, PPCM Ripper and DVD-A Explorer are three applications needed to complete the crack.
Yesterday 15.30
This is a link to the torrent.
Yesterday 14.30
News of several explosions across central London has quickly spread across the net as people try to get information about the chaos
Yesterday 14.15
SendThisFile enables you to easily send a large file to anyone, anywhere! It's like DropLoad but is much faster, and it has no size limit.
Yesterday 14.00
Don't know much, just switched on the TV, London tube system as apprently been shut down.Two tubes have crashed, A Bomb has blown up a bus, thats about all i know. Link goes to BBC. I don't know if it was a terrorist attack, but we'll see.
Yesterday 13.15
the Pew organization released a report (PDF) which says "18% of internet users say they have started using a different Web browser to avoid software intrusions." This was in response to the question "Have you, personally, done any of the following to avoid getting unwanted software programs on your computer?"
Yesterday 13.00
A possible photo of the Xbox 360 beta kits Microsoft just sent out to developers.
Yesterday 10.34
The much anticipated Slax Server 5.0.5 should be coming out within the next few days. SLAX SRV is a pocket operating system with many internet services ready to use. Includes DNS, DHCP, SMB, HTTP, FTP, MySQL, SMTP, POP3, IMAP, SSH.
Yesterday 10.32
If you could only buy six fonts in your entire lifetime, what would they be? An interesting question which can be a designers' nightmare!
Yesterday 10.22
If you use an Apache web server, learning how to use the .htaccess file is very powerful tool. If you don't know how to use, and want to learn more check out the article.
Yesterday 10.21
I am a Firefox guy, but after using this for a while, I think it might have some competition... It also claims to have more security than any other browser...
Yesterday 10.08
Post your mirrors dowloads here!
Yesterday 10.08
Experiments for NASA space missions have shown that edible meat can be created in a lab. Benefits are that with in-vitro lab grown meat, you could replace fatty acid Omega 6 with Omega 3, which is a healthy fat and also eliminate cholesterol."
Yesterday 10.04
Xmax Promises Better Options for Rural Internet Users In a world crowded with signals, xMax a new wireless-communications technique, will rise above the noise using just a whisper. xMax operates over the older 900 MHz band & offers speeds of 40 Mbps over distances of 15 miles better for rural areas
Yesterday 10.03
by Amana (it's Japanese)
Yesterday 9.57
The good news is that digg is now hitting all time traffic highs, and new servers are set to be installed next week. The bad news is that something had to give, so we've taken down the digg spy feature. It will be back up as soon as we can move to our new faster servers. Keeping digging. -Quickness
Yesterday 9.41
The world’s first 7-megapixel camera-embedded cell phone will hit the shelves of Korean shops today through the nation’s top wireless carrier SK Telecom.
Yesterday 9.40
Hardware locking via a dedicated chip is combined with "hardening" of the OS to restrict how memory can be accessed. Security will also be boosted using a technique dubbed User Account Protection, which aims to ensure that computers can be locked so that local users are not given full administrator access by default.
Yesterday 9.35
The "Near Me" is a creepy-looking robotic cat which can move its head, blink its eyes and wave its paws. Site in Japanese but the video is self-explanatory.
Yesterday 9.32
Team Xecuter’s mod means you can easily patch the PSP kernel to be able to boot anything you like without any type of software loader. This also means you can downgrade the PSP firmware.
Yesterday 9.30
The title pretty much says it all.
Yesterday 9.13
A lifelong computer programmer and open source author who both contributed to the Linux kernel and worked at Microsoft says he was blocked from gettinig the drugs he needed to combat his Hepatitis C (HCV) condition because of copyright laws.
Yesterday 8.15
A healthy baby girl has been born in the US after spending the last 13 years in frozen suspension as an embryo.
Yesterday 8.00
Mariopedia -- an illustrated listing of virtually every character, item, and enemy from the "Super Mario Universe."
Yesterday 7.00
Games like World of Warcraft can earn some people a lot of real world money, money generated by repetitive "farming". A farmers "typical 12-hour sessions can earn his employers as much as $60,000 per month while he walks away with a measly $150"
Yesterday 6.59
With IE7.0 supporting RSS as a default feature, more users are likely to use RSS. SO which RSS reader should you use as an individual and as an organization?
Yesterday 6.59
Apple Computer recently researched and developed a wireless touch-screen remote control concept that would automatically discover and communicate with existing and future consumer electronics appliances as well as the personal computer, a filing with the United States Patent and Trademark Office has revealed. The...
Yesterday 6.48
A 4 thousand years old construction found in Russia
Yesterday 6.21
The previous 1.0.5 test builds (June 20, 2005) needed more work and didn't become 1.0.5, but now "they've just announced on the QA blog that all the fixes are in, and they could use some testing on the latest builds."
Yesterday 6.01
Lots of these aggregation sites for one-stop newsreading, but this one does it better than most. No nonsense, customizeable and grouped in categories.
Yesterday 5.58
A group of British scientists believes people should be viewed as "superorganisms," made of conglomerations of human, fungal, bacterial and viral cells!!!
Yesterday 5.38
Police have arrested a man for using someone else's wireless Internet network in one of the first criminal cases involving this fairly common practice.
Yesterday 5.34
"The world is full of free wi-fi locations so why pay for them? Skip Starbucks and other paid access locations and support local businesses and your community for free. Stop into your local free hotspot, buy a mocha, and let them know how much you appreciate the free wi-fi!" - uses google maps to plot them out in some areas
Yesterday 5.01
Not iPodder, ACTUAL iPodderX coming out forwindows soon! Check it out!
Yesterday 4.49
Digg's official podcast 'diggnation' is now listed within the iTunes podcast directory. Click this link to subscribe to the podcast within iTunes - help make 'diggnation' #1.
Yesterday 4.35
Who said tech jobs are declining? Surely not in the sunshine state of California with a 26% jump in tech jobs.
Yesterday 4.31
MonarchComputer has the NEC ND-3520A Black 16X Dual Layer DVD±RW Drive (Retail) for $38 w/ free shipping.
Yesterday 4.02
The chief of Microsoft's mobile and embedded division is promising something that seems counterintuitive: a complex suite of features in a smart phone that's cheap and easy to use and in so doing take the lead in the smartphone market within three years.
Yesterday 3.53
The new technique embeds a computer generated hologram (CGH) into an image. Usually a simple word or picture, the hologram hides in the "noise" – the random pixel-to-pixel variations that your eye usually glosses over.
Yesterday 3.49
Actor Morgan Freeman and chip maker company Intel is teaming up to deliver digital, online distribution of film and entertainment to help prevent movie piracy.
Yesterday 2.45
This site has a bunch of XBOX 360 Screen Shots (23 games, plus console, controllers, etc). Very Cool.
Yesterday 2.01
"Computer code that could be used to attack systems with older versions of Firefox has been released on the Internet, security experts have warned."-CNET News.com
Yesterday 1.09
The eBook from Project Gutenberg