Popup window
Popup window
Hello developers,
Sometimes I need to publish the entry page very, very important short message.
I would be very liked a similar solution as shown here http://famnissen.dk/cmsimple_addon/?Welcome
It is feasible and does anyone have any idea?
Thank you, Josef
Sometimes I need to publish the entry page very, very important short message.
I would be very liked a similar solution as shown here http://famnissen.dk/cmsimple_addon/?Welcome
It is feasible and does anyone have any idea?
Thank you, Josef
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates
http://oldnema.compsys.cz/en/?Demo_templates
Re: Popup window
Hi Josef,
you can do it with hi_Fancybox. activate has to be 1. Make a new hidden CMSimple page called "Important" that contains the message. Then insert on your start page in source code mode:
This should open the Fancybox automatically in view mode. The link is not strictly necessary, but it's probably a good idea to have it, so a visitor having JS disabled can view the message nonetheless.
Note that the <script> can not be seen in the WYSIWYG mode, so be careful to not delete it accidentially.
Christoph
you can do it with hi_Fancybox. activate has to be 1. Make a new hidden CMSimple page called "Important" that contains the message. Then insert on your start page in source code mode:
Code: Select all
<a id="important" href="?Important&print">Important Message</a></p>
<script type="text/javascript">// <![CDATA[
jQuery(function() {jQuery('#important').fancybox().click()})
// ]]></script>
Note that the <script> can not be seen in the WYSIWYG mode, so be careful to not delete it accidentially.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: Popup window
YEP! That's what I needed, works perfectly!cmb wrote:Hi Josef,
you can do it with hi_Fancybox. activate has to be 1. Make a new hidden CMSimple page called "Important" that contains the message. Then insert on your start page in source code mode:This should open the Fancybox automatically in view mode. The link is not strictly necessary, but it's probably a good idea to have it, so a visitor having JS disabled can view the message nonetheless.Code: Select all
<a id="important" href="?Important&print">Important Message</a></p> <script type="text/javascript">// <![CDATA[ jQuery(function() {jQuery('#important').fancybox().click()}) // ]]></script>
Note that the <script> can not be seen in the WYSIWYG mode, so be careful to not delete it accidentially.
Christoph
Christoph, really, very, very much - Josef
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates
http://oldnema.compsys.cz/en/?Demo_templates
Re: Popup window
Is it possible to define a class? To the link OK, it's working(see below), but I also need the class "zoom" for the pop up that opens automatically. Otherwise it opens with the default HI-fancy options and not with those that have been configured in the plugin config...
Code: Select all
<p><a class="zoom" href="?simeda:PopUp&print" id="important">Important Message</a></p>
<p> </p>
<script type="text/javascript">// <![CDATA[
jQuery(function() {jQuery('#important').fancybox().click()})
// ]]></script>
Re: Popup window
Hi mitch,
basically that's possible. The main problem is, that the "message" fancybox is triggered from the content, but the settings of hi_fancybox are applied later (see the generated HTML source code). An additional problem is the explicit fancybox().click(), which will cause the fancybox for the message to use the fancybox defaults.
The solution: put the <script>...</script> to the template, just after the <?php echo content();?> and change it slightly:
On the page, you have to write only:
Christoph
basically that's possible. The main problem is, that the "message" fancybox is triggered from the content, but the settings of hi_fancybox are applied later (see the generated HTML source code). An additional problem is the explicit fancybox().click(), which will cause the fancybox for the message to use the fancybox defaults.
The solution: put the <script>...</script> to the template, just after the <?php echo content();?> and change it slightly:
Code: Select all
<?php echo content();?>
<script type="text/javascript">// <![CDATA[
jQuery(function() {jQuery('#important').click()})
// ]]></script>
Code: Select all
<a class="zoom" href="?simeda:PopUp&print" id="important">Important Message</a>
Christoph M. Becker – Plugins for CMSimple_XH
Re: Popup window
Just a thought: it could be used plugin "Privacy XH"
It would be an advantage in that the window popped once.
Josef
It would be an advantage in that the window popped once.
Josef
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates
http://oldnema.compsys.cz/en/?Demo_templates
Re: Popup window
Thanks that works!!cmb wrote:Hi mitch,
basically that's possible. The main problem is, that the "message" fancybox is triggered from the content, but the settings of hi_fancybox are applied later (see the generated HTML source code). An additional problem is the explicit fancybox().click(), which will cause the fancybox for the message to use the fancybox defaults.
The solution: put the <script>...</script> to the template, just after the <?php echo content();?> and change it slightly:On the page, you have to write only:Code: Select all
<?php echo content();?> <script type="text/javascript">// <![CDATA[ jQuery(function() {jQuery('#important').click()}) // ]]></script>
ChristophCode: Select all
<a class="zoom" href="?simeda:PopUp&print" id="important">Important Message</a>
Re: Popup window
How would that work. Thats exactly what I'm searching for now. The pop-up shoud open only once....oldnema wrote:Just a thought: it could be used plugin "Privacy XH"
It would be an advantage in that the window popped once.
Josef
Re: Popup window
Hi mitch,
Privacy_XH is primarily meant to comply to the EU cookie law (and other similar laws). But indeed it might be used for this purpose too (thanks to oldnema's creativity!). It shows the message on every page, but when the user confirms that he read it, the plugin sets a cookie in the visitor's browser. If this cookie is already set, the message won't be shown again.
You have to consider, that switching off the messages requires cookies to be enabled in the visitor's browser, and that a new message will not be shown, if the cookie is still set in the browser (you can configure the durability of the cookie in the back-end).
Christoph
Privacy_XH is primarily meant to comply to the EU cookie law (and other similar laws). But indeed it might be used for this purpose too (thanks to oldnema's creativity!). It shows the message on every page, but when the user confirms that he read it, the plugin sets a cookie in the visitor's browser. If this cookie is already set, the message won't be shown again.
You have to consider, that switching off the messages requires cookies to be enabled in the visitor's browser, and that a new message will not be shown, if the cookie is still set in the browser (you can configure the durability of the cookie in the back-end).
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: Popup window
And how to use it concretely combined with the fancy box script from above.?cmb wrote:Hi mitch,
Privacy_XH is primarily meant to comply to the EU cookie law (and other similar laws). But indeed it might be used for this purpose too (thanks to oldnema's creativity!). It shows the message on every page, but when the user confirms that he read it, the plugin sets a cookie in the visitor's browser. If this cookie is already set, the message won't be shown again.
You have to consider, that switching off the messages requires cookies to be enabled in the visitor's browser, and that a new message will not be shown, if the cookie is still set in the browser (you can configure the durability of the cookie in the back-end).
Christoph