I want to use different different types of template in client side and admin side using meteor like bellow example scenario
www.sitename.com - main site with theme1 for frontend
(http://seo-html.axiomthemes.com/)
www.sitename.com/manager - administrator dashboard with theme2 with backend (http://themes-lab.com/pixit/admin/index.html)
You can use the roles package to define who has access to each template, in this way you can implement both themes that you mention here.
You can add the packages with:
meteor add accounts-password alanning:roles
Related
I am looking to build a wordpress website with GatsbyJS (so no PHP usage. Just using Wordpress API and react JSX on the front-end).
I know I can get any core wordpress data at /wp-json route, but I'm not sure about plugin data. I've tried to look up plugin data and it does not seem to be included in wp-json.
I found this "compatible plugins" page: https://v2.wp-api.org/guide/plugins/
Does this mean that for most other plugins data would not be present in the Wordpress API?
Correct. Unless these plugins expose their data via the REST API (either by extending the existing endpoints or by creating their own, like some plugins do), you won't be able to access it.
In such cases, you either ask the developers to expose their plugin's data via the REST API or you code some custom endpoints yourself to get the data you need from them.
I am new to web development and and would like advice about what is the usual best practices to achieve what I am trying to do.
I am in charge of writing a frontend app using Vue. This frontend will require a login to access the app. The app will be hosted on Amazon.
However we are also wanting to build an eCommerce site in Wordpress or equivalent that sits on the root of the website, (eg www.mywebsite.com) with the app accessible through a "sign in" button. If the user presses the sign in button we want the location bar location to not change from the website they are on (www.mywebsite.com), even though the Wordpress site and Vue frontend may be stored on different locations/domains.
If the site is made in Wordpress, we can get another developer to do that webpage for us, while I work on the frontend. However we want the experience to be relatively seamless between connecting to the wordpress root site, clicking on the sign in button and being taken to the Vue frontend.
Is this possible? Do both sites have to be hosted on the same server for it to work (eg an Amazon EC2 server which hosts two webpages, the wordpress one and the vue one)?
Or can the wordpress put a link to the Vue frontend which doesn't change the web location to the user?
Or (worst case scenario) do we need to make both webpages in Vue as one Vue application, some pages requiring login to access and others not?
Thanks kindly for any assistance.
So in order to use Vue and WordPress together, you can either write 2 separate applications. One for the Frontend and one for the Backend, which is perfectly fine or you can simply write a WordPress Application with a Vue Theme.
This is how this could look like:
WordPress Backend
You can use a normal WordPress backend, where you can build the architecture you want to. In addition, you need to set up the REST-API Wordpress provides. So this also means, just use plugins which support it. Otherwise, you would need to write custom endpoints. For example, Woocommerce would be a good e-commerce plugin, since it supports the API.
Learn more about it here: https://v2.wp-api.org/
Of course, you can host your WordPress installation on Amazon. Here is a good guide for that: https://aws.amazon.com/de/getting-started/tutorials/launch-a-wordpress-website/
Notice: The REST-API is available in core since 4.7. If you are using an older version you would need to install a plugin.
WordPress Frontend
In order to create your Frontend, I'd recommend you to make a custom theme. Since you are just serving static files this can be done pretty easy. But still, you don't need to reinvent the wheel.
There's a really good starter theme out there: https://github.com/EvanAgee/vuejs-wordpress-theme-starter
It comes with all the stuff you need to get started and since it is just a theme, you can simply set up a usual WordPress hosting without handling Domains of multiple applications.
In order to get the data from the Backend, you would simply make calls to the REST-API. Here's an example: https://github.com/EvanAgee/vuejs-wordpress-theme-starter/blob/master/src/api/index.js
I have a system build using playframework 2.0. I want to have blog to run on with the system. Is there a way i can do that?, something like plugins available for use or can I use word press to do that?
Here's a blog engine for Play Framework: https://github.com/jroper/erqx.
Well you can create a new installation of wordpress, If you want to have 1 database for your playframework and wordpress then on the installation page it will ask you for a database, just enter the same database details that you have for playframework. Wordpress uses mysql so make sure you are using mysql for your playframework.
Its always better to have a different database but if you need to have some kind of integration between the two then it would be much better if you have them both on the same database.
Now in the sitename you can add something like
http://www.example.com/blog
OR
http://www.blog.example.com
Which ever you prefer. Once installed login to your wordpress admin area, install a blog theme and start creating your new blog posts. And in your main playframework website, create a new menu item and add this link to it.
I dont know of any plugins for playframework, but there is a plugin in wordpress that makes it work as an api, https://wordpress.org/plugins/json-api/. And then there is an addon to this plugin called https://github.com/mattberg/wp-json-api-auth.
You can install these 2 plugins in your wordpress and then from your playframework's registeration code make simple REST calls to the api. This will will be used to automatically register/login user's in wordpress. So when they login to playframework they will automatically get logged in to wordpress as well.
I run a website where I have both Wordpress and Cakephp installed in the same domain.
Cakephp is the administrative backend to maintain and create business listings (like the yellow pages).
Wordpress is the front end for the public website.
I'm creating custom Wordpress templates to display the business listings from Cakephp, but am not sure how Wordpress is going to retrieve data from Cakephp.
I already have a bunch of Controller Actions that return json array with data that I would like to call from Wordpress. I don't want to duplicate in Wordpress data retrieval code that I've already written in Cakephp. But i'm not sure how in Wordpres would i make calls to these Cakephp Controller / Actions.
What is the recommended / best way to have Wordpress retrieve data from the Cakephp backend given at they are on the same domain? What other options do i have?
What is the recommended / best way to have Wordpress retrieve data
from the Cakephp backend given at they are on the same domain? What
other options do i have?
Access the DB directly, I'm not sure how to do that with Wordpress fugly API and code, but I'm pretty sure you can instantiate a new DB object with a connection to the CakePHP apps database. The WP API documentation will tell you how to do it I guess, if not it sucks more than I thought.
An alternative would be to expose the data via a RESTful service and consume it from Wordpress. If you return JSON you could even simply use a JS widget on a WP page to retrieve and render the data with pure JS.
As burzum suggested you have 2 real options.
WordPress does have a class for interacting with a DB called WPDB and will give you access to a few ways of querying the data in your CakePHP app. WordPress WPDB Class. It is by no means perfect but will do the job.
However you much better creating a custom WordPress plugin to parse and format the JSON as burzum suggested interacting via your own API. You could then if needed make this a 2 way communication allowing your WordPress install to make changes as necessary to yoru Cake app.
I want to create a custom sign up form for the aegir provisioning system in drupal and once the user fills out the form and submits, I want the website to be created on the domain name specified in the form and all other hooks that aegir executes while creating a website. Is there a way to accomplish this?
I think it should work out of the box.
If not, then the heavy-weight solution is to install Ubercart and the Aegir-Ubercart integration module, in addition to Aegir. Then you have to setup an appropiate product cart, with hosting features to each products, allowing automatic site creation.