PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 09-14-2004, 04:23 AM   #1
guynemer
Green Mole
 
Join Date: Sep 2004
Posts: 5
Problems with PHP in templates with version 1.8.3

I've tried every methods i've seen on the forum , but it seems that none of them works for the version 1.8.3 of phpdig

I just need to include a header , and 2 other files , contituting my 2 menus, nothing special.

Could anyone offer some help ?

Thx in advance.

Last edited by guynemer; 09-14-2004 at 04:25 AM.
guynemer is offline   Reply With Quote
Old 09-14-2004, 04:29 AM   #2
guynemer
Green Mole
 
Join Date: Sep 2004
Posts: 5
Problems with PHP in templates with version 1.8.3

I've tried every methods i've seen on the forum , but it seems that none of them works for the version 1.8.3 of phpdig

I just need to include a header , and 2 other files , contituting my 2 menus, nothing special.

Could anyone offer some help ?

Thx in advance.
guynemer is offline   Reply With Quote
Old 09-14-2004, 06:50 AM   #3
guynemer
Green Mole
 
Join Date: Sep 2004
Posts: 5
Problems with navigating within the result pages

I've created a template to use with phpdig.The first result page works fine using the template (except for the php part , but that should be solved soon), but if I try to go to the next page using the following tags :

<phpdig:previous_link src='./tpl_img/left.gif'/><phpdig:pages_bar/><phpdig:next_link src='./tpl_img/right.gif'/>


the customized template is no longer used and the next page (the n°2 actually) is displayed with the default template (phpdig.html by default).

How can I solve this ??

I've tried the demo versions , without changing anything , and the same thing occurs.Let's say you launch your search, then swap to the yellow.html template.Then let's say you have 2 resut pages , you want to go to the next one, then that's where ther's a problem : The page is displayed again with the phpdig.html template.

Thx in advance for any solutions.

Just in case , here's the code I'm using for my template:

Quote:
<html>
<head>
<title><phpdig:title_message/></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<phpdig:js_for_clicks/>
<link href="templates/fr_styles.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5">
<tr align="center">
<td>&nbsp;</td>
<td><phpdig:previous_link src='./tpl_img/left.gif'/><phpdig:pages_bar/><phpdig:next_link src='./tpl_img/right.gif'/></td>
<td>&nbsp;</td>
</tr>
<phpdig:results>
<tr>
<td width="30" align="center" valign="bottom" bgcolor="#F5F5F5"><b><img src="templates/puce_bleue.gif" width="17" height="16" align="absmiddle"><phpdig:n/></b></td>
<td bgcolor="#F5F5F5"><font color="#FFFFFF"><b><phpdig:page_link/></b></font></td>
<td align="right" bgcolor="#F5F5F5"><a href="<phpdig:complete_path/>" class=lire>&gt;&gt;&gt;Lire</a> </td>
</tr>
<tr></tr>
<tr>
<td width="30" rowspan="2">&nbsp;</td>
<td><phpdig:text/> </font> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font size="1">[<phpdig:filesize/> kb] <i><phpdig:update_date/> <phpdig:complete_path/></i></font></td>
<td>&nbsp;</td>
</tr>
</phpdig:results>
<tr align="center">
<td bgcolor="#E0E0E0">&nbsp;</td>
<td bgcolor="#E0E0E0"><phpdig:previous_link src='./tpl_img/left.gif'/><phpdig:pages_bar/><phpdig:next_link src='./tpl_img/right.gif'/></td>
<td bgcolor="#E0E0E0">&nbsp;</td>
</tr>
</table>

</body>
</html>
guynemer is offline   Reply With Quote
Old 09-14-2004, 06:59 AM   #4
guynemer
Green Mole
 
Join Date: Sep 2004
Posts: 5
Hey I4m kinda having the same problem.

The difference is that I'm not trying to include a html file , but a php.

include (../menu.php);

What changes should I do so that the above include works in my customized template html page ?
guynemer is offline   Reply With Quote
Old 09-14-2004, 07:09 AM   #5
guynemer
Green Mole
 
Join Date: Sep 2004
Posts: 5
Problems with navigating within the result pages

I've created a template to use with phpdig.The first result page works fine using the template (except for the php part , but that should be solved soon), but if I try to go to the next page using the following tags :

<phpdig:previous_link src='./tpl_img/left.gif'/><phpdig:pages_bar/><phpdig:next_link src='./tpl_img/right.gif'/>


the customized template is no longer used and the next page (the n°2 actually) is displayed with the default template (phpdig.html by default).

How can I solve this ??

I've tried the demo versions , without changing anything , and the same thing occurs.Let's say you launch your search, then swap to the yellow.html template.Then let's say you have 2 resut pages , you want to go to the next one, then that's where ther's a problem : The page is displayed again with the phpdig.html template.

Thx in advance for any solutions.

Just in case , here's the code I'm using for my template:

Quote:
<html>
<head>
<title><phpdig:title_message/></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<phpdig:js_for_clicks/>
<link href="templates/fr_styles.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5">
<tr align="center">
<td>&nbsp;</td>
<td><phpdig:previous_link src='./tpl_img/left.gif'/><phpdig:pages_bar/><phpdig:next_link src='./tpl_img/right.gif'/></td>
<td>&nbsp;</td>
</tr>
<phpdig:results>
<tr>
<td width="30" align="center" valign="bottom" bgcolor="#F5F5F5"><b><img src="templates/puce_bleue.gif" width="17" height="16" align="absmiddle"><phpdig:n/></b></td>
<td bgcolor="#F5F5F5"><font color="#FFFFFF"><b><phpdig:page_link/></b></font></td>
<td align="right" bgcolor="#F5F5F5"><a href="<phpdig:complete_path/>" class=lire>&gt;&gt;&gt;Lire</a> </td>
</tr>
<tr></tr>
<tr>
<td width="30" rowspan="2">&nbsp;</td>
<td><phpdig:text/> </font> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font size="1">[<phpdig:filesize/> kb] <i><phpdig:update_date/> <phpdig:complete_path/></i></font></td>
<td>&nbsp;</td>
</tr>
</phpdig:results>
<tr align="center">
<td bgcolor="#E0E0E0">&nbsp;</td>
<td bgcolor="#E0E0E0"><phpdig:previous_link src='./tpl_img/left.gif'/><phpdig:pages_bar/><phpdig:next_link src='./tpl_img/right.gif'/></td>
<td bgcolor="#E0E0E0">&nbsp;</td>
</tr>
</table>

</body>
</html>
guynemer is offline   Reply With Quote
Old 09-14-2004, 07:15 AM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Please quit posting this all over the forums. It is clear that you saw the posts were moved here, so just wait and see if someone comes by to answer your question.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 09-14-2004, 08:38 AM   #7
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
guynemer,

Have you checked out this thread? It really shouldn't matter whether you're using a template that has PHP or plain old HTML. The suggestions in that thread should work for making a custom template.

Hope this helps.
vinyl-junkie is offline   Reply With Quote
Old 09-15-2004, 12:12 AM   #8
guynemerp
Green Mole
 
Join Date: Sep 2004
Posts: 9
Problems with navigating within the result pages

Hi.I've got several problems with version 1.8.3. oh phpdig.

I have a problem with the result pages once the search has been done.When I have more than 10 results , it obviously shows the naviguating numbers and arrows to browse th other result pages.It works fine untill I don't use any template.For instance if I chsse the yellow.html template , it worjks fine for the first page , but when i click on page 2, the template is not used anymore , it just displays the results using the defautl template.

How can I solve this ?

Heres my customised template just in case:

Quote:
<html>
<head>
<title><phpdig:title_message/></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<phpdig:js_for_clicks/>
<link href="templates/fr_styles.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5">
<tr align="center">
<td>&nbsp;</td>
<td><phpdig:previous_link src='./tpl_img/left.gif'/><phpdig:pages_bar/><phpdig:next_link src='./tpl_img/right.gif'/></td>
<td>&nbsp;</td>
</tr>
<phpdig:results>
<tr>
<td width="30" align="center" valign="bottom" bgcolor="#F5F5F5"><b><img src="templates/puce_bleue.gif" width="17" height="16" align="absmiddle"><phpdig:n/></b></td>
<td bgcolor="#F5F5F5"><font color="#FFFFFF"><b><phpdig:page_link/></b></font></td>
<td align="right" bgcolor="#F5F5F5"><a href="<phpdig:complete_path/>" class=lire>&gt;&gt;&gt;Lire</a> </td>
</tr>
<tr></tr>
<tr>
<td width="30" rowspan="2">&nbsp;</td>
<td><phpdig:text/> </font> </td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font size="1">[<phpdig:filesize/> kb] <i><phpdig:update_date/> <phpdig:complete_path/></i></font></td>
<td>&nbsp;</td>
</tr>
</phpdig:results>
<tr align="center">
<td bgcolor="#E0E0E0">&nbsp;</td>
<td bgcolor="#E0E0E0"><phpdig:previous_link src='./tpl_img/left.gif'/><phpdig:pages_bar/><phpdig:next_link src='./tpl_img/right.gif'/></td>
<td bgcolor="#E0E0E0">&nbsp;</td>
</tr>
</table>

</body>
</html>
guynemerp is offline   Reply With Quote
Old 09-15-2004, 12:16 AM   #9
guynemerp
Green Mole
 
Join Date: Sep 2004
Posts: 9
That's a start of help , but I've seen many methods , I don't know which one to try.

And furthermore , I'm not trying to include a header or a footer , just a file in the "regular" body.

I'm a newbie , and I'm not sure it works with many includes.
guynemerp is offline   Reply With Quote
Old 09-15-2004, 03:33 AM   #10
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
In search_function.php find:
PHP Code:
$url_bar SEARCH_PAGE."?browse=1&amp;query_string=".urlencode($my_query_string_link)."$refine_url&amp;limite=$limite&amp;option=$option&amp;lim_start="
And replace with the following:
PHP Code:
if (!isset($_GET['template_demo'])) { $_GET['template_demo'] = ""; }
$url_bar SEARCH_PAGE."?template_demo=".$_GET['template_demo']."&amp;browse=1&amp;query_string=".urlencode($my_query_string_link)."$refine_url&amp;limite=$limite&amp;option=$option&amp;lim_start="
And please quit posting this message in other forums.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 09-15-2004, 04:15 AM   #11
guynemerp
Green Mole
 
Join Date: Sep 2004
Posts: 9
Thx a lot , and sorry for the multipost.

Maybe you can help me finding an ultimate solution for using php any way I want in the template file.I'm really lost within the different methods.
guynemerp is offline   Reply With Quote
Old 09-15-2004, 05:33 AM   #12
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
In looking at what you're trying to accomplish, I steered you the wrong way initally. Sorry about that.

Did you try what Charter suggested? I've looked at the code in that section, and it's definitely where you need to make the change to get what you want. Try that and post back here to let us know how that worked for you.
vinyl-junkie is offline   Reply With Quote
Old 09-15-2004, 06:20 AM   #13
guynemerp
Green Mole
 
Join Date: Sep 2004
Posts: 9
What Charter told me worked perfectly with the naviguating problem.

However now I'm facing another problem with the php code in the templates.
guynemerp is offline   Reply With Quote
Old 09-15-2004, 07:05 AM   #14
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
Quote:
Originally Posted by guynemerp
What Charter told me worked perfectly with the naviguating problem.

However now I'm facing another problem with the php code in the templates.
Well, you gotta tell us what it is before we can help you.
vinyl-junkie is offline   Reply With Quote
Old 09-15-2004, 07:35 AM   #15
guynemerp
Green Mole
 
Join Date: Sep 2004
Posts: 9
Silly me...

Well , I need to include php files evrywhere in my customized template file.

For instance in my template.html , I need to include a fiel called menu.php , which itself contains in its code another include , like a cascade of incldues if you want.

I've tried a couple of methods I've seen on the forum , but so far in vain.

Would there be any generic method so that any php code is interpretated in the template file ?
guynemerp is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT -8. The time now is 09:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.