|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
fabhren Smarty Rookie
Joined: 29 Jun 2003 Posts: 9
|
Posted: Sun Jun 29, 2003 11:36 am Post subject: Problems with overlib and smarty in Apache/Windows Xp |
|
|
Greetz
Smarty is functioning fine with the following dirs:
\libs
.....\smarty
\cfgs
\javascripts (where is overlib)
\site
(at cfgs i pointed a paths.cfg with :
ini_set("include_path",".;../libs/smarty/;/libs/");
)
but at the demo he puts a :
{popup_init src="/javascripts/overlib.js"} in header.tpl which translated in html goes:
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<script type="text/javascript" language="JavaScript" src="/javascripts/overlib.js"></script>
He shouts :
Tooltip example: Move your mouse over the Help link to see an example of a tooltip using Smarty's popup function.
and immediately he delivers a js error : STICKY is undefined
I've changed js dir a couple thousand times, joined the html with the javascript and nothing seems to solve this problem.
Anyone had this one ?
thx in advance |
|
Back to top |
|
fabhren Smarty Rookie
Joined: 29 Jun 2003 Posts: 9
|
Posted: Sun Jun 29, 2003 8:05 pm Post subject: Figured out |
|
|
Figured out what happened. It's got a block in the lower end of overlib, if you are not upgrading you HAVE to take it out.
|
|
Back to top |
|
BlueTrin Smarty Rookie
Joined: 05 Jul 2003 Posts: 9
|
Posted: Sat Jul 05, 2003 11:47 pm Post subject: |
|
|
Could you detail how to fix it ?
I have installed EasyPHP 1.7b3 (it's a package which installs Apache, PHP and mySQL) then Smarty and I get exactly the same error running the demo.
EDIT: sorry I'm pretty new to web development and I didn t know what was the overlib. If any1 needs the link you can google it pretty easily.
Here's the link: http://www.bosrup.com/web/overlib/#Download%20overLIB |
|
Back to top |
|
fabhren Smarty Rookie
Joined: 29 Jun 2003 Posts: 9
|
Posted: Tue Aug 05, 2003 10:11 pm Post subject: Take the end code out for compatibility |
|
|
Hi
There is a block at the end (+500 lines of code) of overlib that is for compatibility issues only.
I took that out and worked out fine.
Funny that it isn't documented anywhere.
Hope that helped. |
|
Back to top |
|
burn Smarty n00b
Joined: 20 Oct 2003 Posts: 2
|
Posted: Mon Oct 20, 2003 11:34 am Post subject: |
|
|
I got the very same problem and I checked the overlib script. Problem is there are too many compatibility checks.. can't you be more specific, giving out the first line of the block you removed?
thanks |
|
Back to top |
|
burn Smarty n00b
Joined: 20 Oct 2003 Posts: 2
|
Posted: Mon Oct 20, 2003 11:46 am Post subject: |
|
|
oooppss.. found it! but it wasn't at line 500+. With overlib version 3.51 the block was at line 1193 and looks like this:
Code: |
////////////////////////////////////////////////////////////////////////////////////
// OVERLIB 2 COMPATABILITY FUNCTIONS
// If you aren't upgrading you can remove the below section.
////////////////////////////////////////////////////////////////////////////////////
// Converts old 0=left, 1=right and 2=center into constants.
function vpos_convert(d) {
if (d == 0) {
d = LEFT;
} else {
if (d == 1) {
d = RIGHT;
} else {
d = CENTER;
}
}
return d;
}
// Simple popup
function dts(d,text) {
o3_hpos = vpos_convert(d);
overlib(text, o3_hpos, CAPTION, "");
}
// Caption popup
function dtc(d,text, title) {
o3_hpos = vpos_convert(d);
overlib(text, CAPTION, title, o3_hpos);
}
// Sticky
function stc(d,text, title) {
o3_hpos = vpos_convert(d);
overlib(text, CAPTION, title, o3_hpos, STICKY);
}
// Simple popup right
function drs(text) {
dts(1,text);
}
// Caption popup right
function drc(text, title) {
dtc(1,text,title);
}
// Sticky caption right
function src(text,title) {
stc(1,text,title);
}
// Simple popup left
function dls(text) {
dts(0,text);
}
// Caption popup left
function dlc(text, title) {
dtc(0,text,title);
}
// Sticky caption left
function slc(text,title) {
stc(0,text,title);
}
// Simple popup center
function dcs(text) {
dts(2,text);
}
// Caption popup center
function dcc(text, title) {
dtc(2,text,title);
}
// Sticky caption center
function scc(text,title) {
stc(2,text,title);
}
|
I removed it but I still have the problem.. in the end I found out the problem was much simpler. I had my script loaded from the wrong path:
I changed:
Code: | src="/javascript/overlib.js" |
To:
Code: | src="javascript/overlib.js" |
I was working with this folder structure and the demo template provided with smarty:
Code: |
d:\www\htdocs\smartytest\
d:\www\htdocs\smartytest\configs\
d:\www\htdocs\smartytest\templates\
d:\www\htdocs\smartytest\javascript\
d:\www\htdocs\smartytest\index.php
|
I hope this helps. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|