Making AMP page discoverable via javascript - accelerated-mobile-page

We have not AMP'ified all our pages and are using javascript/ajax call to discover whether AMP page exists and then add the "amphtml" discoverability to tag accordingly.
Make AJAX call to the webserver to see whether there is an equivalent AMP page.
If yes, add to the head.
Loading up the website in Chrome shows the equivalent AMP page via AMP Validator extension.
However, https://search.google.com/test/amp?id=pNgSex6yfpSGiMsd8OVzeQ says it's not a valid AMP page. Is this because I am adding the "amphtml" via javascript?

Is this because I am adding the "amphtml" via javascript?
Yes, you are modifying what is already an invalid AMP page and then serving it to the user with the modified html tag.
https://support.google.com/webmasters/answer/6340290

Related

Customizing sso_redirect.html in wso2 IS 5.0

I'm trying to customize the sso_redirect.html page in WSO2 IS 5.0 SP1 found in location IS_HOME\repository\resources\security\sso_redirect.html.
Though any javascript or inline css changes are getting reflected in this page, any reference to images are not honored. for e.g the tag doesnt fetch the image on the page. Is there any limitation on this front?
Thanks in advance.
Cijoy
This page could be customized by defining all the resources(style sheet, images, java script, etc..) references as url instead of relative path. Then those resources may be available at the page loading time.

Possible to use page on external site as content for MailChimp?

We've got a WordPress site and I've built a page that pulls from different sections of our site which I'd like to use as the content for a bi-weekly MailChimp newsletter. Is there anyway to automate pulling in a div on our site into the body of a MailChimp template?
All the tools I've found pull in the page as "an article" and just put an image and headline into the message body, rather than the full page verbatim.
Not adverse to doing some coding, but not sure how to start.
Thanks for any suggestions.
I can think of two different routes you might be able to try. The first is to generate an RSS feed for the content you're talking about and then use an RSS Campaign to send the email. Depending on how you have this data stored on your site, WordPress might already be generating an RSS feed for you for that content.
The second option involves more coding. If you create a template with an editable section you can then pass in the content of that section via the API. This is probably harder, since the campaign content APIs are pretty convoluted in v2.0. v3.0 should make that easier, but it's still in beta.

its possible to display different categories from another site?

Im working a newspaper, and I was wondering if its possible to display different categories from another Website, and display in my website. This site created by Joomla 2.5, I Hope someone understands this :)
Since your site is the Joomla one, you could either write a custom extension or more simply use the Jumi extension so you can write PHP code directly in the article or page on which you need to grab the content from the other site.
Then depending on what you know about the other site, there are different approaches. If it offers an API or RSS feed, you can use that to pull the content you need (and use PHP string functions for instance to modify it as you need). If the other site doesn't have an obvious way of offering content through a web service, try PHP curl, and again you can modify the content before displaying it. Check out this page too: How to parse actual HTML from page using CURL?
As Arunu said an iFrame could also work if you don't need to modify the other site's content.
What u wish to do can be accomplished using RSS feed or an i-frame.But from ur question
it's not clear which site is using joomla.

How to prevent Django pages from refreshing after submit?

I am using the Django template system. What I want is, when I submit a form, or click to an url link, page does not refreshes, but loads with the data returning from the server. Is it possible?
I recommend a combination of jQuery (easy, powerful, popular javascript library) and dajax/dajaxice (http://www.dajaxproject.com/). Dajax is very easy to set up and use, and jQuery is also easy to set up and use. Dajax is strictly for AJAX communications through Django. jQuery is perfect for taking a simple site and making it more fluid, intuitive, and user-friendly.
You need JavaScript to do that. What you are looking for is called AJAX (Asynchronous JavaScript and XML). Essentially, it means you use JavaScript to send a request to the server as soon as the link/button is clicked. The server returns some data to your Script, which then can be used to manipulate the HTML page, e.g. by inserting the responded data into the DOM. Since you do everything with JavaScript, no reloading of the whole page is required.
To start, read the AJAX tutorial. There are certain JavaScript libraries that make these things more simple for you (e.g. jQuery), but you really should understand how this stuff works first, since else you might get into trubble while trying to debug it.

Help inserting iframe into Joomla 1.5.9

I've done some research and learned that for Joomla 1.5.9 to work with iframe tags you must set permissions in article manager > parameters > filtering groups to whitelist the super administrator, and then set user manager > select user > user editor to "Editor - No Editor". After doing this, then opening an article, opening the html editor and inserting the iframe like so:
<iframe src="http://thewebsite.tumblr.com/" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
The editor continues to strip out the iframe code. Why would this happen?! I'm sure all of the settings I've mentioned earlier are set according to the tutorials I've come across. Are there any factors I need to take into consideration that I'm missing? Is there another way to insert an iframe into a custom template?
I hope someone can help!!
Inside an Article you are best of using a plugin :
http://extensions.joomla.org/extensions/4144/details
it gives you the ability to insert an iframe by using e.g. {iframe width="90%" height="300" frameborder="1" scrolling="yes"}url{/iframe} also within the TinyMCEeditor.
If you don't need antyhing else inside the article you can use menu item/link. Internal Link - Wrapper
When the Wrapper link is selected, it expands to display the Wrapper layout. This is used to show an external web site inside a page in your web site, using an HTML IFrame. The external web site is contained inside the Wrapper. You can navigate to different pages in the wrapped web site, all inside the page of your web site.
http://docs.joomla.org/Help16:Menus_Menu_Item_Wrapper