Advertisement:

How to make a Custom "index.php"

Aloittaja l_nix, maaliskuu 11, 2008, 03:37:17 IP

« edellinen - seuraava »

l_nix

Is there a way with the admin panel to build the first page of www.myforum.com to have the exact look and nav menu bar but have my own content below that. 

Like www.simplemachines.org
and then
www.simplemachines.org/community/index.php

The site i am building has 2 pages of info and then the forum as the main interest.  The two pages are a splash page of what the federation does and then a page for press releases.  I would like the home button to open the splash/about us page, and i know how i can add a new button for press release, then link it to this page. There is no problem building these pages, but do I need to treat the nav menu as a <div class="top_header_NavMenu"> and then the info for the splash/about us page can be in the <div class="main_content"> .  Where do i start... what files can i edit to make this happen.

Someone have a simple solution for me?

Appreciate the help,

Warmly

l_nix

metallica48423

well, you could use SSI.php to build a new page and load the header and footer, for example.


<?php
include('/path/to/SSI.php');

template_main_above();

// Your Site content here

template_main_below();
?>



you can also load only the menu by doing ssi_menu(); (this is included in template_main above();) after loading SSI.php (this would allow you to put it inside your div, if necessary.

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

LainaaMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

l_nix

metallica48423 :

Thanks for that, i will look into that now.

Clarification: SSI.php is what exactly, it's functionality?

<?php
include('/path/to/SSI.php');

template_main_above();

// Your Site content here:  ---- Do i write this just as html or is it a php command calling up a file?

template_main_below();
?>



Excuse the ignorance with PHP, i'll be up to speed quickly.

So as of now, the index.php is the standard SMF index.php page, once i build my splash page ( which will be index.php) and create the new forum link in the nav menu to go to myforum.php, will i need to alter anything other than navigation links since i've given the altered this index.php? 

Good explanation by they, clean and clear.
thanks.
l_nix

PS. Puppets or Justice? Your call?

metallica48423

I wouldn't reccommend replacing your index.php with that, It'd work and all for the front page but your forum wouldn't work :P.

I would reccommend taking the path of moving the forums to /forums or something, so that your frontpage will reside in / and your forums in /forums.  So that the index.php's can be seperate.  This is what i do for my site -- using SSI.php will allow you to load several forum related options.

see these pages:

http://www.simplemachines.org/community/index.php?topic=12936.0
http://www.simplemachines.org/community/index.php?topic=13016.0
http://www.simplemachines.org/community/index.php?topic=13205.0

Master has a lot of highly energetic and melodic songs, Justice has a lot of musically complex songs.  I'm torn, but overall i'm going to have to go with Master ;).
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

LainaaMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

l_nix

metallica48423, Nice work!

That took a bit of stitching but once i got it all figured out... piece of cake.    I am just trying to get a drop down language menu to be present in the <template_main_above();>  can you point me in the correct direction to add this as an option?  It displays the search, so i can imagine it's simple to just call to the languages drop down menu.???  The default language is set to FRENCH_Utf8, but i want to be able to change it no matter what page, hence the beauty of the SSI.php.

Good call on the Master... i pulled a late one working on my project, garage days, lightening, and mixed it up with a little pantera... some nights are metal, some are jazz... however, i was surprisingly productive last night.

Thanks again for the above.

Charles Hill


Advertisement: