TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Duble the work on pages (http://www.talkphp.com/absolute-beginners/3839-duble-work-pages.html)

Face_Of_Boe 01-06-2009 12:08 PM

Duble the work on pages
 
Hey everyone :)

Im having the following problem could someone hand me some ideas?
I also posted a lil sketch (still dunno the right size but if its to big gimme a few minutes to resize it)

I'm using includeds in my gallery (ferryr simple gallery nothing fancy) the thing is i have a couple of pages that contain the content that goes in the body.
For these pages i need to write an include page (a page that gets everything and a page that contains the images) the problem is this is to much work for every page that i make i need to make an include page and a content page this is way to much work and i beliefe it can be easyer only i dont know how yet.
here's an image to clear up the bad english i typed here :P


hmm cant get the img to work here is a direct link.
http://img235.imageshack.us/my.php?image=problemmr2.png

Aaron 01-06-2009 12:37 PM

You could do a bunch of things to solve this.

The most common way would be to use a Mysql database to hold all page content (data). To do this requires a lot of learning, so it might not be the best choice.

If you do not want to learn how to use databases, your way seems to be the next best way. The thing about PHP is that you have hundreds of ways to do the same thing, and its up to the developer to decide what they want to do.

Face_Of_Boe 01-06-2009 01:46 PM

Quote:

Originally Posted by Aaron (Post 21005)
You could do a bunch of things to solve this.

The most common way would be to use a Mysql database to hold all page content (data). To do this requires a lot of learning, so it might not be the best choice.

I tried this before but it didnt workout the way i planned however it is the best way of going about this.

Quote:

Originally Posted by Aaron (Post 21005)
If you do not want to learn how to use databases, your way seems to be the next best way. The thing about PHP is that you have hundreds of ways to do the same thing, and its up to the developer to decide what they want to do.

Thank you but how do i get index.php to include all those pages im not shure how to go about all that. Becus the only way i know I can link within a div field to another page and load it in the same file is to make an Iframe and im not fond of those hehe.
The way I would like it if content_body.html only gets replaced
when you click on next or page 2.

Once again sorry for my bad english still working on improoving it.

Update:
Ill include the code when i get home becus in code everything will seem much clearer

Face_Of_Boe 01-06-2009 04:16 PM

Main page of the gallery
Sorry for the to lazy to edit them out
HTML Code:

<style type="text/css">
<!--
body {
        background-image: url(theme/images/overal_bg.gif);
        background-repeat: repeat-x;
        background-color: #DFDEDF;
}
-->

</style>
<link href="theme/stylesheets/css_main.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="wrapper">
  <div id="overal_header">
          [php]<?php include ("theme/body/overal_header.html"); ?>[/php]
  </div>
  <div id="overal_body">
<!-- This is the part that if done correct should load -->
  [php]        <?php include ("gallery/includes/nature_01_content.html"); ?>[/php]
<!-- in the include page the link to the next include
 would be there but how to make it so that it gets placed here
without making 100 pages of the includes AND this page? -->

  </div>
  <div id="overal_footer">
          [php]<?php include ("theme/body/overal_footer.html"); ?>[/php]
  </div>
</div>
</body>
</html>



All times are GMT. The time now is 02:19 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0