Hello guys,
we are using Icy on an italian railway fansite (solotreni.net).
We've got a album organized in many levels of categories, like:
A
|--- B
|---C
|---D
We'd like to display, when opening one specific category, not only the pictures inside THAT category but also the pictures inside ALL its subcategories..
For example:
A displays A, B, C, D pics
B displays B, C, D pics
C displays C, D pics
D displays D pics
Is there a way to do that?
Thank you very much for your support.
Alessandro Bariatti
SoloTreni.net
FAP SUPPORT - Display Pics Inside ALL Subcategories
Subject: Re: Display Pics Inside ALL Subcategories
Hi,
do you need the pictures to be shown in the category page?
If you are confident with PHP we may try to help you in that.
do you need the pictures to be shown in the category page?
If you are confident with PHP we may try to help you in that.
Subject: Re: Display Pics Inside ALL Subcategories
Yes, i need to show on the bottom of the page of a specific category not only the pics from that category but also all the images of ALL its subcategories.
I'm quite confident with PHP.. no problems.
Thank you very much.
I'm quite confident with PHP.. no problems.
Thank you very much.
Subject: Re: Display Pics Inside ALL Subcategories
You have several ways for doing this.
The best way is querying all the subfolders of your current folder and then add a new SQL which gets the pictures using the IN sql command.
Some functions are already available for this goal:
All these functions are in includes/album_mod/album_hierarchy_functions.php, you can try to look through album code to check how these functions are used so you can create a list of all subcategories and finally with a single SQL obtain all pictures from them.
The best way is querying all the subfolders of your current folder and then add a new SQL which gets the pictures using the IN sql command.
Some functions are already available for this goal:
function album_build_tree(&$cats, &$parents, $level = ALBUM_ROOT_CATEGORY, $parent = ALBUM_ROOT_CATEGORY)
function album_get_sub_cat_ids($cur_cat_id = ALBUM_ROOT_CATEGORY, &$cats, $auth_key = ALBUM_AUTH_VIEW, $include_cur_cat_id = false)
function album_get_tree_option($selected_cat_id = ALBUM_ROOT_CATEGORY, $auth_key = ALBUM_AUTH_VIEW, $options = ALBUM_SELECTBOX_INCLUDE_ROOT)
function album_get_sub_cat_ids($cur_cat_id = ALBUM_ROOT_CATEGORY, &$cats, $auth_key = ALBUM_AUTH_VIEW, $include_cur_cat_id = false)
function album_get_tree_option($selected_cat_id = ALBUM_ROOT_CATEGORY, $auth_key = ALBUM_AUTH_VIEW, $options = ALBUM_SELECTBOX_INCLUDE_ROOT)
All these functions are in includes/album_mod/album_hierarchy_functions.php, you can try to look through album code to check how these functions are used so you can create a list of all subcategories and finally with a single SQL obtain all pictures from them.
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.1727s (PHP: 17% SQL: 83%)
SQL queries: 13 - Debug Off - GZIP Enabled