Thursday, January 24, 2019

Using WordPress Content in a Native Mobile App

Using WordPress Content in a Native Mobile App
WordPress is, by far, the most popular content management system (CMS) in use today. 60% of the CMS market is owned by WordPress, and further, almost 30% of all websites are run on WordPress. This means A LOT of content in A LOT of websites that is craving to be used in new ways, on new devices. In some cases it makes perfect sense to leverage said content in a native mobile app. Enter NativeScript.
wordpress and nativescript
Yes, WordPress is for managing web content (HTML) and NativeScript is a framework for building cross-platform native mobile apps (decidedly not HTML). So what do the two have in common?
We don't advocate re-creating websites in mobile apps. You run the risk of violating Apple's terms for an app that isn't unique or "app-like", and more importantly, users likely will avoid your app if you are simply re-creating the same web experience. It's an opportunity to get creative! 👨‍🎨

APIs FTW

As with any great relationship, it all started with a RESTful API...
NativeScript + WordPress = 😍
Out of the box, WordPress includes RESTful API endpoints for WordPress data types, providing web developers (and mobile, and desktop) the ability to interact with stored content in new and exciting ways. And of course, the provided endpoints are language-agnostic. Any framework that can consume JSON will happily digest what WordPress provides. Given that NativeScript apps are built on JavaScript, consuming such an API with a simple fetch call is standard fare.

Let's Build an App

I imagine if you are here, you have an existing WordPress site with weeks, months, or even years worth of content. The potential to re-purpose said content within a native, cross-platform, mobile app is intriguing to say the least.
I think there is no better way to learn something than to do it yourself. So let's build an app!
Let's put together a simple NativeScript app to leverage WordPress content categories, posts, and post content, running on both iOS and Android, all from the same shared codebase.
While a deep dive of the WordPress API is out of the scope of this article, suffice it to say the API is well documented.

NativeScript Sidekick

Trust me when I say every good NativeScript app starts with a starter kit provided by NativeScript Sidekick.
Sidekick is a free tool for Mac, Windows, and Linux that runs on top of the NativeScript CLI to provide you with templates, plugin management, cloud builds, and app store publishing.
Read all about the features provided by NativeScript Sidekick in this "week of Sidekick" blog series.
Once you get Sidekick installed, open it up, create a new app, and choose the Blank template:
nativescript sidekick starter templates
I'm going to stick with plain JavaScript, but you're welcome to use TypeScript or Angular if you're more comfortable with those architectures.
Before we open our code editor of choice, let's add a few pages to our app that we know we will need.
Click the New Page button and add two more pages, or views, to our app.
nativescript sidekick add new page
Both of the pages can just be blank pages, and you can name the first category and the second post.

The Code

Our scaffolded app has three basic views:
  • home-page.xml (comes with blank template)
  • category-page.xml (you created this)
  • post-page.xml (you also created this)
It's a good time to note that a completed version of this app is available here on Github if you get lost!
Our main-page view is just going to be a button. Because who doesn't love a good button?
wordpress button screen
To render that screen, our /home/home-page.xml file just needs some simple layout code with a button:
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
    class="page bg"
    backgroundSpanUnderStatusBar="true">

    <Page.actionBar>
        <ActionBar title="WordPress + NativeScript = ❤️" class="action-bar">
        </ActionBar>
    </Page.actionBar>

    <StackLayout class="p-20">
        <Label text="WordPress Demo" class="h1 text-center m-t-30 heading"/>
        <Button text="Load Categories" tap="showCategories" class="btn btn-primary btn-active"/>
    </StackLayout>

</Page>
...and its corresponding home-page.js file needs a little plumbing to wire up the button to send us to the next view, category-page:
var frameModule = require('ui/frame');

exports.showCategories = function() {
  var navigationEntry = {
    moduleName: './category/category-page',
    animated: true
  };
  var topmost = frameModule.topmost();
  topmost.navigate(navigationEntry);
};
Now it gets interesting. Open up /category/category-page.xml and replace the existing code with the following NativeScript ListView (including an item template) like so:
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
    class="page bg"
    loaded="pageLoaded">

    <Page.actionBar>
        <ActionBar title="WordPress Categories" icon="" class="action-bar">
            <NavigationButton text="Back" android.systemIcon="ic_menu_back" />
        </ActionBar>
    </Page.actionBar>

    <ListView id="listview" items="{{ items }}" class="list-group">
        <ListView.itemTemplate>
            <StackLayout class="list-group-item" id="{{ id }}" tap="showPost">
                <Label text="{{ name }}" class="wp-category" />
                    <Label text="{{ description }}" textWrap="true" class="wp-subtitle" />
                </StackLayout>
        </ListView.itemTemplate>
    </ListView>

</Page>
This view's accompanying JavaScript file, category-page.js, contains two functions. pageLoaded is, not surprisingly, executed when the page is loaded, and showPost will navigate us to the next view (post-page), retaining the context of the category the user tapped:
var frameModule = require('ui/frame');
var Observable = require('data/observable').Observable;
var ObservableArray = require('data/observable-array').ObservableArray;

var page;
var items = new ObservableArray([]);
var pageData = new Observable();

exports.pageLoaded = function(args) {
  page = args.object;
  page.bindingContext = pageData;

  fetch('https://demo.wp-api.org/wp-json/wp/v2/categories')
    .then(response => {
      return response.json();
    })
    .then(function(r) {
      pageData.set('items', r);
    });
};

exports.showPost = function(args) {
  var navigationEntry = {
    moduleName: './post/post-page',
    animated: true,
    context: { id: args.view.id }
  };

  var topmost = frameModule.topmost();
  topmost.navigate(navigationEntry);
};
Leaving us with a pleasing little screen containing our WordPress post categories:
wordpress categories
The key code in category-page.js is the fetch APIfetch allows us to request data from a remote endpoint and return it in JSON, making it easily consumable in our app!
You'll also quickly notice the API endpoint we are using is leveraging the WordPress demo dataset. With a lot of lorem ipsum.
If we take a look at the returned JSON, we see a pretty legible dataset:
"id":2,
"count":3,
"description":"Neque quibusdam nihil sequi quia et inventore",
"link":"https:\/\/demo.wp-api.org\/category\/aut-architecto-nihil\/",
"name":"Aut architecto nihil",
"slug":"aut-architecto-nihil",
"taxonomy":"category",
"parent":0,
...
Ok, let's finish up and replace post/post-page.xml with another ListView:
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
    class="page bg"
    navigatedTo="pageNavigatedTo">

    <Page.actionBar>
        <ActionBar title="WordPress Posts" icon="" class="action-bar">
            <NavigationButton text="Back" android.systemIcon="ic_menu_back" />
        </ActionBar>
    </Page.actionBar>

    <ListView id="listview" items="{{ items }}" class="list-group">
        <ListView.itemTemplate>
            <StackLayout class="list-group-item" link="{{ link }}" tap="loadWebSite">
                <Label text="{{ title.rendered }}" class="wp-subtitle" />
                </StackLayout>
        </ListView.itemTemplate>
    </ListView>

</Page>
...again, with our post-page.js code behind powering the view - and containing another two functions: pageNavigatedTo and loadWebSite which, respectively, perform a fetch request to load our posts and fire up a NativeScript WebView to show the post content's HTML output in an in-app web browser.
var frameModule = require('ui/frame');
var pageModule = require('ui/page');
var webViewModule = require('ui/web-view');
var Observable = require('data/observable').Observable;
var ObservableArray = require('data/observable-array').ObservableArray;

var page;
var items = new ObservableArray([]);
var pageData = new Observable();

exports.pageNavigatedTo = function(args) {
  page = args.object;
  page.bindingContext = pageData;

  var id = page.navigationContext.id;

  fetch('https://demo.wp-api.org/wp-json/wp/v2/posts?categories=' + id)
    .then(response => {
      return response.json();
    })
    .then(function(r) {
      pageData.set('items', r);
    });
};

exports.loadWebSite = function(args) {
  var link = args.view.link;

  var factoryFunc = function() {
    var webView = new webViewModule.WebView();
    webView.src = link;
    var page = new pageModule.Page();
    page.content = webView;
    return page;
  };

  var topmost = frameModule.topmost();
  topmost.navigate(factoryFunc);
};
While I'm glossing over some of the details to save space, a reminder that all of this code is available here on Github.
And we are done! Well, if you run the app as-is, it might not look exactly like these screenshots. That is until you grab the completed app.css, the /images/bg.png background image, and font files from /fonts from Github and add those to your app.

Deploy Your App

Back in NativeScript Sidekick, go to the Run menu and choose Run on Device. Choose the connected device on which you want to run your app, and build the app using our cloud servers (or build locally if you have the appropriate SDKs set up).
Any troubles deploying an app? Consult the NativeScript Sidekick docs!
nativescript sidekick run on device
Sharing website content between web and mobile platforms is one thing. What about sharing the actual website code with mobile? While not related to WordPress, if you're an Angular developer and interested in the NativeScript + Angular web/mobile code sharing story, be sure to check out our code sharing webinar on YouTube.

Summary

Today we looked at how we can consume existing WordPress content with the WordPress REST API to power a truly native, cross-platform app with NativeScript. By using a little JavaScript and CSS, you can re-purpose years worth of content and provide a new, engaging, user experience for your users. Happy NativeScripting! 😁

Tuesday, October 9, 2018

online-bussiness

online-bussiness
Modern technology has enabled entrepreneurs to do their work from almost anywhere. In fact, many companies operate in a wholly digital environment, lowering overhead costs and offering freedom to entrepreneurs who want to conduct business on the move. Creating an online business is simply a matter of focusing on your strengths and expanding your network. Here are 12 great online business ideas to get you started.

Do you know the ins and outs of search engines and have skills in platforms like Google Analytics? The owners of a lot of smaller companies don't realize how much of an impact search engine optimization (SEO) can have on their business. Educate those business owners on the power of SEO to help transform their websites into a more SEO-friendly property. Use your skills to show business owners how to read and use their analytics data the right way, and how to properly use keywords and structure content to get more traffic.
Real-Life Success Story: AJ Ghergich
If you possess a great deal of business experience and knowledge, why not create a business that helps aspiring entrepreneurs find success? You can use your skills to help new business owners get off to a good start and help experienced entrepreneurs keep up with demand. To show off your knowledge and skills and bring in clients, you can also write articles about business on platforms like LinkedIn.
Real-Life Success Story: Michael Port
There's an audience for everything, whether it's making dollhouse furniture or creating organic dog food. With a specialty e-commerce store, you can reach those customers who are seeking your specific products. All you need is a web-hosting service with an integrated shopping cart feature or with e-commerce software, and your business will be operational in no time. You can even work with vendors to ship products to customers on your behalf, which means you don't need to own a lot of inventory. [See Related Story: A Small Business Guide to E-Commerce Shipping]
Real-Life Success Story: Sunny Decals
Larger companies can hire an agency or full-time staff member to run their Facebook and Twitter accounts, but small businesses often have to handle their own social media marketing. With so many responsibilities, business owners are often too busy, overwhelmed or undereducated about the importance of social media to spend time developing and implementing a great social media strategy. As a consultant, you can help them determine the best tactics, posting schedules and content for their target audience. As their follower count grows, so will your business.
Real-Life Success Story: Mark Schaefer
There's nothing more off-putting than a poorly designed website, and often, it kills credibility. If you know HTML and have a good eye for design, you can launch a service to create attractive, easy-to-use websites for small businesses. Put your skills to good use for business owners who want to take their online presence to the next level. Build a comprehensive portfolio, and then create your own website to show it off and attract a steady stream of clients.
Real-Life Success Story: Leslie Bernal
Do you have impeccable organizational skills? What about cleaning skills? Can you quickly and efficiently carry out these tasks? Maybe it's time to put those skills to good use by becoming an online personal assistant or task manager. Companies like TaskRabbit or Zirtual allow you to sign up for tasks you want to complete — including data research, virtual assistant or running errands — and begin building clientele.
Real-Life Success Story: Lynn Sudlow
If you're a person who loves leaving customer reviews on sites like Amazon, stop doing it for free. Word-of-mouth advertising is still a huge lead generator for many companies, and a lot of businesses are willing to share a portion of their profits with persuasive individuals who will promote their products to the public. If you have a personal website with a large following, this might be easier to accomplish (PR reps are always seeking out brand advocates they can send free samples to). Smart Passive Income breaks down three types of affiliate marketing and explains which one is most profitable.
Real-Life Success Story: Darren Rowse
Many small businesses don't have room in their budget for a full-time IT employee, so when their systems go on the fritz, they'll usually call a computer-savvy friend or family member. If you have experience working on computers and networks, you can eliminate their need to call in a favor and offer immediate remote technical assistance.
Real-Life Success Story: Jamie Minter
Online sites like Etsy and ArtFire are platforms that make it extremely easy for crafters who can produce a steady supply of quality handmade items, like crocheted blankets or unique painted glassware. Startup costs are extremely low if you purchase your materials in bulk from a craft supplier, and if you can turn around orders quickly, you'll be making a profit in no time at all. It's even possible to turn your store into a full-time gig.
Real-Life Success Story: Coralie Reiter Jewelry
Mobile applications are more popular than ever, and people are willing to pay good money for ways to manage their lives from their smartphones. If you have a great idea and happen to know coding, you can run with it and create your app yourself. If you just have an idea and don't know the ins and outs of how to turn it into a reality, there are plenty of software developers looking to collaborate with people on app creation.
Real-Life Success Story: Evan Spiegel
Despite Instagram's growing popularity, not all brands know what they're doing on the app. If you have a background in social media and marketing and a passion for photography and Instagram, starting a consulting business that focuses on the popular photo app can be a great way to make money while helping other businesses improve their content and thrive.
Real-Life Success Story: Kathryn Elise
Sure, there are plenty of businesses offering social media consulting services, but you can stand out from the crowd by focusing primarily on networks that are still gathering steam with businesses. Facebook and Twitter are still the top networks, but businesses tend to struggle the most with more visual platforms like Instagram, Pinterest, Tumblr and Snapchat. All of these platforms have huge audiences, but many businesses don't realize how big they really are, how effective they can be and how to make them work for their niche. Snapchat has more than 158 million users per day, according to Business Insider. Instagram has more than 500 million daily active users, according to Statista, and Pinterest has more than 200 million.
If you've got a background in social media and a deep understanding of these particular platforms, try starting a social consulting business that focuses less on the basics and more on helping businesses take advantage of the millions of users they're not reaching by sticking solely with Facebook and Twitter.

Thursday, September 20, 2018

HOW TO LOCK A FOLDER WITH PASSWORD PROTECTION WITH OUT ANY SOFTWARE


Learn how to lock a folder with password with out any software.

There are many software that will provide you this feature but there is a problem with that. If by any means that software is uninstalled you might loose your private data because of the login credential will be deleted. In this blog you will learn to create your own method to lock a folder with password protection.

Step 1: Create a folder name "PRIVATE" inside of folder you want to save your content.
Step 2: Now open a notepad. Remember to create that notepad file out side of that folder.
Step 3: Copy the below code and paste it in that notepad file by typing your password in " CHANGE_YOUR_PASSWORD"




Step 4: Now save this file as "LOCKER.BAT"
Step 5: Once you did that delete your notepad file because there will be BAT file to use.
Step 6: Now run that "LOCKER.BAT" file and you will see a command window. In there press "Y" to lock the folder every time when you need to see your private data you have to run that file and enter your password to access your private data.
So isn't it cool idea? you can easily lock a folder in few clicks. Then why you need a software to lock your folder. Complete folder protection with out any software. Let me Know if you faced any issues during folder locking. You can easily save your personnel documents and files inside that folder and lock them.

Monday, September 17, 2018

10 WAYS TO MAKE MONEY ONLINE

10 WAYS TO MAKE MONEY ONLINE
Just check here the top 10 ways which are most common & people talk a lot about them to make money online. This article will use a rating system for each option in terms of trust, earning potential as well as in in terms of simplicity of the program.
1. EARN MONEY BY READING Ads
Can you believe, you can earn money by clicking & reading ads? Yes, this is 100% true & there are many sites where you can signup, view ads & earn some extra income.
I myself earn $400-$700 per month from few sites. You can see one of the video below where I am showing my earning from one of the site.
If you want to earn from this, then you can check these top PTC sites with complete details to earn money by reading ads & how to grow your income.
Trust Rating: 7/10
Earning Potential: Not much. Good for part timers only
Simple or Hard: Very Simple. Even a 10th class boy can do this.



 2. EARN WITH GOOGLE ADSENSE
This option comes on the top of my money making list. I make 6 figure income in INR every month from Google AdSense. You can see one of the latest payment proof below-
AdSense is simply the best earning opportunities on internet and no one can deny this fact. In fact, earning from AdSense was never so easy as you can earn today.
What you need here is a simple blog or website where you can write & share your knowledge & experiences with the world.
You can apply for AdSense account & place 3 AdSense ads on each & every page on your blog. When people visit your website & click on any ad, you will earn minimum Rs.10 to Rs.50 depending on your topic.
Trust Rating: 10/10
Earning Potential: Great! People Earn from $100 to $10000 or even more
Simple or Hard: Not very simple & not very hard. Everyone should try this.
You can refer this post on Google AdSense to learn more about this.
We have created one of the best AdSense guide which gives you complete understanding in a very simple way. You can signup here to get it free.


3. MAKE MONEY WITH AFFILIATE MARKETING
I don’t have to convince you to show the growth of online shopping in India. Flipkart, Amazon.in or Snapdeal is not the only ecommerce portals, people are shopping online from.
There are more than 500 sites in India or thousands of sites all over the world where people buy things online.
Do you know all these sites offer you a way of making money online? That system is known asaffiliate program.
If you signup affiliate program of any shopping site and then refer someone to that shopping site, you can earn minimum 4% to 15% commission.
Although it looks simple but there is a perfect way, you can start this online business. Millions of people from all over the world make money from number of affiliate programs.
Our training package will show you the complete ideas & all the tricks to become successful & earn lots of money from affiliate marketing.
Trust Rating: 9/10
Earning Potential: Great! No limit for income for super affiliates
Simple or Hard: It’s a bit hard but don’t worry, our training will help you a lot.

                    


4. MAKE MONEY ON FIVER
If you know anything that can be useful for other people then you can make money from Fiverr. People sell many different types of services on Fiverr & earn $5 from each sale.
Anything related to graphics & design, advice or consultancy, data entry, virtual assistance, music & videos, programming, writing, marketing, business or hundreds of other things you can do on Fiverr.
It does not take more than 15 minutes to complete 1 order and if you receive even 1 order per day then you can make $150 (Rs.9000/-) per month.
Trust Rating: 9.5/10
Earning Potential: There is a great potential of earning for experts.
Simple or Hard: Its very simple because you are doing only what you know.

5. EARN FROM ONLINE SURVEYS & SMARTPHONE APPS
Here I am going to tell you about 2 ways of earning online & that is by completing online surveys & by installing apps in your Smartphone & completing different tasks.
I have already written detailed articles on both of these earning methods so you can directly refer this link below-
• 10 Things Everyone Want to Know About Online Surveys
• Top 20 Free Paid Online Survey Sites
• Make Easy Money from 20 Android Smartphone Apps
Trust Rating: 5/10
Earning Potential: Not much. But you should try because some people earn good & some little. Many sites ask for registration fee for the same sites, I have provided above.
Simple or Hard: Its easy to work. You can signup from the above menu so that we can provide you more similar sites.

6. EARN MONEY AS A SELLER
There is another way you can use online shopping sites as a way to make money online. And that is by becoming a seller.
Do you know, thousands of sellers on sites like Flipkart, Amazon or others started selling first time in their life.
Neither they sold anything before nor they had any product. So don’t worry if you are one of those because first thing you need to decide is “Yes, I want to sell online”.
You can roam around local market in your city & check some of the popular & reasonable priced items that is not easily available in other places.
You can also do the research on shopping sites for prices, response etc. before joining as a seller. Then you can list your item on these top shopping sites & make money by selling this.
Trust Rating: 8.5/10
Earning Potential: Depend on your product, margin, response & no. of sites you join.
Simple or Hard: Moderate
7. EARN CASH WITH MICRO JOBS
There are dozens of sites that provide micro jobs. You can become a micro worker & make money by doing simple & short tasks. One of the top site on this list is mTurk and other are MicroWorkers, ShortTask etc.
Example of some of tasks are-
1. Write a comment or give rating to a webpage, a video or app
2. Search something from Google
3. Find contact details of sites related to a particular brand
4. Complete a short survey or write a small article
5. signup on a particular website or install an app
6. Transcribe audio
7. And many other things
Trust Rating: 7/10
Earning Potential: You can earn $100 to $400 in part time.
Simple or Hard: Simple
8. MAKE MONEY THROUGH FREELANCING SITES
Freelancing sites is again one of the good way to earn income but its not a cup of tea of every person. You need to have some skills before you could decide to join any freelancing site.
There are many top freelancing sites where you can signup and start earning. You can do any job which can be delivered online on these sites. Things like software coding, creating websites, internet marketing, writing, Photoshop jobs are some of the things you can do on these freelancing sites.
Here is a list of top 10 freelancing sites where you can join and start making money.
Trust Rating: 8/10
Earning Potential: Good but you can’t make millions with freelancing jobs..
Simple or Hard: Easy for those who posses skills.
10 WAYS TO MAKE MONEY ONLINE
10 WAYS TO MAKE MONEY ONLINE
9. MAKE MONEY ON YOUTUBE AND FACEBOOK
Now a days people search if there is any way to make money from YouTube or Facebook. These sites are the most used sites on internet and so the potential of earning money from these sites.
Program like YouTube Partners can earn you some handsome money by uploading videos on YouTube. There are other ways as well to earn money from YouTube.
Can you believe a 1 minute funny video ‘Charlie bit my finger’ has earned more than 1 million dollar to the person who has uploaded this video in YouTube.
Similarly, there are many ways you can earn using Facebook. Just check this article which will show you many similar ways.
Trust Rating: 9/10
Earning Potential: Average for average people & unlimited for smart & hard worker.
Simple or Hard: Easy for some and little difficult for some
10. MAKE MONEY BY ENTERING CAPCHAS
As internet is growing, there is a huge demand for online captcha entry jobs. Capthca images are used to prevent automatic software to access a webpage.
So when these software access the sites & find the captchas, they pass on these captchas to the captcha solver & once they enter captcha, the software can access the site.
You can also become a captcha solver & earn some extra income by working 2-4 hours a day. You can find here some of the best sites where you can join & start earning.
Trust Rating: 6/10
Earning Potential: For people who are looking for extra income upto $200 a month.
Simple or Hard: Simple but you spend more time & earn less.
Conclusion
These were the most common ways to make money online but these are not the only ways to earn money but you can find many other ways. But yes, if someone is looking for the ways, then these top 10 options are the only way to begin.
We will write about more such money making programs and the best tips & tricks you can use to work on these programs.
So just subscribe to this blog so that you will never miss any way to make money online & neither any tips about working on them.
——————————————————————————————
10 WAYS TO MAKE MONEY ONLINE