Page 1 of 1

[MOD] Custom Pages

PostPosted: Sat Mar 19, 2011 1:30 am
by mathewmeihofer
Hey, First off, Great Script. I remember when this script first came out, MiniFile, and than galaxy scripts and now you guys.

I'm just wondering how do I go about making a custom Page? Like for example a about me page? What do I need to include in a .php file?

Re: Custom Pages

PostPosted: Sat Mar 19, 2011 1:59 am
by PeterS
Find in ./index.php
Code: Select all
case "tos": include("./pages/tos.php"); break;
case "faq": include("./pages/faq.php"); break;
case "img": include("./pages/image.php"); break;


Add after
Code: Select all
case "YOURPAGE": include("./pages/YOURPAGE.php"); break


Afterwards, create a file called YOURPAGE.php and include the following information:
Code: Select all
<?php
///////////////////////////////////////////////////////////////////////////
//  Product: Daddy's File Host               
//  Version: 1.2                       
//                        
// by DaddyScripts.com                  
//                               
// original source code by Jim (j-fx.ws) and Steven (galaxyscripts.com)
//////////////////////////////////////////////////////////////////////////

require_once("./config.php");

if(in_array($language, $LANGUAGE_LIST)) {
  include('./lang/'.$language.'.php');
} else {
  include('./lang/'.$LANGUAGE_LIST[0].'.php');
}
include ('./styles/'.$style.'/YOURPAGE.php');
?>


Finally, create another file in ./styles/[STYLE_NAME]/YOURPAGE.php and place your contents inside.

Don't forget to replace YOURPAGE.php with whatever filename you want.

Now it can be accessed by index.php?page=YOURPAGE

Glad you are enjoying our scripts :).

Re: [MOD] Custom Pages

PostPosted: Sat Apr 09, 2011 4:08 pm
by Seifer
Hey,

How do I set my custom homepage?
How do I set image upload on homepage?

Regards,
Seifer



EDIT

./index.php

Change line:
Code: Select all
default: include("./pages/upload.php"); break;


to (if you want have image upload on homepage)
Code: Select all
default: include("./pages/image.php"); break;


or to (if you want have custom homepage)
Code: Select all
default: include("./pages/custom_file_name.php"); break;

and create custom page in file .php in ./pages/ folder.

Re: [MOD] Custom Pages

PostPosted: Sat Apr 09, 2011 4:36 pm
by SamEA
Seifer wrote:Hey,

How do I set my custom homepage?
How do I set image upload on homepage?

Regards,
Seifer


Go to ./styles/Indigo/file_upload_form.php to customize the homepage or alternatively ./pages/upload.php. To add the image upload on the index page, you'll require another frame or else the flash upload progress bar's JavaScript might conflict with the file upload's JavaScript.

Re: [MOD] Custom Pages

PostPosted: Sat Apr 09, 2011 4:42 pm
by Seifer
I think that what I wrote (2 minutes after you) is easier for people unfamiliar with php. ;)

Re: [MOD] Custom Pages

PostPosted: Sat Apr 09, 2011 5:32 pm
by SamEA
Seifer wrote:I think that what I wrote (2 minutes after you) is easier for people unfamiliar with php. ;)


Yes that's probably true, however I thought you wanted to merge the file upload form with the image upload form.

Re: [MOD] Custom Pages

PostPosted: Sat Apr 16, 2011 7:26 am
by shareware
Looks great Thanks