0
Welcome Guest! Login
0 items Join Now

PopupMessages Atom - Freebie by MrT

    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13482
    • Web Designer/Developer

    PopupMessages Atom - Freebie by MrT

    Posted 6 years 4 weeks ago
    • Some users have asked for the system messages content to be shown in a popup rather than takin gup space on their layout. In fact, there is even a github issue about this that I raised some time ago https://github.com/gantry/gantry5/issues/1652 and a couple of users thought it was a good idea too.

      So, I've created a Gantry 5 atom that will make the system message particle on the layout of your outline display as a modal instead. All you need to do is add the atom to your base outline > page settings and you're done. Really this atom is only really intended for use in Joomla but it should work on Wordpress and GRAV too (when they uses system messages - which is more rare than in Joomla).


      Ok, so let's get the atom installed (Joomla only - look for the equivalent locations in GRAV or Wordpress here ).

      1. From the ZIP file copy popupmessages.yaml and popupmessages.html.twig to /templates/TEMPLATENAME/custom/particles (note you may need to create this folder).

      2. From the ZIP file copy _popupmessages.scss to /templates/TEMPLATENAME/custom/scss (note you may need to create this folder).

      3. Open your existing custom.scss file (or add one to /templates/TEMPLATENAME/custom/scss) and at the top add this line:
      @import "popupmessages";

      So, now we're ready to actually use the atom.

      4. In your base outline > page settings - Drag and drop the popupmessages atom on to the atom section and save.


      Now any system messages that appear will show in a modal, pressing the "X" at the top right of the modal, or pressing "enter" or "escape" will cancel the messages.

      Here's what it looks like for the contact form:


      This image is hidden for guests.
      Please log in or register to see it.




      Enjoy!

      Regards, Mark.
    • Last Edit: 6 years 3 weeks ago by MrT.
    • The following users have thanked you: Kat05, Henning, MICHAEL KOONTZ, Jeff Keller

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: PopupMessages Atom - Freebie by MrT

    Posted 6 years 1 week ago
    • Hey Mark!

      Thank you much for creating this... I was the one who re-sparked intrest on git-hub.

      I installed it but it's not working for me. I'm pretty sure I got all the steps... [ I have bad luck :) ]

      I cleared cache and rebuilt css and got nothin :(
      There's a contact page and shopping cart that should pop up a message. Maybe Virtuemart extension is messing with it?

      Would you be able to take a look?
    • Last Edit: 6 years 1 week ago by Jeff Keller.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13482
    • Web Designer/Developer

    Re: PopupMessages Atom - Freebie by MrT

    Posted 6 years 1 week ago
    • There's a bug in RT templates that cause system messages to not be shown for ajax calls. see https://github.com/gantry/gantry5/commit/f488688ee67a07c9de1bb9ffbecfb7f6dd04138f . The fix has now been implemented in all templates however not all template updates have yet been released (Sienna being one of them). So, you need to apply the fix suggested in the ticket manually yourself (remembering that your template is rt_sienna and not g5_helium)

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: PopupMessages Atom - Freebie by MrT

    Posted 6 years 1 week ago
    • Hello Mark,

      Thank you very much for this atom! I've updated the code and it works.

      A question about the functionality, is it possible to get this to work with notifications from J2Store?
      I've recently added this atom to a site with J2Store installed and when you empty the cart the notification is still presented on the page in the standard notification area.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13482
    • Web Designer/Developer

    Re: PopupMessages Atom - Freebie by MrT

    Posted 6 years 1 week ago
    • All this atom does is to make the normal Joomla "system-messages" area appear in a popup - if your third-party extension does not use that then the atom will have no effect.

      Regards, Mark.
    • The following users have thanked you: MICHAEL KOONTZ

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: PopupMessages Atom - Freebie by MrT

    Posted 6 years 1 week ago
    • I implemented the fix, but it didn't work...
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13482
    • Web Designer/Developer

    Re: PopupMessages Atom - Freebie by MrT

    Posted 6 years 1 week ago
    • Jeff Keller - In your specific case you also needed one line of CSS that I have now added in the top of your custom.scss file.

      Now it works.,

      Regards, Mark.
    • The following users have thanked you: Jeff Keller

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: PopupMessages Atom - Freebie by MrT

    Posted 6 years 1 week ago
    • Ahhh.. it was buried.

      Good work Mark!
      I wish I was as smart as you guys :)
    • The following users have thanked you: MrT

  • Re: PopupMessages Atom - Freebie by MrT

    Posted 6 years 9 hours ago
    • MrT wrote:
      All this atom does is to make the normal Joomla "system-messages" area appear in a popup - if your third-party extension does not use that then the atom will have no effect.

      I have just added this on another site and I was testing it with the Contact Form. For all the fields, including any custom fields, it would show the modal if the fields were invalid.

      However, after I successfully sent a message using the contact form, the Message "Thank you for your email." was displayed at the top of the screen normally instead of appearing in a modal.

      Since this is a Joomla "system-messages" is there a way to get this to also display the default Joomla "thank you message" inside a modal window?

      regards,

      Michael
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13482
    • Web Designer/Developer

    Re: PopupMessages Atom - Freebie by MrT

    Posted 5 years 11 months ago
    • I don't have time to investigate this at the moment - but please feel free to modify the atom to suit your needs it's MIT licensed.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.053 seconds