Free Adult Tube-Video Script Forum
How to add a new page to your script - Printable Version

+- Free Adult Tube-Video Script Forum (http://freeadultscript.com/forum)
+-- Forum: My Category (/forumdisplay.php?fid=1)
+--- Forum: Tutorials (/forumdisplay.php?fid=8)
+--- Thread: How to add a new page to your script (/showthread.php?tid=1814)



How to add a new page to your script - Punktured - 09-12-2011 12:43 PM

In this tutorial I will show you how to properly add a new page to your script,
when I say properly I mean; it will have the same url structure as other pages.
Quote:http://www.domain.com/?option=newpage

I will also show you how to add a line into your htaccess file for this new page so that you can have a link like;
Quote:htt://www.domain/com/newpage

First, adding our page.

1. Open the /include/functions.php file.

2. Do a text search for
Quote:switch ($_GET['option']) {

3. Under that line, is where we are going to add our new page. Here is an example;
Code:
case "newpage":
return '<h1 class="title">New Page Title</h1>
          <center>New Page Content.</center>';
break;

Second, adding a link to this page in the menu.

1. Open the /include/functions.php file.

2. Do a text search for
Quote:function call_menuler()

3. This is our menu function, you should be able to see the structure it uses with ul and li, here is an example of adding our new page;
Code:
function call_menuler() {
global $root_url,$lcl;
return '<li><a href="'.$root_url.'">'.$lcl['homepage'].'</a></li>
<li><a href="'.$root_url.'">'.$lcl['videos'].'</a></li>
<li><a href="'.$root_url.'?option=popular">'.$lcl['popularvideos'].'</a></li>
<li><a href="'.$root_url.'?option=games">'.$lcl['games'].'</a></li>
<li><a href="'.$root_url.'?option=populargames">'.$lcl['populargames'].'</a></li>
<li><a href="'.$root_url.'?option=contact">'.$lcl['contact'].'</a></li>
<li><a href="'.$root_url.'?option=newpage">New Page</a></li>';
}

Now, you have the new page, and a menu link.
Next we will add a line to the htaccess file for a neater url. (The htaccess file that is in your root_dir)

Third, adding to htaccess.

1. Open .htaccess file.

2. Add this line to the file (edit for your own page name
Code:
RewriteRule ^newpage /?option=newpage [NC]

Note:
You shouldnt have to, but if it doesnt work the first time, try clearing your cache files.


RE: How to add a new page to your script - mrkinkys - 17-02-2012 08:44 PM

So on the New Page where it says New Page Content is that where we put the new page content at like a link to a new page?


RE: How to add a new page to your script - Punktured - 18-02-2012 12:37 PM

if i wanted a page that said "HI" on it,
i would put "HI" where it says "new page content".


RE: How to add a new page to your script - mrkinkys - 21-02-2012 12:23 AM

So sorry for being such a pain I have another question so if I wanted like a link list to different pages I would put it there? Like a list of different Pornstar Names that you can click on to view there profile with a image gallery for them?


(18-02-2012 12:37 PM)Punktured Wrote:  if i wanted a page that said "HI" on it,
i would put "HI" where it says "new page content".



RE: How to add a new page to your script - Punktured - 22-02-2012 03:05 PM

correct.
but if those pornstar profiles and galleries were also to be hosted on your site,
your looking at much more work.