|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
||||
|
||||
|
insert
Code:
$store_image_cat_id = $image_category ;
$tpl = ereg_replace("<IMAGE_CATEGORY_ID>",$store_image_cat_id,$tpl);
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 |
|
#5
|
|||
|
|||
|
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... |
|
#6
|
||||
|
||||
|
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);
$image_category = $row['category'];
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#7
|
|||
|
|||
|
Now it works, our index.php files were different. Thank you very very much!
|
| Post Reply |
| Thread Tools | |
|
|