PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   Problems with PHP in templates with version 1.8.3 (http://www.phpdig.net/forum/showthread.php?t=1296)

guynemer 09-14-2004 04:23 AM

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 :no:

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 09-14-2004 04:29 AM

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 09-14-2004 06:50 AM

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 09-14-2004 06:59 AM

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 09-14-2004 07:09 AM

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>


Charter 09-14-2004 07:15 AM

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.

vinyl-junkie 09-14-2004 08:38 AM

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. :)

guynemerp 09-15-2004 12:12 AM

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 09-15-2004 12:16 AM

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. :(

Charter 09-15-2004 03:33 AM

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.

guynemerp 09-15-2004 04:15 AM

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. :no:

vinyl-junkie 09-15-2004 05:33 AM

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.

guynemerp 09-15-2004 06:20 AM

What Charter told me worked perfectly with the naviguating problem.

However now I'm facing another problem with the php code in the templates.

vinyl-junkie 09-15-2004 07:05 AM

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. ;)

guynemerp 09-15-2004 07:35 AM

:eek: 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 ?


All times are GMT -8. The time now is 01:53 AM.

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