SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Member
    Join Date
    Feb 2001
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi

    how can i create "bread crumbs" automatically, like the one on this very page: "SitePoint Community Forums > Build your Site > Web Page Design".
    i wouldn't like to create it manually on each page.

    thanks

    lenny

  2. #2
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You know these are created automatically? and each corresponding addition to your 'bread' is actually a sub category of the first.

    so using this 'tree listing', the script creates these 'bread crumbs' as you so call it.

    in other words, if you want to add these, you can eidther use a link category script,

    or to integrate it into your existing site,
    use php or cgi.
    1) create a database of the tree listing
    2) cretae a script to read and build it
    3) call the script from the page and send identification as to which page it is. the scirpt will then build the 'crumbs'.

    yeah.
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  3. #3
    Don't get too close, I bite! Nicky's Avatar
    Join Date
    Jul 1999
    Location
    Lancashire, UK
    Posts
    8,277
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    PHP is probably the best way to do it. It will also be very maintainable via the database.

  4. #4
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Errrrr.... For the PHP newbies amongst us could we have a script example? Thanks..
    My 2 Cents (or is that 2.2 Cents including GST?)

  5. #5
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm..Honestly, there are many. But they are generally integrated into current systems.

    try going to www.hotscripts.com/PHP for examples.

    or best, go to the PHP forum and get all the experts! hhaa
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  6. #6
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lyon, that's the problem. I searched HotScripts previously (about 600 times) and still can't find one

    Looks like I'll have to annoy Freddy or Karl again
    My 2 Cents (or is that 2.2 Cents including GST?)

  7. #7
    SitePoint Enthusiast
    Join Date
    Nov 2000
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lenny,

    Not quite what your looking for. But here is a javascript that might help.


    <script LANGUAGE="JavaScript">
    <!-- Begin
    //author: Jake Fairhead
    var path = "";
    var href = window.location.href;
    var start = href.substring(0, href.indexOf('//') + 2);
    var pos = href.indexOf('//');
    href = href.substring(pos + 2, href.length);
    pos = href.indexOf('/');
    path = start + "";

    document.write(start);
    while (pos != -1) {
    var name = href.substring(0, pos);
    path += name + "/";
    document.write("<a href=\"" + path + "\">" + name + "</a>");
    document.write("<");
    href = href.substring(pos + 1, href.length);
    pos = href.indexOf('/');
    }

    // remove anchors
    if (href.indexOf('#') != -1) {
    href = href.substring(0, href.indexOf('#'));
    }

    // remove query string
    if (href.indexOf('?') != -1) {
    href = href.substring(0, href.indexOf('?'));
    }
    document.write("<a href=\"" + path + href + "\">" + href + "</a>");

    // End -->
    </script>

    Maybe it'll serve the purpose?

    brew

  8. #8
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL
    Yeah BC...reason coz they are embedded within very large Free(GPL) portal scripts
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  9. #9
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lyon, that's not surprising Hmmmmm... Which GPLed systems? I'll have a good look at them and modify it from there...
    My 2 Cents (or is that 2.2 Cents including GST?)

  10. #10
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey BC,

    I went scouting around.
    If you see PHP Nuke, their's forum has the bread crumb style?
    Also, look into categories like link categories, for example Links 2.0 ( but its in cgi/perl )...just similar scripts.

    Bulletin board systems should also have it. ( Look at the free ones =0 )

    Or at http://www.hotscripts.com/PHP/Script...Link_Indexing/

    There are several scripts such as:
    - http://www.hotscripts.com/Detailed/3568.html ( their >> dividing between categories are :: )
    - http://www.hotscripts.com/Detailed/4979.html ( their >> is just a > )


    There ar emany more, but i didn't look at them.
    Let me know if you need more help.

    Cheers BC!
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  11. #11
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lyon, yeah, I might just hack it out of that forum (which I think is either phpBB or pHorum)... And I'll keep my eyes peeled.

    Thanks!
    My 2 Cents (or is that 2.2 Cents including GST?)

  12. #12
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah.
    Thats gonna be a difficult hack..lol

    Dunno if I helped you, but oh well,
    All the best in your pursuit! eheh
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •