[geeklog-devel] Pop-up topic listing code...

Jason Whittenburg me at jasonwhittenburg.com
Thu Feb 6 13:15:15 EST 2003

Looks Good!  And the layout of your new site looks great, much cleaner
(assuming that it is going to replace your current one eventually).

Jason Whittenburg
Internet Security Systems, Inc.

-----Original Message-----
From: geeklog-devel-admin at lists.geeklog.net
[mailto:geeklog-devel-admin at lists.geeklog.net] On Behalf Of Rob
Sent: Thursday, February 06, 2003 1:00 PM
To: geeklog-devel at lists.geeklog.net
Subject: [geeklog-devel] Pop-up topic listing code...

For the longest time, I've been conserving veritcal real estate with a
horizontal topic bar in lieu of the section block ... but I got tired of
it, and decided to create a pop-up topic list for inclusion in the side
panel. You can see the results (on a somewhat irregular basis as the
machine comes and goes from the net) at http://griffman.homeip.net:5080
(login guest, pword guestuser). The code uses one line of Javascript to
execute on selection instead of waiting for the submit button to be
pressed (though that's present as well, just in case).

I added the following very simple function to lib-custom.php:

function phpblock_showtopics($topic='') {
  global $_CONF, $topic;
  $retval = '<div align="center"><br>';
  $retval .= '<form action="index.php" method="get">';
  $retval .= "<select name=\"topic\"
  $retval .= "<option value=\"\">-- All Topics --</option>";
  $retval .= COM_topicList('tid,topic',$topic);
  $retval .= '</select> <input type="submit"
  return $retval;

Then add a new PHP block with phpblock_showtopics as its name, and
you're done. Seems to work pretty well, though I think I need to add the
site URL variable instead of hard coding the /index just in case (but it
was a rush job last night).


geeklog-devel mailing list
geeklog-devel at lists.geeklog.net

More information about the geeklog-devel mailing list