I'd like to restyle part of wikipedia articles and embed these parts into mobile app.
I tried to use
http://en.wikipedia.org/w/api.php?action=parse&format=json&page=New_York
but text in json files contains formatting for mediawiki.
How to maintain links to other pages without a mediawiki platform, so that they are displayed within the mobile (or web) app?
e.g.
e.g.
<a href="/wiki/Wikipedia:IPA_for _English # Key" title="Wikipedia:IPA \
for English">
hehe, yes, this was one of my first questions when I did not know about programming with javascript.
It is funny how questions are posed when beginner :)
Here and then I will go back to old questions of mine and answer them if something useful to share.
To answer my own question:
it is possible to hijack a link.
using jquery here for simplicity, it is possible to select <a> tags that have a pattern and then bind a function to them.
Example:
$("a[href*='/wiki/']").click(function(e){
// capture the link
var link = this.href;
// do something else..
}
Related
Do you know, how to add open graph parameters to specific URLs on my site using Google Tag Manager? I couldn't find anywhere answer on that.
Thanks a lot!
No unfortunately not. Unlike Google where it's become a lot better in the last 3 years at using rendered JavaScript content to pick up code generated by tag managers - Facebook sadly hasn't advanced this far + will only pick up content in the actual HTML.
See this blog post (in Dutch) for guidance: http://vlcm.be/2017/07/open-graph-metatags-google-tag-manager/
So unfortunately when it comes to OGP and Twitter Cards you'll have to add them the old fashioned way.
I'm trying to make a google form look like my own site. I found examples of how to do this on How to style Google Forms and google-custom-form (GitHub project), but I tried both of the examples they give and they seem to fail now.
I had a look at Class Form - Google Apps Script which seems to be like an API, but I can't get my head around the documentation. Does anyone have an example of it working. Or has found another way of getting this to work? It would be really handy to do as embedded forms look really out of sync with the rest of the site.
The API you're linking to is an apps script API. This is needed if you want to create dynamic forms (dynamic amount of questions, dynamic answers,...) but not for custom styling. An intro to appscript can be found on this page: https://developers.google.com/apps-script/
You could just create a form manually on https://www.google.com/forms/about/
You can change the styling and colors in the top-right of the page. When you are ready to embed the form on your own page you have to press "SEND", an select the embed icon <> at the top.
I've worked with this a ton, and still have issues with it. Been learning the new api v4 for sheets but still having trouble, it is still in beta too. For now I can recommend this solution though by heaversm on github.
https://github.com/heaversm/google-custom-form
The example fully works as long as you find the entry.xxxxxxx for each field and replace in the appropriate js. To avoid the embed issues, give your form submit on a click function that has the event as the input and then preventDefault on the event like so:
$('#submit-button').on('click', function(event){
event.preventDefault();
// continue code from heaversm
});
Hope this works for you. Cheers
In Google reader(R.I.P) we could select some interesting links by a special tag and then make public them and show links on our blogs or websites.
Is there a way to create this by Google reader alternatives like Inoreader or Feedly or AOL reader or etc?
I should probably start by saying that I'm the BDFL of Inoreader, but I feel obliged to answer you. If anyone thinks my answer is inappropriate or that this can be achieved with one of the other mentioned options, feel free to bash me in the comments :)
Yes, you can do that in Inoreader.
Since you are familiar with Google Reader, you shouldn't have much difficulties starting up with it, but if you have, here's a quick guide to get you started.
Depending on what you need to achieve the option you want is accessible via right-click on a folder or a tag:
Then in the dialog that pops up, you will see an Export option. Click it and you will get 3 links - for RSS feed, HTML page (what you need) and a public OPML file (for folders only):
A few notes on folders and tags:
Folders are used to group sources (RSS, social and other feeds) and content inside them is automatically populated from the feeds.
Tags on the other hand are mostly manually populated by you. When you read an article and you find it interesting, you can press "T" or click the label icon at the bottom of article to tag it. This behavior is almost identical in all major RSS readers. Working with tags in Inoreader is covered in detail in this blog post.
Now I said mostly before, because tags can also be automatically populated by Inoreader's Rules. Basically they works like your email filter. You can set up keywords or other conditions and tag articles automatically as they arrive. This feature is covered in this blog post.
Hope this helps!
I have a list of pages that have to appear in different places of my Plone. If I use an internal link, I see an HTML link in the page but instead of that I would like to see the embedded content of the linked page.
I've tried to install some link plugins (Smart Link, vs.alias...) but I'm not able to find the solution.
I'm using Plone 4.3.
I don't know any Plone Plugin, which satisfy your requirement.
A long time ago i wrote this small js to show internal links in a popup using Plone's prepOverlay.
In this case you can put a popup custom CSS class on the internal link with TinyMCE.
It simply shows the content area of the given URL.
$(function(){
jq('a.popup').prepOverlay({
subtype:'ajax',
urlmatch:'$',urlreplace:' #content > *'
});
});
I guess this is a good starting point for your own implementation.
You could think of a criterion like location, contenttype, etc., to distinct, which articles should be picked (in worst case use collective.flag), then fetch them with a collection, to give you the links as a resultlist, and set its view to all_content, a nice feature, introduced in the Plone-4 series.
I have inherited some code which uses uses the LinkedIn Company Profile API. At least that's what I think it is. Basically a script tag is rendered in the following format:
<script type="IN/CompanyProfile" data-id="9999" data-format="click"></script>
This together with .js file creates a link with the Linked-in logo which when clicked on reveals profile of company. Question is, can I customize the link. I want to add some text to the right of the linked in logo. I couldn't find any relevant documentation on it. I added a span tag with some text and attempted to wire up the click of the span, so that when clicked it clicks the linkedin icon. That doesn't seem to work-- which I found rather odd.
Any thoughts?
The Company Profile plugin builder is here:
https://developer.linkedin.com/plugins/company-profile-plugin
Customization of this plugin is limited to width (using data-width) at this time because of the complex layout. However, you could build something similar using the Javascript API if you need something more customized to your system.
This is another option that is more customizable, but has less interactivity:
https://www.linkedin.com/profile/profile-badges