This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Different template


avatar
capslock 0
From: -
Different template

is possible to set a different templat (global header and footer) for review's page?

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Different template
avatar
0
From: -
Different template

Originally posted by capslock:
Using this system (it works perfectly), may be possible to detect user's screen resolution?

You can do it with javascript..example:
<script type="text/javascript">

<!--
var correctwidth=801
if (screen.width>correctwidth) {
document.write('<span style="color:#FFF000">Your screen resolution is higher than 800x600</span>')
} if(screen.width<correctwidth) {
document.write('<span style="color:#FFF000">Your screen resolution is equal or lower than 800x600</span>')
}
//-->
</script>
<noscript><span style="color:#FFF000">for who doesn't have JS</span></noscript>


Edit: remove the whitespace in java script Winking Face
1 Re: Different template
avatar
Administrator
1342
From: Austria
Different template

No, not with PHP.
1 Re: Different template
avatar
OP 0
From: -
Different template

Using this system (it works perfectly), may be possible to detect user's screen resolution?
1 Re: Different template
avatar
Administrator
1342
From: Austria
Different template

You could include an alternative HTML template in both site_header and footer templates. Here an example based on the site_footer template:

<?php

global $insert;

if (!preg_match("/review/i",$_SERVER['PHP_SELF']))
{
$EST_TEMPLATE = <<<TEMPLATE

<!-- Template site_footer -->

</td></table>
</td>
</tr>
<tr bgcolor="#000000">
</tr>
<tr bgcolor="#000000">
<td bgcolor="#33ccff" colspan="1">
<font face="Verdana, Arial, Helvetica" color="#000000" size="1">
<!-- Copyright notice -->
$insert[powered_by]
<!-- Copyright notice -->
</font>
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
<br />
<br />
</body>

</html>

TEMPLATE;
}
else
{
$EST_TEMPLATE = <<<TEMPLATE

<!-- Template site_footer -->
This is an alternative site_footer for the review pages
TEMPLATE;
}
?>

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.