Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 11-02-2004, 05:14 PM
Connie
Guest
 
Posts: n/a
format <BROWSE_CATEGORIES>

Hi!

As I wanted to format this item to an "open listbox", I had to do the following changes:

a) index.php:

Code:
// build browse menu
// Get number of categories in database
$categorienumb = mysql_query("select count(*) as count from ".$pixelpost_db_prefix."categories");
$rowcat = mysql_fetch_array($categorienumb);
$categorienumb = $rowcat['count']+1;
$browse_select = "&lt;select size='$categorienumb' name='browse' onChange='self.location.href=this.options[this.selectedIndex].value;'>&lt;option value='?x=browse&amp;amp;category='>$lang_CatAll&lt;/option>";
$query = mysql_query("select * from ".$pixelpost_db_prefix."categories order by name");
while(list($id,$name) = mysql_fetch_row($query)) {
    $name = pullout($name);
    $browse_select .= "&lt;option value='?x=browse&amp;amp;category=$id'>$name&lt;/option>";
    }
$browse_select .= "&lt;/select>";
b) a new variable in the language-file:
Code:
 $lang_CatAll                = "alle Bilder";
c) in the browse-template:
Code:
Kategorien:
&lt;form>&lt;BROWSE_CATEGORIES>&lt;/form>
I hope this tweak can be helpful, you can see it at
http://www.photografitti.de/pp/index...&amp;category=

Connie
Reply With Quote
  #2  
Old 11-02-2004, 06:07 PM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
very cool...
__________________
i should say more clever stuff
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:36 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs