We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    It was (is) a great addition to the core MODx platform - I would think if more people were aware of its scope/capabilities then more people would use it and get behind getting a version ported for REVO sites.
      • 24013
      • 7 Posts
      I too was looking for something like the the EVO plugin (http://modxcms.com/extras/package/591), but came up empty handed. So I decided to just try that same code on a test REVO install this weekend to see what it would do. I mean, worst case scenario is it wouldn’t work and I’d have to go about creating a mobile site differently. But guess what...it appears to work perfectly! Now I had to enter in the configuration options manually instead of a simple copy/paste, but that only took a couple of minutes and I was set. It isn’t pretty at all, but feel free to check it out at http://www.hispurposes.com/revolution then try it on your own site!
        44+ MODXed sites and counting...
        • 8168
        • 1,118 Posts
        Quote from: ptejera at Nov 27, 2010, 10:48 PM

        I too was looking for something like the the EVO plugin (http://modxcms.com/extras/package/591), but came up empty handed. So I decided to just try that same code on a test REVO install this weekend to see what it would do. I mean, worst case scenario is it wouldn’t work and I’d have to go about creating a mobile site differently. But guess what...it appears to work perfectly! Now I had to enter in the configuration options manually instead of a simple copy/paste, but that only took a couple of minutes and I was set. It isn’t pretty at all, but feel free to check it out at http://www.hispurposes.com/revolution then try it on your own site!

        ptejera - that is great news! Could you possibly post up how you went about configuring the plugin to work so others could also use it?

        Many thanks,


        dubbs.
          • 24013
          • 7 Posts
          Hi dubbs,

          No problem! I hope this helps...

          1. Obviously, download the plugin text file http://modxcms.com/extras/package/591

          2. Create a new plugin. Call it "Mobile" or any other name you so desire. smiley

          3. Paste in the plugin code.

          4. In the System Events tab, check OnWebPagePreRender (all the way at the bottom)

          5. In the Properties Tab, click "Default Properties Locked" to enable editing.

          6. Now it will be a manual process of entering the necessary properties specified in the package instructions. Previously, you could just copy/paste all of the text below and you’d be done.
          &usecookie=Use Cookie;list;yes,no;yes &url_param=URL Override Parameter (GET);text;browser &mobile_node=Mobile Node ID;text;mobile &standard_node=Standard Node ID;text;standard &force_browser_detect=Force Browser Detect;text;detect &iphone=iPhone is mobile?;list;1,0;1 &ipad=iPad is mobile?;list;1,0;0 &android=Android?;list;1,0;1 &opera=Opera Mini?;list;1,0;1 &blackberry=Blackberry?;list;1,0;1 &palm=Palm?;list;1,0;1 &windows=Windows Mobile?;list;1,0;1


          However, now you need to create the text fields and drop-down lists.

          For each property, click Create Property and then enter the text below.

          Name: usecookie
          Description: Use Cookie
          Type: list
          Value: yes
          Option 1 Name: yes
          Option 1 Value: yes
          Option 2 Name: no
          Option 2 Value: no

          Name: url_param
          Description: URL Override Parameter (GET)
          Type: text
          Value: browser

          Name: mobile_node
          Description: Mobile Node ID
          Type: text
          Value: mobile

          Name: standard_node
          Description: Standard Node ID
          Type: text
          Value: standard

          Name: force_browser_detect
          Description: Force Browser Detect
          Type: text
          Value: detect

          Name: iphone
          Description: iPhone is mobile?
          Type: list
          Value: 1
          Option 1 Name: 1
          Option 1 Value: 1
          Option 2 Name: 0
          Option 2 Value: 0

          Name: ipad
          Description: iPad is mobile?
          Type: list
          Value: 1
          Option 1 Name: 1
          Option 1 Value: 1
          Option 2 Name: 0
          Option 2 Value: 0

          Name: iphone
          Description: iPhone is mobile?
          Type: list
          Value: 1
          Option 1 Name: 1
          Option 1 Value: 1
          Option 2 Name: 0
          Option 2 Value: 0

          Name: android
          Description: Android is mobile?
          Type: list
          Value: 1
          Option 1 Name: 1
          Option 1 Value: 1
          Option 2 Name: 0
          Option 2 Value: 0

          Name: opera
          Description: Opera Mini is mobile?
          Type: list
          Value: 1
          Option 1 Name: 1
          Option 1 Value: 1
          Option 2 Name: 0
          Option 2 Value: 0

          Name: blackberry
          Description: Blackberry is mobile?
          Type: list
          Value: 1
          Option 1 Name: 1
          Option 1 Value: 1
          Option 2 Name: 0
          Option 2 Value: 0

          Name: palm
          Description: Palm is mobile?
          Type: list
          Value: 1
          Option 1 Name: 1
          Option 1 Value: 1
          Option 2 Name: 0
          Option 2 Value: 0

          Name: windows
          Description: Windows Mobile is mobile?
          Type: list
          Value: 1
          Option 1 Name: 1
          Option 1 Value: 1
          Option 2 Name: 0
          Option 2 Value: 0

          7. Save the plugin.

          8. Create your template and wrap your desktop version with <standard>[[*content]]</standard> and your mobile version with <mobile>[[*content]]</mobile>. As an example, my template used at http://www.hispurposes.com/revolution looks like this:

          <mobile>
          [[$mobileheader]]
          [[!breadcrumbs]]
          <div class="post">
            <h2>[[*longtitle]]</h2>
            [[*content]]
          </div>
          <a href="[[~[[*id]]]]?browser=standard">View Desktop Version</a>
          [[$mobilefooter]]
          </mobile>
          
          
          <standard>
          [[$header]]
          <div class="post">
            <h2>[[*longtitle]]</h2>
            [[*content]]
          </div>
          <a href="[[~[[*id]]]]?browser=mobile">View Mobile Version</a>
          [[$footer]]
          </standard>
          


          9. Enjoy your new mobile website!

          Paul
            44+ MODXed sites and counting...
            • 8168
            • 1,118 Posts
            Paul (ptejera),

            You my friend are a legend! Works a dream - well done, might be worth packing these instructions up as a new version of the plugin on the Addons section for others to use as well?



            Many many many thanks!

            dubbs.
              • 10638
              • 57 Posts
              I would also like to suggest checking out EnhanceJS (same group of guys that are helping out with the new and awesome jquery mobile).

              I have implemented it into a revo test site and it works like a dream.