Open a link in a frame/lightbox - iframe

im using wordpress and want to add a link which open in a frame/lightbox. Cant find a small solution for that.
There should be no new window. Just a content box which appear inside the page where i am. I hope u know what i mean

That should be pretty easy using the Easy Fancybox plugin.
Citing the entry from the FAQ section of the plugin's page:
Can I display web pages or HTML files in a FancyBox overlay?
Yes. First, enable the iFrame option on Settings > Media. Then, in your post or page content create a link to any web page or .htm(l) file in your content. Then switch to the Text tab in the Classic Editor or to Edit as HTML (under More options in the block menu) in Gutenberg, find the link <a ... > tag and give it a class="fancybox-iframe" attribute.
Voilà !
Beware, though, that:
Note: Not all external web pages are allowed to be embedded in an iframe and may be blocked by a server response header or script. The result will be either an empty/blank light box or the target page “breaking out” of the light box and loading in the main browser tab.
And you'd probably face the same problem with any other iframe solution. So that would work better with locally served pages.

Related

Absolute external links bug, url of the current page added at the beginning of the url

I have a very strange external links behavior on this page:
https://dev.switchonpaper.site/en/daniel-g-andujar-the-artist-as-a-thinker-and-augur-of-what-happens/
There is a list of external links visible by clicking on "Go Deeper".
On some links, the address of the current page is added at the beginning of the external link.
E.g.: iSAM™ (1997)
E.g.: TTTP Photo Collection - 1997
All external links are absolute links.
When you look at the source code, the links are correct.
This site runs under Wordpress, the links are contained in a Gutenberg block built with the ACF plugin.
I tested the following things:
Disable all plugins.
The browser or something else continues to add the current page address on some links only.
I emptied the server cache, removed all the .htaccess rules except the wordpress part.
I made sure that the PHP file that writes these links is in UTF-8.
By recreating the links, it is always the same ones who are affected.
Does anyone have any idea what could cause this?
Thank you for your time and help!
You have the so called "hidden characters" before your link start. I suggest you to check it by yourself with some online tool like this: https://www.soscisurvey.de/tools/view-chars.php. If you try to paste there the link copied by your source code you will see you have hidden stuff before "https:..."
The solution to this issue is that you delete all the characters and you write them all over again by yourself, w/o copy/pasting them from another source or in alternative paste them inside some non-HTML text editor before pasting them to your website

ckeditor add <iframe> tag in editor

I am using ckeditor in a drupal 7 site. I want to put iframe tag inside the editor.
Currently what happen when we put iframe in ckeditor.
<iframe src="http://www.lipsum.com/"></iframe>
It convert that iframe tag with a img tag with some special attribute and URL.
<img class="cke_iframe" data-cke-realelement="%3Ciframe%20src%3D%22http%3A%2F%2Fwww.lipsum.com%2F%22%20class%3D%22placeholder-tool%20helpTool-placeholder%22%20scrolling%3D%22no%22%20frameborder%3D%220%22%3E%3C%2Fiframe%3E" data-cke-real-node-type="1" alt="IFrame" title="IFrame" align="" src="http://testsite.com/sites/all/libraries/ckeditor/images/spacer.gif?t=C9A85WF" data-cke-real-element-type="iframe" data-cke-resizable="true">
Which I do not want. I want to make the ckeditor to print exact iframe tag there not the img tag like this.
<iframe src="http://www.lipsum.com/"></iframe>
So that If I want to perform a task in iframe so I can do that inside the editor.
Thank you in advance
Addition 2:
I need the iframe should work in editor itself. It should not convert iframe to img on node add or edit page also.
It should like this
Not like this
Finally, I have to make one line change in ckeditor.js at line number 8194:
return m.createFakeParserElement(p, 'cke_iframe', 'iframe', true);
To
return p;
So it is not creating FakeParser for iframe. And when I put a iframe in edit mode so I see the iframe exactly not the image in place of that.
It is a little hack I used for this functionality.
Thank you Darko for help on this.
Problem solution:
In current newest release of CKEditor (4.5.8) there is a minified file ckeditor.js. In order to have iframe enabled in edit mode you will have to change next line in that file:
return a.createFakeParserElement(b,"cke_iframe","iframe",!0)
into:
return (b)
Due to security reasons that option is by default disabled and this is the way how you can override it.
That is solution for this particular problem. Below are some of possible problem solutions if you have problems with iframe in CKEditor in drupal 7.
Addition:
Go on:
admin/config/content/formats/filtered_html (assuming you use that text format) and add <iframe> in Filter settings (in Allowed HTML tags).
When you post iframe in ckeditor now make sure you don't post it inside any other tag.
ex.:
<p some text <iframe src="http://www.lipsum.com/"></iframe> <br> </p>
that will not work.
<p>some text </p> <iframe src="http://www.lipsum.com/"></iframe>
that will work
Best way is to go on "source" mode in ckeditor and insert iframe there on place you want.
Addition 2:
From your comments i assume you trying all this on online ckeditor? You can't see final result there (node page view) because there is showed only edit view (which is temporary).
Ckeditor converts all your content based on settings (not just basic settings in texts format). For instance ckeditor converts some HTML reserved characters in they entity names or entity numbers because ckeditor itself using HTML to show you preview in edit mode.
ex:
<iframe src="http://www.lipsum.com/"></iframe>
is converted in:
<p><iframe src="http://www.lipsum.com/"></iframe></p>
You can see there that "<" is converted in "<" and ">" is converted in >. Browser need "< >" in source to properly load iframe. So solution is to using "source" option in ckeditor.
So i will repeat once more. Enter text, pictures and all content you need in ckeditor edit mode. When you want to add iframe you go on source mode and put it in content (in that way ckeditor will not convert HTML reserved characters, or maybe some else in your url).
Of course you can edit your iframe there and format size, border, scrolling etc...After saving your content you should see iframe properly loaded. In your case:
Addition 3:
Due to security reasons, to prevent users from breaking site layout and/or to avoid posting invalid HTML that possibility is disabled (like iframe working inside editor). If you are so determent to achieve that you can always go with old modules because in new ones that doesn't work.
In new library there is an option you can try:
admin/config/content/ckeditor
There you can edit Full profile and under ADVANCED CONTENT FILTER you can try disable Advanced content filter. Flush the cache after that. If that not working go with old modules.
Go disable module ckeditor
Install wysiwyg
Install old ckeditor library (just copy old library in /sites/all/libraries )
You need CKEditor 3.3.1 and older
Go on admin/config/content/wysiwyg and select that library
When you do this you should considering all the risks. Hope this post will be helpful for someone else too. Cheers.

Where should page hierarchies be rooted in Confluence?

I've recently started getting familiar with Atlassian Confluence (v. 3.3), but I'm having trouble understanding the best way to use page hierarchies within a space.
Within a space, pages can be located underneath the "Home" page, or one level higher, next to the home page. However, in the "Documentation" theme, the left sidebar page hierarchy is only shown for pages rooted below "Home". This means that the "Home" breadcrumb is always displayed when viewing pages that appear in the sidebar hierarchy.
So, what is the purpose of having pages on this top level? Should it be used specifically to hide pages from the sidebar hierarchy (like meta)?
Is it possible to have the sidebar hierarchy display for pages rooted next to Home (on this top level), instead of below it?
Is it possible to remove the Home breadcrumb?
How many of these questions are made irrelevant by later updates to the software?
The only real purpose I can think of for having a page on the same level as the home page would be to disclude it from a page-tree display starting at the home page. So if you have some pages you use for holding images, documents, testing content, et cetera then you would not want it to show up in the hierarchy viewed by regular users.
When you define a page-tree macro, or the children-display or anything similar, you can specify which page it is displaying the hierarchy from. If you want to use a page other than the home page, just specify it in the page-tree macro.
I don't believe it is possible to remove the breadcrumb, or at least I don't know how.
Software updates will maybe bring some other page-tree-esque options but won't fundamentally change anything else we're talking about here.
So, what is the purpose of having pages on this top level?
Specifically? You'd have to ask Atlassian.
Generally? The default configuration is that only pages from the specified Home page down are shown in the navbar.
Should it be used specifically to hide pages from the sidebar hierarchy (like meta)?
Yes. Any page which is used for navigation, control or configuration is stored at the top of the hierarchy. That way they don't show up in the navbar.
Using the {alias} macro will create a page in the top hierarchy.
If you use a page as input to your navbar then this page can be stored here out of user sight but still publically visible. So, if you had a page with lots of markup for a colourful and exciting navbar named SpaceNavigation then in the Documentation Theme Configuration you would have this code:
{include:SpaceNavigation|nopanel=true}
Is it possible to have the sidebar hierarchy display for pages rooted next to Home (on this top level), instead of below it?
Yes. Use the pagetree macro.
{pagetree:root=#none}
You can edit the space theme to show anything in the left navigation bar.
Browse > Space Admin > Theme > Configure theme
Untick the 'Page Tree' option at the top. Put your code to display content in the navbar in the navigation box.
If you want a pagetree somewhere in your custom navigation use the {pagetree} macro. You can set the root page to a page lower in the hierarchy. {pagetree:root=apple}
The {children} macro is also useful here.
The reporting macros can print a list of all pages in a space. You can build your own macro or import a wiki page to display as the navbar.
Is it possible to remove the Home breadcrumb?
This may need clarification. Are you looking to remove the breadcumbs or just the word 'home'.
Either way, the answer is 'JavaScript or CSS'.
If you are a space administrator you can add CSS styles to the space to disable CSS for the space from the header.
If you have the {html} macro or {style} then you can add styles and JavaScript to the wiki page.
If you are a wiki administrator, or have one on your side, then you can create a macro or plugin to put CSS or JavaScript code on the page.
Here is a code sample to find two classes on a page and after the page has loaded (document.ready) hide them.
{html}
<script type="text/javascript">
AJS.$(document).ready(function() {
AJS.$(".first").hide();
AJS.$(".second").hide();
});
</script>
{html}
This example will remove the word 'Dashboard' as it has the class of 'first'.
Go forth and write the code to find the objects that so draw your ire and vanquish them.
CSS is also an option and sometimes less messy.
Some CSS objects can be removed from the page from within the page. E.g:
{html}
<style type="text/css">
ol.breadcrumbs { visibility:none; !important; }
</style>
{html}
However, to remove objects at the top of the page you need to use javascript or put CSS in the space style sheet.
Browse > Space Admin > Stylesheet
How many of these questions are made irrelevant by later updates to the software?
It's pretty much the same. Some styles have changed. Some things have been moved around. The general look has changed.
Some of the style sheets have changed and they have said that they are looking to deprecate the Documentation Theme. However, given the community support for the Documentation Theme even if they remove it no doubt it will be available as a downloadable theme in V6.
If you are interested in looking at this yourself then you can download Confluence V5 with a trial licence or try their OnDemand free for one month.

Django CMS Deleting HTML5 Tags and Attributes

I am having a big time issue with solving a problem. I have a placeholder called main for the content region of the page. I was building that region in the cms. Everything was going great until I attempted to add an embedded video contained in an iframe. When I save django cms completely removed the iframe and left an empty div. So I attempted to use prettyphoto light box to open the video by clicking on an image. The code I added to the page through the cms is:
<a rel='prettyPhoto[youtube]' href="https://www.youtube.com/embed/mqVZF_yb8C0?autoplay=1&start=1765&iframe=true" data-rel="prettyPhoto">Click Image</a>
When I saved, django cms completely removed the data-rel attribute from the link which is obviously needed for the js. So I went a step further and adapted the code of the data attribute to:
rel="prettyPhoto"
and the cms also removed that attribute! Also anytime I add an html5 tag like article of section it hates that too! What gives here? Am I doing something wrong? Any advice would be appreciated. 
Aaron,
Thanks.
Please see the discussion at https://github.com/divio/django-cms/issues/1529. We use html5lib to clean the contents of the text plugin (this cannot be turned off for security reasons).
What you'll want to do is write a custom plugin (possibly one that can be embedded inside text plugins).

CSS for sharepoint site settings

I've got a master page that loads in a custom css file. This works fine for the published pages that the end user sees. however, the css also affects the site settings pages which look terrible. Is there a way to only provide a custom css file for the published pages?
Cheers #Neps. There was a different master page for system, but I found out I was using the alternate CSS which was applying the style sheet to both. so I removed that and put the link code directly into the master page.

Resources