• I have a webapp that I created using OnsenUI and hosted on AWS. My company website is based on WordPress and now I would like to combine the two, if you will, to use one domain. That would require me to somehow transfer my webapp, if possible, or at least the html files and all required libraries/files (CSS, JS, etc.) to my WordPress site. The motivation behind moving the webapp to WordPress is so that I am able to implement a paywall. Any suggestions? I’ve never programmed in PHP and overall still a novice with WordPress. Please help, pretty much at end of rope.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you want to continbue using OnsenUI, I suggest you ask their community how to use it to front-end a “headless” WP site: https://community.onsen.io/

    Thread Starter owllei

    (@owllei)

    @sterndata Thank you for the swift reply. Do you see any other workarounds? I have posted this on the OnsenUI forum but I fear that it will be awhile (if any) before I receive any responses.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Do you really need an app? Would a well-designed, responsive site work?

    There are plugins that will let you use a 3rd party web app with WP, e.g., https://www.ads-software.com/plugins/apppresser/

    If you want to roll your own, you’ll need to master the REST API: https://developer.www.ads-software.com/rest-api/

    Thread Starter owllei

    (@owllei)

    @sterndata Yes, we would like to have it as an app.

    Moderator bcworkz

    (@bcworkz)

    Could you install Onsen UI on the same server and access your app through a sub-domain? Unless you will have a headless WP installation, it’s impractical to have both under the same sub-domain. You can have your app manage all WP interaction through the WP REST API. No PHP is required. The API returns JSON data for all requests. https://developer.www.ads-software.com/rest-api/

    Thread Starter owllei

    (@owllei)

    @bcworkz Thanks for the suggestion. I was thinking about moving my JS, CSS, and HTML files over, but I was worried about the multiple JS, CSS, and HTML interacting with the current WordPress flow, especially the CSS files. Also, would plugins such as Paid Membership Pro be able to limit queries or visits to the app sub-domain if we went that route?

    Moderator bcworkz

    (@bcworkz)

    The way I imagine this is as two parallel installations. They use completely different resources, so there would be no conflicts with WP. For example, if WP were installed in the public root folder, the typical situation and reached by https://www.example.cοm; then Onsen could be installed in an /onsen/ folder, to which requests for m.example.cοm are sent. It’s really just like a separate site, except it is under the same server and domain.

    Your app would get WP data through https://www.example.cοm/wp-json/v2/. If queries are limited in WP for its own front end, they should be limited for API queries as well, but it in part depends on the code used to limit queries. This scheme makes your app the equivalent of a remote app, so you would not be using cookie authentication. Your app would use one of the several API authentication plugins. I couldn’t say whether Paid Membership Pro is compatible with your chosen authentication plugin or not. You’d need to ask the Membership Pro devs. It should be compatible if the “authenticate” hook is used correctly.

    I am currently developing a WordPress theme that uses media queries to deliver the onsen ui version to mobile devices. It’s been interesting as I’ve always just made a responsive web design. The basics are the media query hides all of the ons stuff in the footer in desktop widths and hides everything else but the ons stuff below a certain width. All the content is pulled via rest api and I push the history to the browser as I change pages.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Webapp based on OnsenUI’ is closed to new replies.