Coder Social home page Coder Social logo

ionicthemes / ionic-wordpress-integration Goto Github PK

View Code? Open in Web Editor NEW
266.0 24.0 128.0 4.67 MB

Ionic Wordpress starter app 😎. Learn how to communicate your ionic app with Wordpress REST API with this starter and detailed tutorial.

Home Page: https://ionicthemes.com/tutorials/about/ionic-wordpress-integration

TypeScript 60.70% HTML 17.58% JavaScript 3.48% SCSS 18.23%
ionic ionic-framework wordpress wordpress-rest-api ionic-apps ionic-tutorial ionic5 angular

ionic-wordpress-integration's People

Contributors

djabif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-wordpress-integration's Issues

Error: Cannot find module

after npm install

Error: Cannot find module '@angular/tsc-wrapped/src/tsc'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (F:~~~\wordpress\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:7:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)

loading style in post

is it possible to load the posts from the admin panel as it is in the admin panel.
for example, loading the font style, color images and all ?

Skip Login try to get data from fake user id on "read more"

I try to display post content, by using the "skip login" link on the home, I well receive the list of my post, but when I click "read more" of a post, the detail post is displayed, but a loader stay stuck on overload.

From the debugger, I can see there is a login try to get data from fake user id.

Why the "skip login" is not recorder as choice and avoid, this ?

Problem with register

Hi!
I'm having a problem when I try to sign up. The login page is working when I login with the default credentials from my local WordPress (user root pass root), but the register isn't working, all I see is JSON: [jwt_auth] empty_username. And when I send directly values it shows me the mistake as if I was trying to login (invalid username), could this be a problem with my jwt-auth settings?

my wp .htaccess:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP:Authorization} ^(.*) SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] RewriteBase /wordpress/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wordpress/index.php [L] </IfModule>

wp-config.php:
[...]
define('JWT_AUTH_CORS_ENABLE', true); define('JWT_AUTH_SECRET_KEY', 'your-top-secrect-key');

How do i add native sharing of post in the post.html

I need to create a function for sharing a post via all sharing apps that are installed in the phone.
The function should capture "post excerpt", "post title", "post image +url", "post url"
e.g

shareItems() {
        excerpt: post.excerpt.rendered,
        title: post.title.rendered, // fi. for email
        image_url: post.images_url, // no idea how to get it
        url: post.link
      }

The reason i need it as a function is because i tried using the {{post.title.rendered}} in the html (click)="" and it had some errors.

Error("The Angular Compiler requires TypeScript >=" + minVersion + " and <" + maxVersion + " but " + maxVersion + " was found instead.");

Hi.
I need your help, when type ionic serve the server say
/home/xxxr/Documentos/Proyectos/yyy/node_modules/@angular/compiler-cli/src/typescript_support.js:65
[ng] throw new Error("The Angular Compiler requires TypeScript >=" + minVersion + " and <" + maxVersion + " but " + version + " was found instead.");
^
Error: The Angular Compiler requires TypeScript >=4.2.3 and <4.3.0 but 4.1.5 was found instead.

Thanks.
P.D.
My english is very bad

Unable to pass account authentication?

I have been able to run this code very well, but I can not test through the login interface, I can not log in my account and registered.
My wordpress version is 4.8.3,

How do I add a working pull to refresh feature?

Hello,

How do I add the pull to refresh feature?
Am using this code and it seems not to be loading new posts


  doRefresh(refresher) {
    console.log('Begin async operation', refresher);

    setTimeout(() => {
      console.log('Async operation has ended');
      refresher.complete();
    }, 2000);
  }

Any ideas?

Unable to login to my site using "ionic3-wordpress-integration"

Hi, my name is Tirtha. I'm from Brasil .. Have you have the " ionic3-wordpress-integration " course ? I'm making a simple app for my church. I am using/ followed your script to create the app. But I am running into some problem with login . right now it connects with app.ieqjardimcidade1.com site.. and loads up the posts . But I am unable to login with na user. I have followed the seps for JSON Web Token (JWT) but i am unable to do it.

Can you please help me here? I have installed the plugin onto my wordpress site and did everything.  

Your help is really appreciated!
Thank you for Reading
Tirtha

I am not able to register new user with administrator token?

I am following your tutorial at https://ionicthemes.com/tutorials/about/ionic-wordpress-integration anfd I am able to login but Sigup is not working, I am using admin user to authenticate a user.

My Script looks like this

onSubmit(values){
  var username: Admin_Username;
  var password: Admin_Password;
  //only authenticated administrators can create users
  this.authenticationService.doLogin(username, password)
  .subscribe(
    res => {
      let user_data = {
        username: values.username,
        name: values.displayName,
        email: values.email,
        password: values.password
      };
      this.authenticationService.doRegister(user_data, res.json().token)
      .subscribe(
        result => {
          console.log(result);
        },
        error => {
          console.log(error);
        }
      );
    },
    err => {
      console.log(err);
    }
  )
}

Here is a Eror message:-

{
"code": "rest_cannot_create_user",
"message": "Sorry, you are not allowed to create new users.",
"data": {
"status": 401
}
}

about wp rest api

Hello, I'm using wordpress 4.9.x. I always return 404 when testing the connection. Do you know?please

installation error

installation error

I tried to use your project here but it did not work out for me.

kakaroto@kakaroto:~/teste$ clear

kakaroto@kakaroto:/teste$ git clone https://github.com/ionicthemes/ionic3-wordpress-integration.git
Cloning into 'ionic3-wordpress-integration'...
remote: Counting objects: 149, done.
remote: Total 149 (delta 0), reused 0 (delta 0), pack-reused 149
Receiving objects: 100% (149/149), 1.94 MiB | 968.00 KiB/s, done.
Resolving deltas: 100% (30/30), done.
kakaroto@kakaroto:
/teste$ ls
ionic3-wordpress-integration
kakaroto@kakaroto:/teste$ cd ionic3-wordpress-integration/
kakaroto@kakaroto:
/teste/ionic3-wordpress-integration$ npm install
npm WARN deprecated [email protected]: This plugin has been deprecated since it is now included in the latest versions of cordova-ios
npm WARN deprecated [email protected]: babili has been renamed to babel-minify. Please update to babel-minify
npm WARN deprecated [email protected]: babili has been renamed to babel-minify. Please update to babel-preset-minify
npm WARN deprecated [email protected]: Please update to the latest object-keys
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ== integrity checksum failed when using sha512: wanted sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ== but got sha1-No8lEtefnUb9/HE0mueHi7weuVw=. (25587 bytes)
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

[email protected] install /home/kakaroto/teste/ionic3-wordpress-integration/node_modules/@ionic/app-scripts/node_modules/node-sass
node scripts/install.js

Cached binary found at /home/kakaroto/.npm/node-sass/4.5.3/linux-x64-57_binding.node

[email protected] postinstall /home/kakaroto/teste/ionic3-wordpress-integration/node_modules/@ionic/app-scripts/node_modules/uglifyjs-webpack-plugin
node lib/post_install.js

[email protected] postinstall /home/kakaroto/teste/ionic3-wordpress-integration/node_modules/@ionic/app-scripts/node_modules/node-sass
node scripts/build.js

Binary found at /home/kakaroto/teste/ionic3-wordpress-integration/node_modules/@ionic/app-scripts/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/core@^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@ionic/app-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1523 packages in 67.218s
kakaroto@kakaroto:~/teste/ionic3-wordpress-integration$ ionic serve
Error: Cannot find module '@angular/tsc-wrapped/src/tsc'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/home/kakaroto/teste/ionic3-wordpress-integration/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:7:13)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)

How to display post from specific category

Hello,

I have been using you code and now i have issues in creating a specific category page and its posts.
e.g I have a WorksPage in my App. I want to display all posts from thecategory (works) with (1) in my wordpress site to the WorksPage in the app.

Thank you

Implement WordPressService in other apps

Hello! It's very nice your App!
I saw that you've not used wp-api-angular, which is nice, but I'm getting WordPressService for other App and is getting this error.

Error: StaticInjectorError[WordpressService]:
StaticInjectorError[WordpressService]:
NullInjectorError: No provider for WordpressService!

Do you know if something is missing? Thanks!

CORS error

When I tried against my own server I received the following error. Please share your server CORS configuration.

Access to XMLHttpRequest at 'https://securecoop.com/blog/wp-json/jwt-auth/v1/token' from origin 'http://localhost:8100' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.