Sort posts by popularity in Ghost - database

I want to sort posts in the sidebar by popularity (views count?), how can I achieve this in Ghost 2.0?
I know that the Ghost(Pro) can insert a tracking pixel on the page, but as I understand it, I can't use this option in the self-hosted Ghost. Can I use Google Analytics for this?
I want to update the sidebar once a certain period of time, say, every 6 hours, or when a new post was written. Is it possible?

Related

how to dynamically set title and description of angular single page application for google bot?

i want google bot to recognize titles and descriptions of my pages, the title and descriptions are coming from the database..
i used
document.title = $scope.dataFetchedFromDB.title;
and
document.querySelector("meta[name='description']").content = $scope.dataFetchedFromDB.description;
and it does change the title and description in the browser, but not in the snippets fetched by google or facebook or slack.... the old title and description remains.
i know about ng-meta npm package, but i dont have my pages on static route, the route is determined by the page ID (every page has its ID and its description and title)
i also read
Remember that while Google says that they use JavaScript to crawl pages, Facebook, Twitter, etc., do not. You can test Google's render of your page from the links here.
But Google takes a while to index these changes in their snippets. I would recommend creating a Google Search Console account and having it fetch-and-render the pages you want it to re-index. Even then, public results make take days or weeks to reflect your changes.
Also, it seems that the Googlebot with Javascript doesn't have a lot of patience. Try to make sure you are changing your Title and Description within mere moments of the page loading, and not at the end. In little tests, it appears that the Googlebot renderer may time-out after a few seconds, and only capture the original Title and Description.
In order to get other sites like Facebook/Twitter to render the proper metadata, you'll need to server-side render these pieces of data. Whatever appears when you say "View Source..." will be seen by these simplified crawlers. Consider updating to Angular (from AngularJS) and try server-side rendering for your metadata.

How to implement the lazy loading for listing of n number of records like Gmail app loading in Codename one

I'm getting n number of records at a time when hit the web service due to this performance of the app was too bad ,so I need to implement lazy loading in my app to show the n number of records as like as Gmail app functionality to increase the performance of my app ,so anyone plz help me .
Probably the best approach is infinite scroll which you can use either via the InfiniteContainer or the InfiniteScrollAdapter.
There are discussions and samples for this including the property cross demo where you can see infinite scroll adapter in use with a webservice result.
You can see the component gallery for Codename One here.

Asynchronus Infinite scrolling to display data in table view in reacts app

I am developing my first reacts application, I go through various reacts plugins for data grid with infinite scroll option but didn't get proper solution.
What I have and What I need is:
I am fetching the users list from 3rd party API.
At a time only 50 users records fetch via API.
I have around 10000 users records and need to display first_name, last_name, email with Edit/Delete link in table view.
I need to append the next 50 users in the list when user scroll the window/div and it will happen till all the records are displayed.
I also need the sorting and searching option on first_name so that user can sort/search the user by first_name. It also needs to be done via ajax request to 3rd party API.
Please suggest me the good reactjs component/plugins to achieve this.
Thanks in advance!
Take a look on react-data-grid, it's full of features and really simple to use
I'm using react-infinite-scroller and working fine. Easy to implement.

one database, same content, two wordpress sites, different structure? or another solution to have 2 websites with the same content?

I have a WordPress site that shows posts that it gets from rss using a plugin.
I want to split the "jobs" in 2 different websites because in this configuration is not working properly (high amount of rss sources to be parsed).
I need to set one site to get the posts, and the other to show them on a template; i dont want to have the rss plugin on the site that display the posts.
Is this possible using the same database, same content but different wordpress configuration?
Is there another solution to have 2 different databases and autoupdate one from another?
Any ideea other then these 2?
Thanks
if I understand your problem correctly the solution will depend on what you can do to resolve this issue.
Firstly I think you only need one website the issue you have sounds like your website is displaying items directly from the many RSS feeds which will be slow, instead I would recommend creating a process to import the posts on a daily basis to then get written to your database.
This will probably take the form of a cron job on your server.
However if you don't have access to do this I would recommend creating pages in the back end that will import the rss content when you click import.

Implementing Yelp business photos into iPhone app like Apple Maps

I'm curious how one might mimic Apple Map's iOS6 approach to showing Yelp photos. For example, when a user searches and clicks on a business, Maps shows a rotating slideshow of photos from Yelp's collection of pictures for that venue. The photos are shown with fade in/fade out transitions.
Does anyone know how to implement this? Also, might the same approach/functionality be offered using the foursquare API?
The Yelp API won't let you (only the first image is available), but if you where to use their API you could get the business yelp url and scrape the pictures from the actual page, BUT that would involve a lot of maintenance and I don't know it that would interfere with their terms (legal?)

Resources