Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Installing 3rd Party Plugin

Hello,

I would like to install a 3rd party Plugin that comes with three (3) scripts:

  • CSS script

  • JS script

  • HTML script

    Based on what I read:

    For the CSS script: Create New CSS paste the CSS script in file
    For the JS script: Create New JS past the JS script in file

    My questions are:

  • For the HTML script - I am not sure where this script goes. Would it be inserted into a NEW JS file? Or would it be inserted into a HTML component?

  • Also, would I need to also include some kind of Javascript on Page Load? If so, can you provide an example?

  • Anything else that would need to be done?

    Thank you in advance and would appreciate it if you can be as descriptive as possible.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Installing 3rd Party Plugin

Hello,

1) Please use HTML component for that
2) No, you don't need to include that JS. Appery.io automatically creates links for all custon JS/CSS files
3) No, it is enough to add custom JS/CSS files and HTML layout to the component HTML

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Installing 3rd Party Plugin

Thank you Sergiy!

Basically, I am trying to add a Horizontal Scrolling News Ticker Marquee to the bottom of the page that would be connected to XML news feed. I tried the above but can't seem to get it to work.

Would you be familiar with a similar plugin that actually works on the Appery platform? Thanks.

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Installing 3rd Party Plugin

hi Ed,

jQuery plugins generally are relatively easy to get working.....if you can point towards the plugin source /download URL, i can help you with adding the plugin

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Installing 3rd Party Plugin

Thank you kindly M&M for offering to assist!

I have never added an outside 3rd party plugin before and not familiar with the process.

The plugin is Web Ticker v2.1.1 at https://github.com/jonmifsud/Web-Ticker/

I selected this plugin because it offers RSS feed integration.

Basically, I inserted the contents of jquery.webticker.js into a JS file and the contents of webticker.css into a CSS file. I created a HTML component and inserted the contents of the source code file (not sure if this what I am supposed to do).

Regarding the RSS feed, I created a service in Appery which works fine when testing. Furthermore, on line 172 in the JS file I removed "false" and added instead the RSS feed URL (not sure if this what I am supposed to do to activate the RSS feed).

Line 172 of JS file
rssurl: 'http://domain.com/rss/...',

Also, other files came with it (webticker.jquery.json and asset folder) but not sure how to implement those.

Thank you in advance!

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Installing 3rd Party Plugin

Here Ed, a dropbox link below. This simple JQM app has a single page with a html component. Edit the html component properties....choose type as "HTML" and then for the HTML source paste this:

html component: width: auto and height: 100%

The plugin basically just needs jquery, the css and the js file to work...thats all :-)

The folder structure that I created is shown in the attached image. Usually there is more than 1 way to include /use jQuery plugins but I prefer this method cos the CSS and JS file won't interfere with other stuff.

Just remember not to rename it cos from what I remember it used to break some things if the project that is restored from backup is renamed. This could help get started with the plugin

https://www.dropbox.com/s/rw6kkessn19... Image

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Installing 3rd Party Plugin

Thank you for all your effort M&M! I really appreciate it. I will look it over and respond back.

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Installing 3rd Party Plugin

Hello M&M,

I followed the instructions but I ran into a hiccup. I am still working on getting it to work.

In the mean time, I was wondering since you seem so knowledgeable if you happen to have a solution for the following:

A have a Premium section on the App to which I want to restrict access to users unless they subscribe for a yearly membership via a PayPal subscription API.

Below are the steps I wish to accomplish:

  1. User creates account on App and is redirected to register for a yearly membership through PayPal subscription

  2. Upon registering and making payment through Paypal subscription, User is redirected back to the App and is automatically given access to the Premium section through login

    I can't seem to find a way to a) restrict the user from the Premium section; and b) to make the process fully automated without having to manually activate each paid user.

    Thanks in advance.

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Installing 3rd Party Plugin

That should be pretty straightforward. Whenever the user registers successfully, save that username or userid in a table (or a collection to be more precise) on the server. Whenever a user tries to navigate to the premium section, do a service or ajax call using his id and check his status whether he is eligible to access the premium section and only then redirect him to the premium section. Ideally you could even store the information on the client side and do a local lookup first, and then a server look up if the information cannot be found locally. This would speed up the time required to access the page but of course you will need to securely store it and also add some expiry information if required

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Installing 3rd Party Plugin

Thanks M&M!

The problem I am encountering is making the process full automated without having to manually update anything after a user makes a payment.

I am looking for a way to a) have PayPal automatically update the user's profile to "paid" on the table after the user has paid and b) getting the right script to allow the user access to the premium section based on their paid status.

When it comes to using PayPal, I am open to using either the PayPal API or the PayPal button.

Return to “Issues”