Adding custom pages to THT - Printable Version +- THT Community (https://thehostingtool.com/forum) +-- Forum: THT Support (https://thehostingtool.com/forum/forum-7.html) +--- Forum: THT General Support (https://thehostingtool.com/forum/forum-8.html) +---- Forum: Tutorials and FAQs (https://thehostingtool.com/forum/forum-12.html) +---- Thread: Adding custom pages to THT (/thread-736.html) Pages:
1
2
|
Adding custom pages to THT - rollthebones - 04-18-2010 As you can see here, I have added some custom pages to my THT installation. Here's how it's done, in case you're interested. First, decide what the page will be called. For example's sake, the page will be called "Why us?", and the URL will be "/whyus". Make a directory in your THT root called "whyus", and touch a file called "index.php". Paste this and save: PHP Code: <?php Now go to http://yourhosting.com/tht/whyus - You should get this: Now, edit these PHP variables to your liking: define("PAGE", "Why us?"): The title of your page. In <title> and the navbar button define("SUB", "We're different"): As far as I can tell, this is only used in <title> define("INFO", "Something else here"): This is shown in small text at the top right of the page. $c_sidebar_title: The title above the sidebar $c_sidebar: The content in the sidebar $c_main_title: The title above the main content box $c_main: The contents of the main content box Now, we need to add this page to the navbar! Here's how: 1) Log in to your THT admin 2) Click "Look and Feel" in the sidebar 3) Click "Navbar editor" 4) Click "Add NavBar link" - Name: Must be the same as "define("PAGE".......", otherwise the tab won't be "selected" when you happen to be on that page. - Icon: Choose one. - Link: Should be "whyus" or whatever you named the directory we made earlier 5) Drag it to wherever you want, then save and refresh. If you did everything right, you should be done. If you want a custom page to be the default page (Like I have), you need to make a database edit. Go into phpMA and open up "tht_config". Find "default" and change "order" to "whyus" (your directory name. If you're doing this, you probably want "home", "welcome", etc). RE: Adding custom pages to THT - Kevin - 04-18-2010 Very nice! I like how you extended it when the system itself doesn't make it very easy. RE: Adding custom pages to THT - rollthebones - 04-18-2010 Thanks Also, If you want stackable boxes, it can be done with this: PHP Code: echo '<div id="left">'; RE: Adding custom pages to THT - Jonny - 04-18-2010 Surely this could made into a plugin that ties dynamically into the ACP? RE: Adding custom pages to THT - rollthebones - 04-18-2010 (04-18-2010, 05:48 PM)Jonny Wrote: Surely this could made into a plugin that ties dynamically into the ACP? I don't know enough about THT's innards, or PHP to accomplish that. RE: Adding custom pages to THT - Andraž Rihtar - 04-19-2010 Awesome tutorial! I'm sure that I'll use this, thanks for sharing RE: Adding custom pages to THT - ciarannll - 01-08-2011 why cant i use HTML ??? RE: Adding custom pages to THT - luke - 03-06-2011 Very Nice! might have to use this RE: Adding custom pages to THT - uninvited13th - 03-27-2011 hey, How can I include a php script on that? coz it seems like it only accepts html? RE: Adding custom pages to THT - Bob - 03-28-2011 We need some pre-made pages, . |