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.

 

What about screen width?

What about screen width?

Hi:

First, thank you for your nice extension. I have a problem with a module that does not changes size according to window width. So I have to try to find a solution and maybe metamod is the solution. Is there any way to get the screen/window size in a variable to show or not a module?

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

Re: What about screen width?

Hi Yadox,

I think that's quite difficult to achieve - maybe someone else has some more ideas than I have, but I'll describe why it's very hard to do:

* MetaMod works at the time that the page is requested (i.e. when someone clicks on the link to the page).
* The web browser sends the URL request,
* The URL request does not include information about screen size.
* So MetaMod has no information to work on, regarding what the screen size is.

There are some javascript scripts out there that are able to calculate screen size and send a request back to the web server including that information. But, by the time the server gets this secondary request it's too late to make use of the information, as the page is already sent.

The only way that this could work would be for the entire page to refresh once the Javascript script calculated the size. However, that's pretty horrible.

If anyone else has a better idea I'd love to hear it...

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
3319 Posts
User info in posts
Administrator has disabled public posting

Re: What about screen width?

Actually I do have another idea... and this doesn't have to involve MetaMod... I wonder if your module can be dynamically resized with Javascript? i.e. most template include Mootools (or sometimes jQuery). So you could attach some JS to the page which detects dynamic page resizing, and adjusts the width of the container (div or table or whatever) that the module is in.

You might need to find a JS/CSS expert to help with this :-)

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
3319 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Posts this week:
6
User Info:
 
Total Users:
11577
Newest User:
owens65784
Members Online:
0
Guests Online:
194

Online: 
There are no members online

Forum Legend:

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