Jump to content

Recommended Posts

hey.

i am a template and the entire site follows it.

i'm wondering is it possible to create a page on my site (only i have access to it), that would have textareas, i could plug the unique info or code into it, specify the name of the folder and index.php to be created, and click go and it would create the page

 

??????????

Link to comment
https://forums.phpfreaks.com/topic/83005-creating-pages-really-fast/
Share on other sites

i have a template.

 

i want to create a code ( i know its gonna be more complicated then this but heres the jist of it...)

 

textarea 1

textarea 2

textarea 3

textarea 4

name of new folder

 

 

it would use the template and put the info i put into those text area and put them in the specified location of textarea 1, etc...

create the new folder, open it, and save the new file as "index.php"

 

i know huge sites like youtube and aol use this, i just don;t know how.

 

 

Now that I'm done laughing, I will talk to the template.

 

You have a template so what you wanna do is user php to display those template files on each page somethign like

<?php
include("template_top.php");
//Some content here
include("template_bottom.php");
?>

How you generate that //Some content here is up to you, database, hardcode files, included file, etc

Yes it's possible, my new site does it, I spent two weeks writing it.

 

You create a new folder, and then you can use the file manager to edit the files. The editor automatically adds the paragraph tags and the alt tag to images. It supports a tag called blurb, which creates a new file with the blurb text inside it, while still leaving the text as part of the first document. It also supports <blurb strip='true'>, which removes the text from the document. It also supports a video tag, which takes an flv file as a source parameter and writes out all the code to embed my flv player, with that video as a parameter. The image and video tags can be inserted with dialogs in the editor.

 

The site is templated, but all the code is kept out of the templates. The most complex page is:

 

<h1 style='text-align: right; margin-bottom: 5px'><?php echo $game['name']; ?></h1>
<div style='text-align: right; margin-bottom: 25px'><?php echo date('F j, Y', ($game['reviewdate']+1)*86400); ?></div>
<div style='text-align: left; margin-bottom: 25px'>Publisher: <a href='<?php echo $game['publisherwebsite']; ?>'><?php echo $game['publisher']; ?></a></div>
<div style='text-align: left; float: left; width: 100px'>Graphics:</div><?php echo $game['graphics']; ?><br clear='all'>
<div style='text-align: left; float: left; width: 100px'>Sound:</div><?php echo $game['sound']; ?><br clear='all'>
<div style='text-align: left; float: left; width: 100px'>Stability:</div><?php echo $game['stability']; ?><br clear='all'>
<div style='text-align: left; float: left; width: 100px'>Overall:</div><?php echo $game['overall']; ?><br clear='all'>
<?php
include ($game['folder'].'review.php');
?>
<div style='text-align: center; margin-bottom: 25px'><a href='<?php echo $game['swf']; ?>' target='_blank'>Play</a></div>

 

And all the URL's are rewritten with mod_rewrite.

 

You might want to look into Joomla.

I think what he wants to do is create a CMS,

you will need to use a mysql database to do what you want to do....

 

or, heres what I have done before on

some websites i have worked on before.

 

(its similar to what cooldude832 posted)

 

first, create a file containing your template and simply

put this line of code where you want your page content to appear:

<?php pageContent(); ?>

 

now for each page, insert this code

 

<?php

function pageContent(){
?>
<p>This is my website. Blah blah blah....</p>
<?php
}

include("template.php");

?>

 

insert your page content where it says

<p>This is my website. Blah blah blah....</p>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.