Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 07-29-2005, 09:03 PM
Mikey Offline
forum loafer
 
Join Date: Jul 2005
Posts: 1
Categories description

Good evening,

I want to add a description to a category. I created the table categories_description and created the input boxes in the admin section to add the description. That part works, I can add a description to a category.

No I want to show this data from my template, but I'm not sure how I should do this. Who can point me in the right direction?

Thanks.
Marco
Reply With Quote
  #2  
Old 08-02-2005, 04:02 AM
derevaun Offline
pp regular
 
Join Date: Mar 2005
Location: oly, wa
Posts: 47
I did it a different, less efficient way: I made an add-on to read in a text file whose filename matches the number of the category as found in the GET data.

Code:
if ($_GET['category']) {
  $file_to_read = '/descriptions/'.$_GET['category'].'.html';
  $frag_to_add = file_get_contents($file_to_read);
}
else {
  $frag_to_add = "";
}

$tpl = ereg_replace("<CATEGORY_DESCRIPTION>",$frag_to_add,$tpl);
I make a text file for each category that needs a description, stored in a new folder called 'descriptions.' The text files are HTML snippets with lists, IMGs, etc. Good luck!
__________________
http://asiftosay.com
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 10:23 AM.

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