1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

forums template building and php require/includes

Discussion in 'Software Development' started by TypeSK, Jan 7, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. TypeSK

    TypeSK Thread Starter

    Joined:
    Mar 16, 2002
    Messages:
    676
    ok. i am building my site. and im installing forums onto my site.

    well, for lack of money right now, im using the free forum software, phpBB .... i like vBulletin, but no money. so until then, phpBB .... (hopefully someone will know about it?)

    anyways, ive installed it correctly, works, voila ....

    now, of course i dont want its default them, as id like it to look like my site. ok, so i edited the template files, well, one of them which is the major one to get it to look like my site ... well, got it done, well, MOST of it done

    now, with my site, i use SSI, well, instead of SSI, PHP require/include codes. on ALL my pages it works, and this is the code i use:

    PHP:
    <?php
    require ("../html/scripts.php");
    ?>
    and whatever is in the scripts.php is inserted into the page.

    well, when i did my template file to include my includes, well, it doesnt show up.

    normally, if the php include code is wrong, when i view it on the internet, itll screw up the whole page with an error message. but the forums, it just parses the php include code as text and acts like its never there?

    whats wrong?!!??!??

    my website: www.whiteazn.com
    to see rest of site: www.whiteazn.com/korean/
    forums: www.whiteazn.com/forums/

    the main header at the top, and the footer at the bottom is not showing up whatsoever, as you can look at the code of the forums, and see the php include code, when normally, its supposed to insert the html code for the header and the footer ..... (even though i dont think i inserted the footer in the templates yet i think)

    but you get the point.

    now, one of my ideas of why it isnt working, is that in alot of the template files, i see alot of this:

    PHP:
    <.br /> (without the period ".")
    <
    img src="url" />
    do i have to put it in the " / " in the php require codes?

    help?!!!!!!!! im a n00b to this template forums stuff!!! (what a way to learn too)
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    I think your include tag is incorrect, it should be

    PHP:
    <? include("../html/scripts.php"?>
     
  3. Snake~eyes

    Snake~eyes

    Joined:
    Apr 18, 2002
    Messages:
    640
    i dont believe that is the problem. But if it was make sure to put a ; after


    im not sure exactly what your problem is, do you get any errors on the page?
     
  4. TypeSK

    TypeSK Thread Starter

    Joined:
    Mar 16, 2002
    Messages:
    676
    no..no errors whatsoever...

    you can view the page:

    www.whiteazn.com/forums

    i am deducing maybe that the problem is this:

    the template files for the forums are all located on .tpl files .... they arent php files, so thus, they wont get parsed as PHP ...... might have to try something else...... or just put whatever is in the php include file into the template ....

    but if someone can tell me this for sure, that would be great....
     
  5. Snake~eyes

    Snake~eyes

    Joined:
    Apr 18, 2002
    Messages:
    640
    okay i read it really fast in the beginning cause i had to go.. now that i am back.

    First off, one thing i noticed and from experience I can tell you this. When you first make forums, ALWAYS start off small. Maybe 3 forums or so. Don't get so many forums yet until you have the need for them and gradually add them as you go.


    Anyways back to the problem

    You say that the code in the .tpl files is just showing up ont he sc reen as regular text?

    If so then in the .tpl files make sure you have <?php and ?>, this could be your problem
     
  6. TypeSK

    TypeSK Thread Starter

    Joined:
    Mar 16, 2002
    Messages:
    676
    the .tpl files are the template files for the forums, for the header, footer, posting, forum view, editing posts, etc...they have one, header, which goes on all the pages......it has coding in there too, but for the forums .... i put the php includes there, and it doesnt work .... keep in mind that i took my template files for my site, and just copied and pasted the header of mine, and input it into the forum template files..everything works, except the php includes ....
     
  7. Snake~eyes

    Snake~eyes

    Joined:
    Apr 18, 2002
    Messages:
    640
    so when you include it where does the code int he tpl show. Does it show in the source or as text on the page or does it not show anywhere.

    this really is making no sense.. hrm
     
  8. TypeSK

    TypeSK Thread Starter

    Joined:
    Mar 16, 2002
    Messages:
    676
    it shows in the code only in the tpl...same on the website...it shows if you view source, but it doesnt show on the page ...

    the tpl files, i edit via-notepad....if i use DW or other html editor, it messes the code up ... and yes, i did the tpl the right way with no errors
     
  9. Snake~eyes

    Snake~eyes

    Joined:
    Apr 18, 2002
    Messages:
    640
    sorry i dont know what to tell you

    my recommendation is to go to phpbb support forums. Sorry
     
  10. TypeSK

    TypeSK Thread Starter

    Joined:
    Mar 16, 2002
    Messages:
    676
    yea..already ddi ..... thats what the problem is..the template files are .tpl files, and php requires .php files to work ....
     
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/111845

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice