darkcarnival Posted April 21, 2006 Share Posted April 21, 2006 hi,I want to improve a gallery script i have and what i want to do is have each folder be its own category, but how do i do that?thanks :) Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted April 21, 2006 Share Posted April 21, 2006 set it up in an array. and call the information, set a letter for each one, then you can call tehm at will or cycle them. Quote Link to comment Share on other sites More sharing options...
darkcarnival Posted April 21, 2006 Author Share Posted April 21, 2006 could you explain a bit more pleae? Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted April 21, 2006 Share Posted April 21, 2006 I just got into arrays, you can set variables into an array and have each one be able to be called with a number, you could write a small program to have the program cycle through the arrays, like a loop function or something.[a href=\"http://www.hudzilla.org/phpbook/read.php/5_2_0\" target=\"_blank\"]http://www.hudzilla.org/phpbook/read.php/5_2_0[/a]this and the tutorial before and after this. Quote Link to comment Share on other sites More sharing options...
darkcarnival Posted April 21, 2006 Author Share Posted April 21, 2006 ok i see your point ;)my question i guess was more or less on how to find the folders than how to loop it all.i mean i tried to do this but i only see a bunch of dots. any idea on how to get the folders in a folder would make my day :) Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted April 21, 2006 Share Posted April 21, 2006 copy and paste them into another folder I guess, not sure what you mean.right one seperate function per folder, then create a main function and run them all into it. Quote Link to comment Share on other sites More sharing options...
darkcarnival Posted April 22, 2006 Author Share Posted April 22, 2006 what i mean is, hers aan example:.folder1..sub-folder1...sub-folder2....sub-folder3now the sub folders iwant to be categories in the gallery script, but how do i replacre those dots to be an actual folder name that will be of use for me.cause just calling to view a folder will just display the dots which doesnt do me any good. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted April 22, 2006 Share Posted April 22, 2006 I tried, but I can't figure anything out, sorry someone named dark carnival is reading this so he will probably answer in just a minute.that was embarrasing you are dark carnivalGive me just a second to check something maybe I can help.well let me ask you something. WHat exactly do you mean, did you want the folders to have different names, or do somethign with the php to rename the variables. Quote Link to comment Share on other sites More sharing options...
darkcarnival Posted April 22, 2006 Author Share Posted April 22, 2006 no i ment each folder would be a category, the name of the folder is what that category would be called.like if i named it funny dogs, that would appear as a cateogry but clicking on would tell the gallery to look in the funny dog folder, get what im saying now? Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted April 22, 2006 Share Posted April 22, 2006 yes. I have one idea.Set each folder as a variable. Then have the value of the variable to be the url of the folder.for instancedog = "http://www.mysite.com/category1";and so onand then maybe when you call the variable it might create a link to the urlif that works then try creating an entire array, and set the array to have keys.abcdin place of abcd have it the name of the category, so the key is the category name, then have the values set to the specific urls of the folder. And then from there you can do whatever you want to with the array. That is if urls can be passed to variables.i would test it out for you, but I just had my web host shut down my server, to switch it from php 4 to php5. So that is going to take the rest of my work night, adn I Won't have access, or else I would try it out and come up with something for you. I am 90% you can pass a url as a string variable, either way it's just text. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.