Re: [SMARTY] overlib template
| From: | messju mohr | Date: | Thu, 01 Apr 2004 17:28:48 +0000 |
| Subject: | Re: [SMARTY] overlib template | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11199@lists.php.net to get a copy of this message | ||
On Thu, Apr 01, 2004 at 06:11:40PM +0100, pete M wrote:
> Have tries the following code...
>
> {include file="pop_stat.inc.html" assign="pop"}
> <A href="#" {popup sticky=true caption="mypage contents"
> text="$pop" snapx=10 snapy=10}>mypage</A>
>
> but the html is all garbles with \r etc
>
> <a href="#" onmouseover="return overlib('<!DOCTYPE HTML PUBLIC
> "-//W3C//DTD HTML 4.01
> Transitional//EN>\r\r<html>\r\r<head>\r\r<title>Untitled
> Document</title>\r\r<meta http-equiv="Content-Type" content="text/html;
>
> charset=iso-8859-1">\r\r</head>\r\r\r\r<body>\r\r<table
> width="100%"
> border="0" cellspacing="0" cellpadding="2">\r\r
> <tr>\r\r <td>Set
> Status</td>\r\r <td> </td>\r\r
> <td> </td>\r\r
>
> I've tried text="$pop|escape:html" and escape|javascript.
>
> is there a way around that ?
I think this is a bug in the popup-plugin. what would be the correct
way to escape this? i guess running htmlspecialchars, so that it
becomes like:
<a href="#" onmouseover="return
overlib('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN>\r\r<html>\r\r<head>\r\r<title>Untitled
Document</title>\r\r<meta http-equiv="Content-Type"
content="text/html;
charset=iso-8859-1">\r\r</head>\r\r\r\r<body>\r\r<table
width="100%" border="0" cellspacing="0"
cellpadding="2">\r\r <tr>\r\r <td>Set
Status</td>\r\r <td> </td>\r\r
<td> </td>\r\r
would that be working out?
> tia
> pete
>
> Monte Ohrt wrote:
>
> >On Thu, 2004-04-01 at 10:35, pete M wrote:
> >
> >>hi all
> >>It is possible to include a template contents into the opverlib popup
> >>
> >>don't quite know how to explain, but I want to use {popup} to show a set
> >>of links to navigate, however I don't really want to put all that code
> >>into the text attrib
> >>
> >>eg
> >><A href="mypage.html" {popup sticky=true caption="mypage
> >>contents"
>
> >>>>text="<long><html><line>................{$with_vars}</html"
> >>snapx=10 snapy=10}>mypage</A>
> >>
> >>suppose what I really want is
> >>text="{include file="popup_template.inc.tpl}"
> >
> >
> >This should get the text to the attribute:
> >
> >{include file="popup_template.inc.tpl" assign="content"}
> >{popup ... text=$content}
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php