Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Module auto-start

Module auto-start

A would like to ring a bell on my page at specific time.
What I know - I can activate a player module, but then I must refresh the page.

Is that possible to do it automatically, using MetaMod?
If yes - please let me know how.
If not yet - it is a subject for  MetaMod Feature Requests...

thank you in advance

Jan

janek
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Module auto-start

Hi Jan,

I'm not quite sure what you are wanting to happen.  All MetaMod can do (in this case) is to tell Joomla to include a particular module on the page, if the page was generated/visited at a particular time. This is not what you're asking for. It's going to be up to the module that you include, to perform the sound and possibly a page redirect if that's what you're after.

(oh, are you saying it's a sort of "time's up!" bell, that rings then sends the user to a different page?)

I'd suggest something like a tiny Flash file that you could embed on the page, perhaps inside a module, that sets a timer, plays a sound then does the redirect at that time - and that's far outside the scope of MetaMod, unfortunately.

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Re: Module auto-start

Hi Stephen,
thank you very much for your quick answer - and conformation that my functionality can't be fulfilled by MetaMod (not yet).

And, what do you think about a new feature of MetaMod?

My imagination is going like that (forgive me if it is foolish - I'm not a programmer):

    there is a new checkbox on the MetaMod configuration screen - "refresh"

    if it is checked, the MetaMod put a script onto the page (with the time parameters taken from the PHP box

    then, a bit before the time specified in the PHP box, MetaMod shows the module on the server and, at the specified time, the script refresh the page on the client side
.

best regards

Jan

janek
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Module auto-start

Hi Jan,

thanks for the suggestion - but I'm not going to be adding this smile  The reason is that MetaMod only deals with deciding when a module gets put into a module position. It doesn't attempt to deal with Javascript or anything at a pure User Interface level.

Having said that, you could output some Javascript from inside a MetaMod that *could* do what you're asking I think... hmm... if you're good at JS, at least. Again, not something I would make into a standard option, but MetaMod just provides some of the building blocks for you.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Re: Module auto-start

Hi Stephen,

I am also doing something similar to above post and metamod is displaying the content exactly at the time specified and my content which is a player should be playing daily but at a specific time. Hence, the Start and End Date/Time (freeform) fields are perfect for my content. But however, I would like to know if you have been able to find out something related to the page refresh on the user site at that specific time so that the content appears on the client webpage?

If no, can you help me out on how or where exactly we can modify the metamod to include the page refresh using JS?

I am asking this based on what you mentionned above:

Having said that, you could output some Javascript from inside a MetaMod that *could* do what you're asking I think... hmm... if you're good at JS, at least. Again, not something I would make into a standard option, but MetaMod just provides some of the building blocks for you.

aleemeey
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Module auto-start

Hi,

you can include arbitrary HTML code (including Javascript) inside the MetaMod simply by "closing the PHP" first, then re-opening it, like this:

?>
<h1>here is some html</h1>
<script>
// some JS here
</script>
<?php


This means that you can use MetaMod as a method for putting some raw JS onto your page.

So, if you know JS you could put in some JS code that checks the time of day, and does a page refresh at that moment. Bear in mind that by default this will use the time of day of your client rather than the server, so you might need to pass in the server's idea of the time through to the JS - perhaps as the number of seconds left before the refresh, to use as a countdown timer.

JS is not my strongest point, so I'm not going to write that for you smile

Hope that helps to get you started though.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
4
User Info:
 
Total Users:
4378
Newest User:
miller2341
Members Online:
1
Guests Online:
196

Online: 
gary93199

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked