Dropdown Selector Code for Drupal

Some folks over at Reclaim the Media are converting their old site over to Drupal from an the MT/PHPWeblog site that I helped them build several years ago. Here's a little piece of code do build a dropdown selector to navigate to sections with javascript.


        $VID = 1;  /* Desired vocabulary term ID */

        $output = " \n";
        $output .= "select a topic\n";

        $result = db_query("SELECT * FROM {term_data},{url_alias} WHERE concat( 'taxonomy/term/', term_data.tid ) = url_alias.src AND vid = $VID ORDER BY name");

        while ($term = db_fetch_object($result)) {
            $strURL = url("$term->src");
            $strName = $term->name;
            $strTid = $term->tid;
            $link = l( $strName, $strURL);

            $output .= "". $link ."\n";

        }
        $output .= "\n";

        return $output;

Comments

thanks for the background on this particular scam.
i got nearly the same response to my ad to sell some used stuff.

i suspected it immediately....googled and found your comments immediately.
you did me a good service.

thnks very much

pete

a minor good on my part..
my remarks were intended for the craigslist scam post
i got it wrong a bit but the sentiments are the same
thanks again..
i'll repost to the proper spot