Author Topic: Having some problems creating my own "page"  (Read 9674 times)

0 Members and 1 Guest are viewing this topic.

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Having some problems creating my own "page"
« on: May 30, 2003, 07:39:36 PM »
Hello All,
I seem to be having some problems trying to create my own page.
For example, I want to create a page, called "contact" that will be wrapped by the template.

In this particular case, would I just copy one of the .html files, replace the "body" with what I need, then copy a .php file, and simply do a PHP include?

I'm not sure exactly what would need to be in the .php file since all the other php files (which I'm using for examples) have a ton of code in them.

Any help would be greatly appreciated.

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
Having some problems creating my own "page"
« Reply #1 on: May 30, 2003, 08:34:08 PM »
use one other template from your site, home.html for eg.
edit the layout as you wish, change the name of the template contact.html for ex.

upload that template to your {template folder}
and then to call that template just link to index.php?template=contact

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Having some problems creating my own "page"
« Reply #2 on: May 30, 2003, 08:41:42 PM »
Hello,
Thanks for the response.

I would prefer to call the page by www.domain.com/gallery/contact.php
Is this possible?

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Having some problems creating my own "page"
« Reply #3 on: May 30, 2003, 08:58:48 PM »
Creating your own custom template page is covered in the FAQ

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Having some problems creating my own "page"
« Reply #4 on: May 30, 2003, 10:52:48 PM »
Yes, I read the FAQs, but again, it says to access the page, you would type in:
http://www.MyDomain.com/4images/index.php?template=<page_name_here>

Like I said in my previous post, I dont want to access my page that way, I want to be able to do:
http://www.MyDomain.com/4images/<page_name_here>.php

That's what I don't understand how to do because I don't know how the .html and the .php should interact.

Offline Apollo13

  • Addicted member
  • ******
  • Posts: 1.093
    • View Profile
Having some problems creating my own "page"
« Reply #5 on: May 31, 2003, 12:03:09 AM »
yes u can do this but include the php thinks from index.php so the user is still logged in...

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Having some problems creating my own "page"
« Reply #6 on: May 31, 2003, 10:28:43 PM »
OK, maybe this will help, cause I need this spelled out.
Below is my contact.html file.
What do I need to put in contact.php in order to access this file from:
mydomain.com/gallery/contact.php?

Code: [Select]
{header}
    </td>
  </tr>
  <tr>
    <td class="bordercolor">
      <table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td class="tablebgcolor">
           

<table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <td class="navbar" height="23">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td align="left" width="50%">
        <img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}
       </td>
       <td align="right" width="50%">
     
        <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
        <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;&nbsp;
       </td>
      </tr>
     </table>
    </td>
   </tr>
  </table>




            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="150" class="row2" valign="top">
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_box} </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
                  {if random_cat_image}
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">
                        <br />
                        {random_cat_image}
                        <br />
                        <br />
                      </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
                  {endif random_cat_image}
 <?php include&#40;"4gmenu.php"&#41;; ?>
                  <p align="center">
                    <?php
                    
echo date&#40;"d.m.Y, H&#58;i"&#41;; 
 ?>

                  </p>

                  <br />
                </td>
                <td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                <td width="18" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="18" height="18" /></td>
                <td width="100%" valign="top"><br />
                  <span class="title">{lang_contact_us}</span>
                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                       <?php echo @join &#40;@file &#40;"http&#58;//www.girls-on-bikes.com/cgi-bin/b3fmail/b3fmail.cgi?action=getform&form=general"&#41;,""&#41; ?>
                      </td>
                    </tr>
                  </table>
                  <p>&nbsp;</p>
                </td>
                <td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" /></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
 <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablebottom">
        <tr>
        <td width="6">&nbsp;</td>
          <td width="405">&nbsp;</td>
          <td width="225">&nbsp;</td>
          <td width="6">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
{footer}

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Having some problems creating my own "page"
« Reply #7 on: May 31, 2003, 10:32:35 PM »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Having some problems creating my own "page"
« Reply #8 on: May 31, 2003, 10:40:58 PM »
Awesome, this is starting to help.

Now I notice all you have in that php file is a couple instances of "sitestats"...is that where you would put the exact name of the .html file?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Having some problems creating my own "page"
« Reply #9 on: May 31, 2003, 10:50:16 PM »
yes, actualy I just noticed myself, that second line with "sitestats" I dont even need...
so, all u need is specify what is your template by adding on top of .php file this line:
$main_template = 'YOUR_TEMPLATE_NAME';
if u're planning use more then one template at same page, then add one more line:
$templates_used = 'ANOTHER_TEMPLATE,ANOTHER_TEMPLATE_2,ANOTHER_TEMPLATE_3';
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Having some problems creating my own "page"
« Reply #10 on: May 31, 2003, 10:55:33 PM »
This is weird, I'm getting:
Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' in /home/gob/public_html/new/gallery/includes/template.php(133) : eval()'d code on line 438

And I think it's because I have a php include inside my contact.html, but all of my other files have the same line, and display without a problem (the template I'm using was modified to have a menu include file)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Having some problems creating my own "page"
« Reply #11 on: May 31, 2003, 10:58:39 PM »
try this:
http://www.4homepages.de/forum/viewtopic.php?t=4295

P.S. u cant use <?PHP and ?> in one line, u must separate them.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Having some problems creating my own "page"
« Reply #12 on: May 31, 2003, 11:11:47 PM »
Well, I finally got it to work by not having <?php and ?> php on the same line, which is weird because in all of my other template files I have:
<?php include("4gmenu.php"); ?>

Well, thanks for all your help, I should be on my way to creating my own pages now ;)