[MOD] Custom Pages

Any hacks and modifications will be in here...

[MOD] Custom Pages

Postby mathewmeihofer » Sat Mar 19, 2011 1:30 am

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?
mathewmeihofer
Newbie Member
 
Posts: 1
Joined: Fri Mar 18, 2011 10:04 pm

Re: Custom Pages

Postby PeterS » Sat Mar 19, 2011 1:59 am

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 :).
PeterS
Global Moderator
 
Posts: 159
Joined: Mon Feb 21, 2011 4:58 am

Re: [MOD] Custom Pages

Postby Seifer » Sat Apr 09, 2011 4:08 pm

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.
Last edited by Seifer on Sat Apr 09, 2011 4:38 pm, edited 1 time in total.
Poorly know English. Please bear with us.
Seifer
Standard Member
 
Posts: 14
Joined: Sat Mar 19, 2011 10:02 pm

Re: [MOD] Custom Pages

Postby SamEA » Sat Apr 09, 2011 4:36 pm

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.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: [MOD] Custom Pages

Postby Seifer » Sat Apr 09, 2011 4:42 pm

I think that what I wrote (2 minutes after you) is easier for people unfamiliar with php. ;)
Poorly know English. Please bear with us.
Seifer
Standard Member
 
Posts: 14
Joined: Sat Mar 19, 2011 10:02 pm

Re: [MOD] Custom Pages

Postby SamEA » Sat Apr 09, 2011 5:32 pm

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.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: [MOD] Custom Pages

Postby shareware » Sat Apr 16, 2011 7:26 am

Looks great Thanks
shareware
Newbie Member
 
Posts: 3
Joined: Sat Apr 16, 2011 7:20 am


Return to Hacks and Modifications

Who is online

Users browsing this forum: No registered users and 1 guest

cron