3rd party tool that can generate a list related articles for a japanese-language site - javascript

I run a site with a large number of news articles. I'm looking for a 3rd party tool(or widget) that, when placed on an article page, would generate a list of related articles within the same site.
So my requirements are:
Returns a list of links to related articles
Has to be integrated front-end (javascript,ajax,etc)
Has to sustain large traffic and display results quickly
Most importantly, must support Japanese language content
Any ideas on tools, widgets, services out there would be great - thanks!

nRelate has this exact product as a simple WordPress plugin - used both for related content and for most popular content.
http://nrelate.com/install-products/
Gravity also does something similar, but I believe you have to be a large website to gain access to their tools.
http://www.gravity.com/publishers

Related

Make React components available to users as embeddable widgets

On the basketball-reference website, for the majority of the website's tables, there is the option Embed this Table, which allows users to generate a tag that can be included in their own webpages.
.
I am working on a React (MERN stack) application, and I would like to implement this type of functionality. In particular, there are a handful of components (that return tables, graphs and charts) that I would like to make available to users of my website in a similar manner. For another example, opta sports offers a feature for embeddable widgets that is similar to what I am seeking to build with React.
I don't know much about iFrames or about embedding apps into other apps. I'm not sure how to get started on this in React. Any thoughts or suggestions or links to helpful articles or libraries or approaches for this would be really helpful.
Thanks
Also: A similar version of my question was asked previously, however the only submitted answer is not particularly helpful.

How can I scrape text and images from a random web page?

I need a way to visually represent a random web page on the internet.
Let's say for example this web page.
Currently, these are the standard assets I can use:
Favicon: Too small, too abstract.
Title: Very specific but poor visual aesthetics.
URL: Nobody cares to read.
Icon: Too abstract.
Thumbnail: Hard to get, too ugly (many elements crammed in a small space).
I need to visually represent a random website in a way that is very meaningful and inviting for others to click on it.
I need something like what Facebook does when you share a link:
It scraps the link for images and then creates a beautiful meaningful tile which is inviting to click on.
Any way I can scrape the images and text from websites? I'm primarily interested in a Objective-C/JavaScript combo but anything will do and will be selected as an approved answer.
Edit: Re-wrote the post and changed the title.
Websites will often provide meta information for user friendly social media sharing, such as Open Graph protocol tags. In fact, in your own example, the reddit page has Open Graph tags which make up the information in the Link Preview (look for meta tags with og: properties).
A fallback approach would be to implement site specific parsing code for most popular websites that don't already conform to a standardized format or to try and generically guess what the most prominent content on a given website is (for example, biggest image above the fold, first few sentences of the first paragraph, text in heading elements etc).
Problem with the former approach is that you you have to maintain the parsers as those websites change and evolve and with the latter that you simply cannot reliably predict what's important on a page and you can't expect to always find what you're looking for either (images for the thumbnail, for example).
Since you will never be able to generate meaningful previews for a 100% of the websites, it boils down to a simple question. What's an acceptable rate of successful link previews? If it's close to what you can get parsing standard meta information, I'd stick with that and save myself a lot of headache. If not, alternatively to the libraries shared above, you can also have a look at paid services/APIs which will likely cover more use cases than you could on your own.
This is what the OpenGraph standard is for. For instance, if you go to the Reddit post in the example, you can view the page information provided by HTML <meta /> tags (all the ones with names starting with 'og'):
However, it is not possible for you to get the data from inside a web browser; CORS prevents the request to the URL. In fact, what Facebook seems to do is send the URL to their servers and have them perform a request to get the required information, and sending it back.
You can develop your own Link Preview plugin or use existing third party available plugins.
Posting example here is not possible. But i can URL of popular Link Preview plugins. Which may free or paid.
Link Preview
jQuery Preview:
You can check your url demo here , Which gives response in JSON and Raw Data
You can use API also.
Hope it helps.

SEO and AngularJS

I am building a web application with Angular JS, I need this to be fully SEO-optimized.
It seems that for a few, google is able to crawl angular app but it is not clear if it can read everything (eg I read that directives cannot be interpreted).
So today, is an angular app fully google-compatible even if we use the full set of JS functions? What about other engines? Do we still need fantomJS static generation for Yahoo or microsoft?
As of today, AngularJS is still not fully SEO-optimized. Thus, a lot of developers still find it necessary to use services like Predender.io or cooking up their own implementation by using PhantomJS
Great strides have been made towards SEO-friendliness, especially when talking about AngularJS 2.0 since it allows you to render HTML on the server side (More info here).
However, even with the new additions it's better to retain control over what the search engines are seeing by creating pre-rendered versions of your site.
Here is a great article about this very topic: https://builtvisible.com/javascript-framework-seo/
To quote some parts of it:
Google can render and crawl JS sites. This, however is no guarantee that the outcome will be an SEO friendly, perfectly optimised site! Technical SEO expertise is needed, especially during testing. This will ensure that you have an SEO friendly site architecture, targeting the right keywords. A site that continues to rank despite the changes made in Google’s crawl.
In my opinion, it’s better to retain tighter control of what’s being rendered by serving Google a pre-rendered, flat version of your site. This way, all the classic rules of SEO apply and it should be easier to detect and diagnose potential SEO issues during testing.
As far as other search engines, it seems like they currently don't support javascript rendering yet: https://www.bing.com/webmaster/help/webmaster-guidelines-30fba23a
The technology used on your website can sometimes prevent Bingbot from being able to find your content. Rich media (Flash, JavaScript, etc.) can lead to Bing not being able to crawl through navigation, or not see content embedded in a webpage. To avoid any issue, you should consider implementing a down-level experience which includes the same content elements and links as your rich version does. This will allow anyone (Bingbot) without rich media enabled to see and interact with your website.

Salesforce data loss prevention - can I embed JS on standard salesforce pages?

I'm looking into possible ways to control and monitor data leaving our Salesforce Org. Currently solutions appear to fall into two broad categories:
Lock down features for users using profiles. E.g. Prevent certain kinds of users from having reporting, or exporting rights
Have third party monitoring software installed on work machine which monitor and control interactions with salesforce.com
Neither of these suits our requirements. Our problem is with users who need to be able to run and extract reports but doing so from some internet cafe. We also can't restrict them to work machines as a lot of them are travelling salespeople.
Furthermore, salesforce have said they don't provide any kind of report on what reports have been run, or what data exported.
I'm investigating the third possibility which is bolt some sort of monitoring JS code onto salesforce.com itself. If possible, I'd like to embed JS on the salesforce Report tab (and any other page where data can be exported) and intercept clicks to the "Run Report" or "Export" buttons. I'd call a logging web service with the user's name, the report parameters, time etc.
Does anyone know if it's possible to embed custom JS on salesforce pages? Or any neater solution to the above?
Thanks for your help
Ray
Salesforce is very protective of their code base, to that degree that even custom Apex code runs on a completely different domain so that they can use cross-domain scripting to prevent us from tweaking their pages :) So unless a man-in-the-midddle SSL attack is used there is no way to inject something in their code.
Maybe a grease monkey script? But users could remove them or just use another browser.
I do not think you have an ideal solution here other than security, either profile (object level) or sharing (row level). Think of it this way, someone keen on stealing data could just grab HTMLs of detail pages of rows participating in report, grabbing raw data from HTML and running reports externally. Maybe force traveling salespeople to use RDP to office located machines?
Another option would be to make a subset of your reports info visualforce pages (write out the SOQL and apex needed to gather the data, then write VF markup to display it) and then log and/or restrict who can access those pages and when (including checking the source IP).
There's clearly some serious effort involved in moving more complex reports over to this format, but it's the only way I can think of meeting your requirements.
This would also allow you to not include any sort of export options, although they could of course save the raw HTML of the page if they really wanted to.
To embed javascript in a standard SFDC page go to "Your Name" => "Setup" => "Customize" => "Home" => "Home Page Components" => Click the edit link next to "Messages & Alerts". In the "Edit Messages and Alerts" page there is a text area that you can paste javascript code that will be excecuted on almost every salesforce page.
Here are a few notes when doing this
Do not put empty lines in your code because the system will add a p html tag in it.
Use absolute references to your Salesforce pages because managed packages have a different url structure.
I'm not sure how much longer salesforce will allow this but it currently works.
For more info see http://sfdc.arrowpointe.com/2011/11/18/email-autocomplete-using-jquery/
Slightly different way of doing it https://salesforce.stackexchange.com/questions/482/how-can-i-execute-javascript-on-a-sfdc-standard-detail-page

What's a good way to merge remote, standalone web apps into a virtual site?

We have a few dozen web apps on multiple servers/platforms owned by 5 teams at our company and want to merge them into a single site. The UI part is straightforward - a common header with login/status info, tabs for the major sections of the site, and yui menus for navigation within a section.
The hard part is finding a way to do this while making minimal changes to the existing apps, which are easily breakable and a pain to deploy. We want to minimize updates to the apps and try to get it right the first time.
The only working solution we have now is to include a Javascript file to write the site header/navigation at the top of the page, which lets us easily deploy changes to all of the apps:
script src="..../site/include?appid=xxx" // app id determines which tab/navigation to display
Is there a better way to do this, especially one with better performance than remote dynamic Javascript that writes the entire page header? Are there existing frameworks to simplify this?
Consider using a portal framework like uPortal. You could aggregate all those webapps -- no matter what technologies they're written in -- by leveraging a web proxy solution.
This suggestion might be overkill if your needs are really & truly simple; but uPortal (and others) provide scores of additional functions -- like administration, statistics, SSO, and integrations with other platforms and services -- that quickly add to their attractiveness.

Categories