Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-21-2009, 12:44 AM help needed
Novice Talker

Posts: 12
Trades: 0
Hello all,

I need some help trying to make a simple indexer of some kind. I am unsure of what category I was supposed to post in, so I did choose this.

The thing I am looking for is very simple, but I have no idea how to make it.
I need just a simple category index, like the example underneath:

Test 1
-->Sub1
-->Sub1
and so on
Test 2
-->Sub1
-->Sub1
and so on
Test 3
-->Sub1
-->Sub1
and so on


Only three main categories are needed, but every main category will have many sub-. I have started making this site, but I really dont have any example to show what I need. But I will need my original pages, just want to categories this better. I reckon this is pretty easy to make

I started making this static, but I found out that it will be much work changing everything all the time.

Does anyone have any tutorial or something that I can read to accomplish this? I am pretty good at html, but not at any programming

Thanks in advance

-Tommy
tbrueland is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-21-2009, 04:10 AM Re: help needed
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Your question is a bit vague, but I believe this will help you:
PHP Code:
<ul><?php
$my_navigation 
= array('Test 1'=>array('Sub1''Sub2'),
                       
'Test 2'=>array('Sub3''Sub4'),
                       
'Test 3'=>array('Sub5''Sub6')
                      );
foreach (
$my_navigation as $top_level=>$secondary_levels) {
  echo 
'
  <li>'
.$top_level;
  echo 
'
    <ul>'
;
  foreach (
$secondary_levels as $second_level) {
    echo 
'
      <li>'
.$second_level.'</li>';
  }
  echo
'
    </ul>
  </li>'
;
}
?>
</ul>
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 09-21-2009, 09:25 AM Re: help needed
Novice Talker

Posts: 12
Trades: 0
JeremyMiller,

Umm yeah I have heard about the array thing before. But how much can this be customized? If I want the main categories on one page, and if I press Test 1...then one page should come up. If I press Test 2 a different page should come up. How can I include a link in that?

Code:
array('Test 1'=>array('Sub1', 'Sub2'),



If I want it to say Sub1 and Sub2 on the menu, but when I press
Sub1, sub1.html should come up and sub2.html when Sub2 is pressed.

Does this make any sense to you? Thanks a lot for the help by the
way

So what I am really trying to say all the time, I want a
dynamic vertical navigation menu . I hope this clear things up

tbrueland is offline
Reply With Quote
View Public Profile
 
Old 09-21-2009, 07:34 PM Re: help needed
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
How are your pages stored? For a more detailed explanation, I'd need to see some structure and/or code.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 09-22-2009, 03:59 AM Re: help needed
Novice Talker

Posts: 12
Trades: 0
Thanks for your answer. I have put up the pages here

The site is far from finish, but you get the idea of what my wish are. I can remove the static menu on the left and put some kind of dynamic menu there, and put that dynamic menu on all the pages. But I have a big wish of keeping the structure and hopefully the same font.

If you come up with a great idea, I might hire you if we are talking of a ok amount of money.

But anyway you get the idea of where I want, and I reckon you can get the source on viewing the source

Thanks in advance

-Tommy
tbrueland is offline
Reply With Quote
View Public Profile
 
Old 09-22-2009, 05:26 PM Re: help needed
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
How are your pages stored? In a database? If so, what's the structure? As a list of files? If so, how do you know which is the top-level category?
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 09-22-2009, 07:45 PM Re: help needed
Novice Talker

Posts: 12
Trades: 0
It is not made with a database, and the main pages are stored in the root...while the 'series' pages are stored inside a folder called series. I know what is what because this is usually always how I do stuff. But as things are now ...everything is 'static' and adding new 'series' pages would require me to make a change on ALL pages.

But I am not any good with mysql, so that is the reason I always do stuff the hard way.

You asked me how the pages are stored...well if you open the index.html page and go from there, it would be something like this:

/index
/running
/ended
----->/series/'the series pages'

I dont know how else I shall describe it...but if you take a look at the url's I guess you get a ok view on how it is stored.

But after some thinking I think I might go with some kind of link directory, and see what my chances are then

Thanks in advance

-Tommy

Last edited by tbrueland; 09-22-2009 at 07:50 PM..
tbrueland is offline
Reply With Quote
View Public Profile
 
Old 09-22-2009, 10:46 PM Re: help needed
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
You may want to send this via PM, but can you send me a partial directory listing of both the root and series directories? I need to have an idea of how to decide what goes where.

Thanks!
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 09-23-2009, 10:50 AM Re: help needed
Novice Talker

Posts: 12
Trades: 0
I am not that afraid...not much to hack on that domain
Attached Images
File Type: jpg root.JPG (62.6 KB, 2 views)
File Type: jpg series.JPG (62.9 KB, 1 views)
tbrueland is offline
Reply With Quote
View Public Profile
 
Old 09-24-2009, 12:14 PM Re: help needed
Novice Talker

Posts: 12
Trades: 0
I have found out a way to make the menu system, but thanks a lot for giving it a try
tbrueland is offline
Reply With Quote
View Public Profile
 
Old 09-24-2009, 09:08 PM Re: help needed
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Glad you got it. I got busy with some project coding and didn't get a chance to look at it. Mind sharing your solution for future people?
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to help needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45631 seconds with 13 queries