|
09-15-2004, 05:04 PM | #16 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
If you want to include some PHP code, then you do need to have a look at that thread I referenced above. Forget about the fact that that particular example is for headers and footers on your customized template. That type of coding is good for any sort of include file which must be parsed. The code that utilizes it can be placed anywhere inside that template file.
Tell me what you want in your custom template and where you want it to go, and I'll write the code for you to show you what I'm talking about. |
09-16-2004, 12:31 AM | #17 | |||
Green Mole
Join Date: Sep 2004
Posts: 9
|
Thx A LOT in advance !!
Here's the inital page , the one I have to use to keep the same layout Quote:
In the middle , I'll insert the HTML code of the template file I posted just above. You'll see that there are many includes in the page I just posted. Just in case , here's the code of the files to include : HEADER.INC.PHP Quote:
MENU.INC.PHP Quote:
|
|||
09-16-2004, 12:33 AM | #18 | |
Green Mole
Join Date: Sep 2004
Posts: 9
|
NAVER.INC.PHP
Quote:
OK , it was very long , sorry ...but I hope you'll get the picture |
|
09-19-2004, 03:51 PM | #19 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
OK, here's one way of doing this.
In search_function.php, add the following code right after the function statement: Code:
ob_start(); require("/path/to/header.inc.php"); $my_header_file = ob_get_contents(); ob_end_clean(); ob_start(); require("/path/to/menu.inc.php"); $my_menu_file = ob_get_contents(); ob_end_clean(); ob_start(); require("/path/to/nav.inc.php"); $my_nav_file = ob_get_contents(); ob_end_clean(); ob_start(); require("/path/to/naver.inc.php"); $my_naver_file = ob_get_contents(); ob_end_clean(); Code:
$t_mstrings = compact('js_for_clicks','rss_feed_link','powered_by_link','title_message','phpdig_version','result_message','nav_bar','ignore_message','ignore_commess','pages_bar','previous_link','next_link','templates_links'); Code:
$t_mstrings = compact('my_header_file ','my_menu_file ','my_nav_file ','my_naver_file ','js_for_clicks','rss_feed_link','powered_by_link','title_message','phpdig_version','result_message','nav_bar','ignore_message','ignore_commess','pages_bar','previous_link','next_link','templates_links'); Code:
<?include("inc/header.inc.php");?> Code:
<phpdig:my_header_file/> Code:
"<?include("inc/menu.inc.php");?> Code:
<phpdig:my_menu_file/> Code:
"<?include("inc/nav.inc.php");?> Code:
<phpdig:my_nav_file/> Code:
"<?include("inc/naver.inc.php");?> Code:
<phpdig:my_naver_file/> |
09-20-2004, 01:08 AM | #20 |
Green Mole
Join Date: Sep 2004
Posts: 9
|
So far it seems to work the way I wanted , thx a lot
Right now , I'm looking for the place I can customize the text message displayed when using the tag <phpdig:result_message/> and <phpdig:nav_bar/> |
09-20-2004, 04:27 AM | #21 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
The code for both those things is in search_function.php. What exactly do you want to do?
|
09-23-2004, 12:02 AM | #22 |
Green Mole
Join Date: Sep 2004
Posts: 9
|
Thx a lot , I managed to find the stuffs I wanted to change
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PHP includes in templates | gman | How-to Forum | 14 | 12-03-2004 10:02 PM |
Version 1.8.0 Install Problems | Charter | Mod Submissions | 9 | 01-23-2004 08:08 PM |
PHP eval support in templates | joeboe | How-to Forum | 3 | 12-08-2003 10:37 PM |
Using PHP include in templates | sid | How-to Forum | 3 | 11-23-2003 06:06 AM |
Templates - cannot get index.php to display different one | jirving | How-to Forum | 9 | 09-29-2003 05:57 AM |