System Messages in Modal Window?

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
itdeptcorp01
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sun Jun 08, 2008 3:08 pm

System Messages in Modal Window?

Post by itdeptcorp01 » Sun Dec 06, 2009 7:41 pm

May i ask if anyone has seen or knows how to make Joomla 1.5 "System Messages" open in Modal Windows?
You do not have the required permissions to view the files attached to this post.

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11614
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: System Messages in Modal Window?

Post by ooffick » Mon Dec 07, 2009 11:43 am

You could try something like this:

Code: Select all

window.addEvent('domready', function(e) {
    SqueezeBox.initialize({});
    SqueezeBox.fromElement($('system-message'), {handler: 'adopt'});
});
Olaf
Olaf Offick - Global Moderator
learnskills.org

itdeptcorp01
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sun Jun 08, 2008 3:08 pm

Re: System Messages in Modal Window?

Post by itdeptcorp01 » Mon Dec 07, 2009 9:29 pm

Olaf,

Thank you very much for your help!

Could you point us to which file we should edit to achieve this.. We are not sure which one it its

Thanks again

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11614
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: System Messages in Modal Window?

Post by ooffick » Mon Dec 07, 2009 11:33 pm

Just add it to any JS file.
or add it as a script to the tempalte.

Olaf
Olaf Offick - Global Moderator
learnskills.org

picdome
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Mon Jul 13, 2009 8:20 am
Contact:

Re: System Messages in Modal Window?

Post by picdome » Wed Nov 16, 2011 8:42 am

can you please tell how we can achieve same thing in joomla 1.7

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11614
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: System Messages in Modal Window?

Post by ooffick » Wed Nov 16, 2011 9:47 am

try to add this to the head section of your template's index.php file:

Code: Select all

<?php JHTML::_('behavior.modal'); ?>
<script>
window.addEvent('domready', function(e) {
if($('system-message')) {
    SqueezeBox.initialize({});
    SqueezeBox.fromElement($('system-message'), {handler: 'adopt'});
}
});
</script>
Olaf
Olaf Offick - Global Moderator
learnskills.org

picdome
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Mon Jul 13, 2009 8:20 am
Contact:

Re: System Messages in Modal Window?

Post by picdome » Sun Jan 15, 2012 8:33 pm

nope :( it dint worked

i added that script above the <?php tag is that ok ? but it dint work.

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11614
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: System Messages in Modal Window?

Post by ooffick » Wed Jan 18, 2012 2:20 pm

Which joomla version do you have, which mootools version? does your template change anything in respect to mootools? Do you have any other javascripts loaded. Did you add it to the correct location?

Olaf
Olaf Offick - Global Moderator
learnskills.org

picdome
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Mon Jul 13, 2009 8:20 am
Contact:

Re: System Messages in Modal Window?

Post by picdome » Fri Jan 20, 2012 12:29 pm

joomla version - Joomla! 1.7.2 Stable

am using joomla xtc template,

am a beginer in joomla so not sure about how to find mootools version
but i checked my installation folder and found 3 mootool javascripts
which are

mootools-core-uncompressed.js
mootools-core.js
mootools-more-uncompressed.js

while checking these files i found version as 1.3.2 (not sure if ur asking for the same)


dont know how to find if other javascripts are loaded or not can you please help me ?

while checking the plugin area i found that JoomlaXTC Modal plugin is installed and activated.


the location which i added that script is above the <?php tag in index.php file in template folder.

User avatar
lancert
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Thu Sep 01, 2005 8:18 pm
Location: Des Moines, Iowa
Contact:

Re: System Messages in Modal Window?

Post by lancert » Fri Jan 20, 2012 4:42 pm

Olaf, that is exactly what I was looking for! Thank you for taking the time to post.

I also found this tutorial on how to set it up step by step:

http://www.minitek.gr/tutorials/templat ... indow.html
Lance Thompson
Business Growth Strategist
Idea Rocket Labs Marketing
http://www.IdeaRocketLabs.com

picdome
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Mon Jul 13, 2009 8:20 am
Contact:

Re: System Messages in Modal Window?

Post by picdome » Sun Jan 22, 2012 8:52 am

@lancert that tutorial solved your problem?

Actually i had tried that before posting here. But it dint work for me. Actually i don’t understand which file to edit and which position to add those scripts.

His tutorial is not for beginners i think :)

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11614
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: System Messages in Modal Window?

Post by ooffick » Mon Jan 23, 2012 7:51 pm

Do you have a URL so I can have a look at it?

Olaf
Olaf Offick - Global Moderator
learnskills.org

User avatar
lancert
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Thu Sep 01, 2005 8:18 pm
Location: Des Moines, Iowa
Contact:

Re: System Messages in Modal Window?

Post by lancert » Mon Jan 23, 2012 10:11 pm

Picdome, you need to edit the index.php file inside the the template folder you are using. Look inside:

templates/name_of_your_template/index.php

Edit that file with an HTML or text editor.



STEP ONE: Add the default Joomla system message code, if needed

If this is an existing template you are using, it will probably already have the system message code somewhere where it will display Joomla's system messages:

Code: Select all

<jdoc:include type="message" />
If it's not already there, you usually want to add it right above this code:

Code: Select all

<jdoc:include type="component" />


STEP TWO: Load Mootools which will create the animated pop-up modal message

Right after the opening <head> tag, add this code:

Code: Select all

JHTML::_('behavior.mootools');
JHTML::_('behavior.modal');
NOTE: Is you get a Mootools conflict error, your site is probably already loading Mootools. Try removing the this section of code.



STEP THREE: Add the JavaScript Code to automatically "pop-up" the system message"

Right before the CLOSING </head> tag add this code:

Code: Select all

<script type="text/javascript">
window.addEvent('domready', function(){
 if( $('system-message') ){
 SqueezeBox.initialize();
 SqueezeBox.open( $('system-message'), {
 handler: 'adopt',
 shadow: true,
 overlayOpacity: 0.5,
 size: {x: 600, y: 100},
 onOpen: function(){
 $('system-message').setStyle('visibility', 'visible');
 }
 });
 }
});
</script>
You can adjust the settings in the JavaScript code how you want.
Lance Thompson
Business Growth Strategist
Idea Rocket Labs Marketing
http://www.IdeaRocketLabs.com

picdome
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Mon Jul 13, 2009 8:20 am
Contact:

Re: System Messages in Modal Window?

Post by picdome » Sun Jan 29, 2012 2:09 pm

lancert & ooffick Thanks for your help :)


at last it worked and now i found out the real problem actually my template is custom made one so in index.php contains some PHP script which call some other files. normal index.php structures is divided into different files. Whatever now i find out those files and edited it. It starts showing the modal windows thanks.

msnelling
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Mar 29, 2012 12:23 am

Re: System Messages in Modal Window?

Post by msnelling » Thu Mar 29, 2012 12:26 am

Hi picdome,

I'm also using a JoomlaXTC template, with the index.php file also calling other php files. What were the files that you edited to achieve the modal windows?

picdome
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Mon Jul 13, 2009 8:20 am
Contact:

Re: System Messages in Modal Window?

Post by picdome » Tue Apr 10, 2012 1:04 pm

i had send u a PM :) chk it it will solve ur problem i belv


Locked

Return to “Joomla! 1.5 Coding”