Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 24, 2012, 11:05:44 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155449
Posts in
21704
Topics by
7731
Members
Latest Member:
zvaigzdzius
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
New Wrapper Hack!
Pages:
1
2
3
[
4
]
Go Down
Author
Topic: New Wrapper Hack! (Read 18111 times)
Argos
Moderator
Offline
Posts: 2156
Re: New Wrapper Hack!
«
Reply #75 on:
January 06, 2009, 12:36:18 PM »
You know what? It's even simpler than the current wrapper hack. No need for a module at all. Just put the AJAX code in the HEAD of the template, and put the following code in the WYSIWYG (or a code section) where you want the ajax content:
Code:
<script type="text/javascript">
ajaxinclude (rootdomain+"/the-path-to-your-content-file.html")
</script>
Of course you have to edit the path. So if your called content is the file thisfile.html in
www.domain.com/my_includes/
the code would be:
Code:
<script type="text/javascript">
ajaxinclude (rootdomain+"/my_includes/thisfile.html")
</script>
There is no fallback for people without javascript though. Maybe some coder can create a solution for that? Or a combination with the wrapper hack, as a fallback measure?
«
Last Edit: January 06, 2009, 12:39:02 PM by Argos
»
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Luckyluke
Offline
Posts: 555
Re: New Wrapper Hack!
«
Reply #76 on:
January 08, 2009, 09:29:04 PM »
Quote from: Argos on January 06, 2009, 12:36:18 PM
You know what? It's even simpler than the current wrapper hack. No need for a module at all. Just put the AJAX code in the HEAD of the template, and put the following code in the WYSIWYG (or a code section) where you want the ajax content:
Code:
<script type="text/javascript">
ajaxinclude (rootdomain+"/the-path-to-your-content-file.html")
</script>
Hi Jurgen,
And what if I don't want to put the code in the template?
Can I put all the code (ajax-code and the script) in a Code or Code2 snippet?
In Dynamicdrive they told to put the code in the Head section... the module Code/Code2 doesn't put the code in the head-section...
I'm sorry, I didn't test it.
Grtz,
Luc
Logged
Argos
Moderator
Offline
Posts: 2156
Re: New Wrapper Hack!
«
Reply #77 on:
January 08, 2009, 10:09:39 PM »
I'm sorry Luc, I don't know if that will work, you'll have to try it yourself. But I guess it should be in the head, otherwise they would not have wriiten so. But'm not sure, I haven't tested it myself.
If it must be in the head, there are ways to let it load only when it's needed. I've seen that somewhere before (not here though). You'll have to google for it I'm afraid. Maybe there's even a way the other way round: to add it dynamically to the head only when it's needed.
But I'm no coder, so I cannot help you any further... I hope someone will find a clever way to come up with a handy solution.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Luckyluke
Offline
Posts: 555
Re: New Wrapper Hack!
«
Reply #78 on:
January 10, 2009, 11:54:39 AM »
Hi,
I just test this solution from Dynamic Drive and I have to say it works good. BUT... if there is a link inside the Iframe, the page inside the Iframe becomes full screen without the WB template.
In other words: if you have a SMF forum or something, if somebody clicks on an item, the forum pops fullscreen.
So, it's not good for me. It's no real wrapper
Grtz,
Luc
Logged
Argos
Moderator
Offline
Posts: 2156
Re: New Wrapper Hack!
«
Reply #79 on:
January 10, 2009, 02:29:12 PM »
Quote from: Luckyluke on January 10, 2009, 11:54:39 AM
I just test this solution from Dynamic Drive and I have to say it works good. BUT... if there is a link inside the Iframe, the page inside the Iframe becomes full screen without the WB template.
In other words: if you have a SMF forum or something, if somebody clicks on an item, the forum pops fullscreen.
So, it's not good for me. It's no real wrapper
Maybe you can give this alternative a try:
http://www.dynamicdrive.com/forums/showthread.php?t=28662
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Luckyluke
Offline
Posts: 555
Re: New Wrapper Hack!
«
Reply #80 on:
January 22, 2009, 10:55:55 PM »
Quote from: Argos on January 10, 2009, 02:29:12 PM
Maybe you can give this alternative a try:
http://www.dynamicdrive.com/forums/showthread.php?t=28662
I don't have any idea how to implement this in WB.
I put the javascript in my template. So far so good.
And in the HTML section of Code2, I insert
<iframe name="mel" src="some.htm" width="100%" height="300" scrolling="auto" frameborder="1"></iframe>
as discribed... hmmm... height is 300 but must been variable...
Grrrrrrrrtz,
Luc
Logged
Argos
Moderator
Offline
Posts: 2156
Re: New Wrapper Hack!
«
Reply #81 on:
January 22, 2009, 11:00:44 PM »
Hi Luc, doesn't it work at all?
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Luckyluke
Offline
Posts: 555
Re: New Wrapper Hack!
«
Reply #82 on:
January 22, 2009, 11:06:09 PM »
Quote from: Argos on January 22, 2009, 11:00:44 PM
Hi Luc, doesn't it work at all?
Yeps, it shows in a iframe of 300 pixels height. Maybe I did something wrong. Maybe the javascript was'nt activated or I didn't write the code well in the Code2 module.
Because I hardcoded
height="300"
there was a chance it wouldn't work. Strange...
But, if you look at the bottom of this WB forum, it's also in a wrapper. How did Ryan this?
Luc
Logged
Pages:
1
2
3
[
4
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...