Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Problems with overlib and smarty in Apache/Windows Xp

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
fabhren
Smarty Rookie


Joined: 29 Jun 2003
Posts: 9

PostPosted: Sun Jun 29, 2003 11:36 am    Post subject: Problems with overlib and smarty in Apache/Windows Xp Reply with quote

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
View user's profile Send private message
fabhren
Smarty Rookie


Joined: 29 Jun 2003
Posts: 9

PostPosted: Sun Jun 29, 2003 8:05 pm    Post subject: Figured out Reply with quote

Idea 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.
Very Happy
Back to top
View user's profile Send private message
BlueTrin
Smarty Rookie


Joined: 05 Jul 2003
Posts: 9

PostPosted: Sat Jul 05, 2003 11:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
fabhren
Smarty Rookie


Joined: 29 Jun 2003
Posts: 9

PostPosted: Tue Aug 05, 2003 10:11 pm    Post subject: Take the end code out for compatibility Reply with quote

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
View user's profile Send private message
burn
Smarty n00b


Joined: 20 Oct 2003
Posts: 2

PostPosted: Mon Oct 20, 2003 11:34 am    Post subject: Reply with quote

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
View user's profile Send private message
burn
Smarty n00b


Joined: 20 Oct 2003
Posts: 2

PostPosted: Mon Oct 20, 2003 11:46 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP