|
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 |
STReNT Smarty n00b
Joined: 16 Jun 2004 Posts: 1
|
Posted: Wed Jun 16, 2004 2:49 pm Post subject: overlib.js Headaches... |
|
|
Ok I finnaly decided to download and give smarty a try as I am looking to code my own website and move away from precoded CMS's.. anyway to the point..
I upload it all and since ive never used the demo I take a look at it.. I get a runtime error or 2 but I was just assuming it was caused by google popup blocker (1 of the errors was caused by that...) so the the other error was caused by the JS call function.
I had a look at the source of the page and it appears a few closing single quotes are missing. but i then relised the js file is not included with smarty anymore, so i download and put it in the appropriate directory.
Still no luck.. figure it must be the missing closing quotes so i have a look through the popup functions.
I had to make several corrections on lines 34, 68, 83 and 87
Line 34
Code: | $append .= ",'" . strtoupper($_key) . "','" . str_replace("'","\'",$_value) . "'"; |
Line 68
Code: | $append .= ",'" . strtoupper($_key) . "','$_value'"; |
Line 83
Code: | if ($_value) $append .= ",'" . strtoupper($_key) . "'"; |
Line 87
Code: | $append .= ",'" . strtoupper($_key) . "',$_value"; |
Still didn't work... So then i had to open up the header.tpl file from the demo templates and replace Line 3 to..
Line 3
Code: | {popup_init src="javascripts/overlib.js"} |
Hurrah it works!!
anyway yeah just letting you know there is a problem there.... |
|
Back to top |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
Posted: Thu Jun 17, 2004 1:37 am Post subject: |
|
|
Did you download the latest version? There was one released just today.
I am asking, because there were problems with the popup function in versions prior to Version 2.6.3. The CVS already included the fix for quite a while, but unless you're running 2.6.3. already, I would recommend that you upgrade. |
|
Back to top |
|
dvdcsere Smarty n00b
Joined: 17 Jun 2004 Posts: 1
|
Posted: Thu Jun 17, 2004 11:49 am Post subject: |
|
|
I had the same problem like STReNT with the freshly downloaded Smarty.
He's right, the overlib.js is missing from the installation and the path is absolute to the root directory of the webserver.
<script type="text/javascript" language="JavaScript" src=" / javascripts/overlib.js"></script>
I'm solved this little problem on my own, but please correct this problem to prevent other users to be unsatisfied with the demo. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Jun 17, 2004 12:00 pm Post subject: |
|
|
dvdcsere wrote: | I'm solved this little problem on my own, but please correct this problem to prevent other users to be unsatisfied with the demo. |
my vote is to remove the {popup}-function from the demo then. |
|
Back to top |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
Posted: Thu Jun 17, 2004 6:49 pm Post subject: |
|
|
No,
I wouldn't remove it from the demo, because so far that plugin is one of the first features one tries to start using. (I know I did and several posts in the forums indicate the same)
However, I recall a note in the readme or maybe in the demo file itself, which stated, that the overlib.js file is *not* included, therefore it should be obvious, that you need to install it and change the demo template to reflect those changes - speaking path-wise.
...and isn't it oh so nice, once you finally got it working ? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Jun 17, 2004 8:26 pm Post subject: |
|
|
I agree with messju--it should be gone from the demo and even the distribution, IMHO.
I think it would be nice if there was a separate distribution of 3rd party tools/plugins/demos but I don't think the base Smarty package should endeavor to support that need. Personally, I'd just as soon keep any tool that had client-side libraries out of Smarty's base. They make great addons, of course
Sure, people like to test out the demos--because they are there. If there was a 3rd party bundle, they would try that out too, I'm sure. This has been talked about many times and I know I have brought it up myself a number of times, but it appears no one has had the time to really flesh something like that out. If someone wants to walk up to the plate this time and get that party started...
Well, as always, that's just my opinion, so do tell if you think otherwise. |
|
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
|
|