Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post 
Post FAP SUPPORT - Display Pics Inside ALL Subcategories 
 
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
 



 
solotreniSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
solotreniSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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:

Code: [Download] [Hide] [Select]
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)


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.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You 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


  

 

  cron