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.

 

Mobile tweaks

Mobile tweaks

Stephen,

How might I hide modules and disable components? I understand how to set Chameleon to look for mobile use, but not the action part.

Thank you,

Sam

marketsetc
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Mobile tweaks

Subscibing to this topic here because I can't seem to edit my post.

marketsetc
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Mobile tweaks

Hi Sam,

sorry for the delay in responding to this.

Chameleon does not currently have the ability to disable modules or module positions. That's something I have in mind for future development.

With regards to disabling particular components, what you no doubt want to achieve is that people trying to access one of those pages get an error message or are redirected to an error page. Also you might want to disable (hide) any/all menu items that point to that component.

To achieve this in Chameleon is easy:

1 - to redirect anyone trying to access a particular component, just include a check for that component using the "condition" side of a Chameleon rule. Then, the Succeed action will only by actioned when someone is trying to access a page with that component at the same time as any other conditions you put on the rule (e.g. time of day, browser type, etc).

In the Succeed action, just put in a redirect to an error page, either by URL or by menu item. You might want to set up a menu item containing the error message, on a hidden menu (that does not appear on a visible menu on the page).

2 - To prevent menu items from appearing that point to components that you want to "disable", simply select these menu items in the Succeed action of the rule, using the "Unpublish menus" control. You might want to do this after detecting mobile devices, for example.

I trust this helps,
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: Mobile tweaks

Just checking to make sure I comprehend: I don't want an error page to be generated if someone accesses the site using a mobile device; I just want to prevent disruptive elements from appearing on mobile devices.

marketsetc
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Mobile tweaks

Edit: was able to achieve goal by disabling associated plugins.

While I have your attention, any suggestions on how to hide .jpegs when a rule succeeds?

marketsetc
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Mobile tweaks

One way to do it would be to use Chameleon to add a CSS line that can isolate and remove selected images. You might need to add a certain class to them all so that the CSS rule can isolate them.

Another similar option would be to use Chameleon's search-and-replace function (regex) to find the img tags in HTML and remove them completely. Again, identifying them with a particular class would no doubt help the regex detection.

Hope that helps.

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: Mobile tweaks

Thank you. Being in CSS kindergarten, I enclosed the images with a div with an ID. Then I entered in raw css Type 1 (new to me)
#hidden {
display: none;
}

and nothing changed.
Sorry for the noob questions, but I guess everyone had to start somewhere.

marketsetc
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Mobile tweaks

Hi,

a couple of things to check:

1  - do you see the CSS code that you wrote in the final output HEAD section of the HTML? e.g. look at the page source in your browser and make sure it's showing up there.

2 - #hidden should refer to one and only one element on the page. An HTML ID is supposed to be just 1 element. If you want to use more than one, add a class eg. <img src="/whatever.jpg" class="hidden" /> then in the css code, use:

.hidden {
  display: none;
}

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:
1674
Total Polls:
6
Total Posts:
5917
Total Posts Today:
5
User Info:
 
Total Users:
11537
Newest User:
litz780551
Members Online:
4
Guests Online:
208


Forum Legend:

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