Drupal taxonomy snippet - get all terms for a vocabulary
I was unable to find this anywhere online, but it's a pretty basic one - get all terms for a vocabulary and create a list with their names...
<?php
/*
* Get all terms for a vocabulary
*
* @author Benjamin Lowenstein, Colingo Labs LLC
*/
// set vocabulary id #
$vid = 1;
$sql = "SELECT * FROM {term_data} WHERE vid = %d";
$result = db_query(db_rewrite_sql($sql), $vid);
$terms = array();
while ($data = db_fetch_object($result)){
$term = $data->name;
$terms[] = $term;
}
echo theme_item_list($terms);
?>
"Online gaming is a
"Online gaming is a technology rather than a genre; a mechanism for connecting players together rather than a particular pattern of gameplay." Online games are played over some form of computer network, now typically on the Internet. One advantage of online games is the ability to connect to multiplayer games, although single-player online games are quite common as well.
During the 1990s, online games started to move from a wide variety of LAN protocols (such as IPX) and onto the Internet using the TCP/IP protocol. Doom popularized the concept of deathmatch, where multiple players battle each other head-to-head, as a new form of online game. Since Doom, many first-person shooter games contain online components to allow deathmatch or arena style play.
jogos gratis, Alfa, Herói, Rtype, Little Girl Coloring, Boliche,
thanks
thanks for the code example, very helpful
i used it like this: http://drupal.org/node/636868#comment-2282118