1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Responsive options help

Discussion in 'XenForo Development Discussions' started by Mike Creuzer, Jan 20, 2013.

  1. Mike Creuzer

    Mike Creuzer Well-Known Member

    Hey all, working on a responsive theme and I am dead stuck on a few issues I am having.

    1. Editor.

    Was wondering if anyone had any opinions, first of all, on how exactly this should be handled. Leave a few options? Or remove mce entirely and leave a textbox. If so, can this be easily done?

    2. Dropdown menus.

    I know that XenForo has external pages created for pretty much everything that requires a popup menu. Can this be enabled with some setting or command via JS?

    I have more questions but this will work for now. Any help is much appreciated.

    Evina likes this.
  2. cclaerhout

    cclaerhout Well-Known Member

    1. A theme without any editor... I don't think it's a good idea and I don't think people will buy or download a theme without this. For editor options, you should let users decide what they want to use. But that's just my opinion. Now to answer your question, removing mce is easy using a simple js command, but that's not the best solution which is to prevent it to load. See how to do this in the MarkItUp addon (when the option to display first Miu is activated), in a few words: use conditionals in the editor template around the code that will initiate the TinyMCE js template..

    2. I didn't understand if your question was about dropdown menus or overlay. To easily use overlay, see the first video that Kier made a long time ago.
  3. Mike Creuzer

    Mike Creuzer Well-Known Member

    Well, the theme will be a normal theme unless loaded on a mobile theme. I am mainly worried about appearance of the editor at phone level. At web level, it will be there.

    And not quite. I want to essentially remove these popups and dropdowns and have them instead, when clicked, go to the page itself. For example, clicking on the quick nav will go the quick nav page (seen here: http://xenforo.com/community/misc/quick-navigation-menu?selected=node-34) as an example.
    Evina likes this.
  4. cclaerhout

    cclaerhout Well-Known Member

    1) On mobile, TinyMCE will not load by default (already a simple textarea by default), except if someone is using the TinyFix and made the choice to load it.
    2) What you're asking is similar (even if it's more) than this request in that thread ; I didn't check but I think it's not possible to do all what you want without directly modifying the xenforo.js file.

    Now if you only want to disable some "overlays" only on mobiles it should be possible. I've done it with the TinyFix for "inline edit overlay" (see Options=>message=>Enable inline editing of messages).
    For the other overlays, just modify the template "page_container_js_body" with TMS , especially this variable _enableOverlays: "{xen:property enableOverlays}" ; use a conditional with the XenForo Mobile helper (or my addon to detect mobile/IE).
    0xym0r0n and Mike Creuzer like this.
  5. RoldanLT

    RoldanLT Well-Known Member

    I'm the one requested this @ mybb.com :)
    Hope to see this soon.
  6. Mike Creuzer

    Mike Creuzer Well-Known Member

    Would you be able to elaborate on the code necessary? I'm not much of a programmer.
  7. cclaerhout

    cclaerhout Well-Known Member

    First check on your dev board if disable the overlay with modifying the template "page_container_js_body" gives you the expected results.
    If yes:
    1. Install TMS
    2. Install this addon
    3. Create an addon (ie: XYZ)
    4. (With TMS) Create a new template modification (Master Style => choose the XYZ addon)
      Target the template: page_container_js_body
      Use the regex replacement

      Search for:
      Replace with:
      $1"{xen:if '{$visitor.getBrowser.isMobile}', '0','$2'}",
    This should work.

    I'm not sure the inline edit overlays will be also disable. If not, just look at this file from the TinyFix: Sedo_FixTiny_Listener_ControllerPreDispatch
    Mike Creuzer likes this.
  8. Mike Creuzer

    Mike Creuzer Well-Known Member

    Well, what I meant was the default resources available. Because I wouldnt want to package an add-on with our skin.
  9. Mike Creuzer

    Mike Creuzer Well-Known Member

    Any update on this?

    Again, goal is to eliminate the dropdown menus. What would normally be a modal box or dropdown will be a page.
  10. Mike Creuzer

    Mike Creuzer Well-Known Member

  11. cclaerhout

    cclaerhout Well-Known Member

    Why don't you try to modify first the template I've told you (to test what modifications can do), then use TMS only on your template? No need I think to create an extra addon here.

Share This Page