Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 02-20-2005, 06:23 PM
Fellow Eskimo Offline
pp veteran
 
Join Date: Feb 2005
Location: SC, USA for the next 6 months.
Posts: 78
New Template Varible Needed

First of all, let me say...I am in love with pixel post. I have had SO much trouble with other photologing programs and CMS...was just sick of them. Now I have this, so wonderful.

However, I am in need of a template varible, or one exists and I am not aware of it. This is the problem. I want to link a catagory to the catagory page. Example:

The 'People' Catagory is at:
http://www.felloweskimo.net/photo/in...amp;category=3

and the 'Nature' catagory is:
http://www.felloweskimo.net/photo/in...amp;category=2

so the only difference is the catagory number, numbers 3 and 2. I need a varible to pop out this number to create a link to the catagory.

Something link this:
http://www.felloweskimo.net/photo/index.php?x=browse&category=<IMAGE_CATAGORY _NUMBER>

However, since <IMAGE_CATAGORY_NUMBER> does not exist, I cannot do that. And when I use <IMAGE_CATAGORY> it only gives me the name, ex: 'People". So...what I need is either someone tell me how to make a new varible, point me to a varible that does this, or create a new varible for me. Im open to any suggestions.
Reply With Quote
  #2  
Old 02-20-2005, 06:29 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
I don't underestand!

you need to do some php coding but I think what you need is done before but you're not describing what you want very well

UPDATE:
maybe u need this
http://www.pixelpost.org/index.php?x...amp;details=42
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #3  
Old 02-20-2005, 06:46 PM
Fellow Eskimo Offline
pp veteran
 
Join Date: Feb 2005
Location: SC, USA for the next 6 months.
Posts: 78
Ill try that, but im not 100% sure it is what I need.

What I do need is a varible to display the catagory NUMBER. Each catagory is assigned a number. There is a varible that will display the catagory NAME, but I want a varible that will display the catagory number. If you look in your archives, at each catagory page, it ends with a number. That is the catagory number. Each catagory has a different one. I need a varible to show the catagory number so I can embed it for a link.

I dont know how else to explain it. I do not understand php very well, only html and css.

EDIT: That addon is not what I need. I do not need a list...just a varible that will display the catagory number, if its possible. If you look on my site: http://www.felloweskimo.net/photo/index.php you will see "Filed Under: CATAGORY". I want CATAGORY to link to the correct catagory. Any way to do this?
Reply With Quote
  #4  
Old 02-20-2005, 07:17 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
insert
Code:
$store_image_cat_id = $image_category ;
$tpl = ereg_replace("<IMAGE_CATEGORY_ID>",$store_image_cat_id,$tpl);
at line 121 of your inde.php
and use <IMAGE_CATEGORY_ID> as the category number for linking.

Update: I added this to my pblog now
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #5  
Old 02-20-2005, 07:26 PM
Fellow Eskimo Offline
pp veteran
 
Join Date: Feb 2005
Location: SC, USA for the next 6 months.
Posts: 78
Hmm, now its just giving me http://www.felloweskimo.net/photo/in...&category=

and no ending, taking me directly to the archives page...now where am I screwing up...
Reply With Quote
  #6  
Old 02-20-2005, 07:33 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
you should add it right after
$image_category = $row['category'];

here is my code and see how it looks at around line 120
Code:
$image_name         = $row['image'];
$image_title        = pullout($row['headline']);
$image_id           = $row['id'];
$image_datetime     = $row['datetime'];
$image_datetime_formatted = strtotime($image_datetime);
$image_datetime_formatted = date($cfgrow['dateformat'],$image_datetime_formatted);
$image_category = $row['category'];

// ramin added
$store_image_cat_id = $image_category ;
$tpl = ereg_replace("<IMAGE_CATEGORY_ID>",$store_image_cat_id,$tpl);

$image_date         = substr($row['datetime'],0,10);
$image_time         = substr($row['datetime'],11,5);
$image_date_year_full   = substr($row['datetime'],0,4);
$image_date_year   = substr($row['datetime'],2,2);
$image_date_month = substr($row['datetime'],5,2);
$image_date_day = substr($row['datetime'],8,2);
maybe your code in index.php differs from mine ... I emphasize you should add it right after
$image_category = $row['category'];
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #7  
Old 02-20-2005, 07:40 PM
Fellow Eskimo Offline
pp veteran
 
Join Date: Feb 2005
Location: SC, USA for the next 6 months.
Posts: 78
Now it works, our index.php files were different. Thank you very very much!
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 04:11 AM.

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