Giter Site home page Giter Site logo

Comments (17)

michelkaeser avatar michelkaeser commented on July 3, 2024

Hi. Those are custom post types we have written for the schwingenonline website. You can remove them. To "port" the app to your own WP install you need to:

  • change the variables in assets/js/main.js
  • change the blocks in /res/xml/settings.xml (or however it names)
  • run adroid update project . wirhin the cloned repo
  • have the Android SDK installed
  • change/add/adopt paths in routing.json

You might want to take a look at all files to see what can be removed (e.g. index.html contains a reference to JWPlayer -> can be removed).

The paths in routing.json simply represent the JSON API plugin paths...

Hope that helps.

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

Thanks for your reply ;)
I clone your code and install a new WordPress in my VPS.
But when I change the _base in app.js and install JSON-API in WordPress and set the api-base to 'api/json', I cant get any thing in this app.
But when I explore the api url in browser, can get the json.
api url: http://xiaov8.com/api/json/get_recent_posts/
can you help me?

from ch.schwingenonline.android.

michelkaeser avatar michelkaeser commented on July 3, 2024

Have you also changed those: https://github.com/MaddinXx/ch.schwingenonline.android/blob/develop/res/xml/config.xml#L21-L24 ? This controls what URLs are allowed to be displayed in-app.

Also, make sure to create a virtual apache vhost on your local system (better build the app and see on device with logcat) for testing purpose. Opening the index.html directly will fail due to XRS restrictions.

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

Thanks.
after change this file should do anthing else?
It is the same error.

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

It looks like CROSS-DOMAIN AJAX REQUEST ERROR
Do you change anything in you wordpress?
I use Nginx not Apache.

from ch.schwingenonline.android.

michelkaeser avatar michelkaeser commented on July 3, 2024

This sounds like you have configured Nginx to not allow cross-domain requests.
Check x-xss-protection header in Nginx (or something similar).

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

I add add_header 'Access-Control-Allow-Origin' '*'; in nginx.conf, but no effect.

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

admaster@cbpos ~ $ curl -I http://xiaov8.com
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 17 Jul 2013 10:39:34 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.3.3
X-Pingback: http://xiaov8.com/xmlrpc.php
Access-Control-Allow-Origin: *

but error too

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

after change config.xml do anthing else?
I just run cordova/build

from ch.schwingenonline.android.

michelkaeser avatar michelkaeser commented on July 3, 2024

I guess it has problems parsing the chinese/japanese? characters. If you see https://github.com/MaddinXx/ch.schwingenonline.android/commits/yetone (latest 3 commits) it throws a parse error in fetchJSON...

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

Thank you very very very much!!!
I love you!!!

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

I am a Chinese.
How to solve this problem?

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

Thank you very much!!!
I solve this problem when I change the dataType to "text json".
Just look the link: http://stackoverflow.com/questions/5095307/jquery-json-response-always-triggers-a-parseerror
But I dont know why.

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

How to debug the phonegap?

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

How to use the PhoneGap Share plugin? sorry for my so much questions.

from ch.schwingenonline.android.

michelkaeser avatar michelkaeser commented on July 3, 2024

Glad you got it working. You can either use the "Ripple" Chrome plugin or debug on-device using adb logcat.

About the share plugin, no idea, didn't look at it.

I'm going to close this issue as you got things running.

Please read the official docs/manuals etc of PhoneGap to add features....this repo should just be a good starting point to get a working WP app as is. -- Thx.

from ch.schwingenonline.android.

yetone avatar yetone commented on July 3, 2024

Hi, I have a question.
Can this code build to WindowsPhone App?

from ch.schwingenonline.android.

Related Issues (6)

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.