Results 1 to 8 of 8

Thread: Too Many Files

  1. #1
    Join Date
    Feb 2003
    Aberdeen, Washington, USA

    Exclamation Too Many Files

    If you go to:


    You will see that I have links in the upper right hand part of my page and they go to different pages of my site. I was wundering if it was possible to make it so you have a script with pre-defined info for each page and a div. What I want is when the user clicks on a link they will not go to a different page but, what will happen is the main content will change and nothing else. Just like div replace or something. You will have the pre-defined info for each page so like you will have a div for each page and when they click on one of the links it will exchange the content of the index for the content of the div the link is linked to. Ask me if you need any more details so you can get what I want. Is this possible? Please help.

    (Edit: I moved this from JavaScript to here. I want to do this with PHP.)

  2. #2
    Join Date
    Feb 2003
    Aberdeen, Washington, USA
    Here is something so you can get my idea better:

    <div#1=The content for page one go's here.>
    <div#2=The content for page two go's here.>

    The script would take what is on the page and replace it with one of the div's above. There would be a place on the page with place holders so the script knew where to put the div content. The links on my page would be linked to the php so the link would be like:


    So say if you clicked the link that sayed "Home" and I wanted it to display div#1 for link "Home" then what would happen is it would take the content of div#1 and put it on the page within the place holders. I hope that helps you guys so you can help me! I'm sure you already figured it but the peices of code above do not work, oveously. Please see if you can help me out here. Thanks.

  3. #3
    Join Date
    Jun 2003
    Place this were you want the content:

    PHP Code:

    [1] = "The content for page one go's here";
    $page[2] = "The content for page two go's here";



    Make your links like this:

    <a href="index.php?id=1">page 1</a>
    <a href="index.php?id=2">Page 2</a>

  4. #4
    Join Date
    Feb 2003
    Aberdeen, Washington, USA
    $page[2] = "The content for page two go's here";
    $page[3] = "The content for page three go's here";
    <title>Test Page</title>
    Welcome to our page.<br>
    <a href="test.php?id=2">Page 2</a>
    <a href="test.php?id=3">Page 3</a>
    The code above is what I currently have. I changed the script a bit. I want the user to see "Welcome to our page" when they first enter that page and then when the click one of the links the "Welcome to our page" is replaced with the contents of whatever link they click on. Right now it just adds the contents of the links to the beginning of the "Welcome to our page" message. Here is the link so you can see what I'm talking about: http://kd7pyo.infinitypages.com/test.php. Thank you.
    Last edited by Jick; 07-04-2003 at 02:38 PM.

  5. #5
    Join Date
    Jun 2003
    <title>Test Page</title>
    $page[1] = "Welcome to our page";
    $page[2] = "The content for page two go's here";
    $page[3] = "The content for page three go's here";
    if(!$id) $id = 1;
    <a href="test.php?id=2">Page 2</a>
    <a href="test.php?id=3">Page 3</a>

  6. #6
    Join Date
    Feb 2003
    Aberdeen, Washington, USA
    Ohh thanks. It works now. I had one more question. Is it possible to remove the (?id=2) it adds to the end of the url? Before I click on a link it looks like this: (http://kd7pyo.infinitypages.com/test.php) but after I click on one it looks like this: (http://kd7pyo.infinitypages.com/test.php?id=2). Is there any way to fix this? Thanks for your help!

  7. #7
    Join Date
    Jun 2003
    Then you would have to use a form and have images as links or something instead. (I think). The script have to know witch text to show, and the only way to send the variable with a link is to place it in the url.

  8. #8
    Join Date
    Feb 2003
    Aberdeen, Washington, USA
    If anybody understands my question please help me out! I want it to show: (http://kd7pyo.infinitypages.com/test.php) and not: (http://kd7pyo.infinitypages.com/test.php?id=2). I'm sure there is a way to remove the thing on the end of the url and it still do what I need, but I'm just not sure. Thanks for any help anybody can provide.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.13855 seconds
  • Memory Usage 2,916KB
  • Queries Executed 13 (?)
More Information
Template Usage (34):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (8)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • bbcode_parse_start
  • postbit_imicons
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates