Jump to content


Photo

displaying folders in a folder


  • Please log in to reply
9 replies to this topic

#1 darkcarnival

darkcarnival
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts

Posted 21 April 2006 - 12:29 AM

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 :)

#2 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 21 April 2006 - 02:27 AM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#3 darkcarnival

darkcarnival
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts

Posted 21 April 2006 - 02:42 AM

could you explain a bit more pleae?

#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 21 April 2006 - 02:45 AM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#5 darkcarnival

darkcarnival
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts

Posted 21 April 2006 - 02:57 AM

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 :)

#6 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 21 April 2006 - 03:10 AM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#7 darkcarnival

darkcarnival
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts

Posted 22 April 2006 - 12:04 AM

what i mean is, hers aan example:

.folder1
..sub-folder1
...sub-folder2
....sub-folder3
now 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.

#8 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 22 April 2006 - 12:08 AM

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 carnival
Give 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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#9 darkcarnival

darkcarnival
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts

Posted 22 April 2006 - 12:29 AM

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?

#10 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 22 April 2006 - 12:36 AM

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 instance

dog = "http://www.mysite.com/category1";
and so on
and then maybe when you call the variable it might create a link to the url
if that works then try creating an entire array, and set the array to have keys.
a
b
c
d
in 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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users