Iframes were found on your page. Insert iFrame into Joomla stuff. How to open documents from a link in a frame

An example of use could be: inserting a youtube video into an article, or contacts. They all use iFrame.

How to insert an iFrame into a joomla article?

But first about the root of this problem:

Similar unauthorized editing html codebut it happens in joomla because of the newfangled ACL (access lists) or access lists. These are lists of user groups, where each has a list of permissions. Permission to read, write, edit, etc. In general, in these access lists, everyone, I repeat again, ALL, even you, the administrator of your site, have HTML filtering enabled!

Black list allows you to use any tags and attributes, except those that are included. By default, the blacklist contains the following tags: applet, body, bgsound, base, basefont, embed, frame, frameset, head, html, id, iframe, ilayer, layer, link, meta, name, object, script, style, title, xml.

By default, the blacklist contains the following attributes: action, background, codebase, dynsrc, lowsrc.

You can block any other tags by adding them to the Tag Filter and Attribute Filter fields, separating them with spaces or commas.

Whitelisting only allows tags that are listed in the "Tag Filter" and " Attribute filter».

If the value is "Disable HTML" at the time of saving the material, all HTML tags will be removed from it. Note that the filters listed here work independently of the visual editor. Even if filtering is disabled in the settings of the visual editor, the system's own filters will modify the information before saving it to the database.

Fix for joomla 1.6

  1. Go to the joomla admin panel
  2. Click on Content then Article manager and look for Options among the bunch of buttons on the right
  3. Opening the Text Filters tab
  4. Opposite SuperUsers and select No Filtering
  5. Don't forget to save!

Fix for joomla 2.5

  1. We go to the administrative panel
  2. Click on Site then on General Settings and look for the Text Filters tab
  3. Open the Text Filters tab
  4. Opposite Administrator and select "No Filtering"
  5. We are saved!

There are a couple more steps for those who use the standard Joomla editor TinyMCE.

To prevent TinyMCE from deleting the ill-fated iframe when embed video from youtube or the map needs additional settings:

Go to the plugin settings of the visual editor: Extensions - Plugin manager - Editor - TinyMCE - Basic parameters - Forbidden tags - Remove « iframe"- Save it.

Hello everyone. There is one interesting tag in html, with which you can insert another on your web page, and it will look as if it is sewn into yours. This is an article on how to insert into html iframe with an example.

Iframe features

So with this paired tag You can insert a page into your article from any website on the Internet. Let's look at this piece of code:

As you can see, all the insert parameters are set in the tag attributes. I don't think you need to explain anything about the first two - these are the width and height of our frame, in which the required page will be located. The dimensions should be selected based on the width of your content block.

The address desired page set in the src attribute. In it you need to write the full address to the site. The next attribute is the name of the frame. You can write an arbitrary value here. Finally, scrolling is responsible for the appearance of scrollbars, and its auto value makes it so that scrolling appears only when needed. You can also set the value here to no. In this case, the scrollbars will not appear, but then it will not be possible to scroll the page - you can only view its fragment, for how long the specified height is enough.

The rest of the parameters, if necessary, you can set through css. For example, it can be padding or a border.

Example of embedding iframe in html

In the example code that I gave above, you only need to change the page address to your own, as well as the frame size, if necessary. Here's an example:

Now this article has a web service in which you can select colors by moving the cursor around the screen, and when you click, they are saved. I use this helpful site a lot when experimenting with creating beautiful menus, buttons and forms.

This is how you can simply insert another site into your page. Perhaps, in this regard, you will have many of your own ideas for inserting an iframe to yourself. The main thing is that now you know how to do it.

Tag where src is an attribute that specifies the location of the document or website.

I draw your attention to the fact that some sites, such as search engines, block the possibility of placing the site page in frames, or carry out a timer transition to their "real" page.

Browser support

Tag
Opera

IExplorer

Edge

href \u003d "https://tinypng.com" target \u003d "myframe"\u003e TinyPng href \u003d "moscow.jpg" target \u003d "myframe"\u003e Moscow href \u003d "paris.jpg" target \u003d "myframe"\u003e Paris href \u003d "london.jpg" target \u003d "myframe"\u003e London

In this example, we:

  • Element

    In this example, the element

    The optional attributes of this tag are width \u003d "width" and height \u003d "height", and the required attribute is src \u003d "frame address".

    Tag attributes and properties

    1. Attribute COLS \u003d "Parameters"
    Specifies the number of vertical page breaks.

    2. Attribute ROWS \u003d "Parameters"
    Specifies the number of horizontal page breaks.

    Now let's look at how you can set the parameters of the split.

    a) Using the number, which will correspond to the number of pixels. For example, cols \u003d "100,100,300" splits the page into three areas, each of which will be in width: 100 pixels, 100 pixels, and 300 pixels, respectively.

    b) With interest from the total width / height. In the examples discussed above, we used exactly the percentage splitting, so it seems pointless to give an example.

    c) With * (asterisk). For example, cols \u003d "2 *, 3 *, 100" sets the first two regions to a 2: 3 ratio and the third region to be 100 pixels wide.

    All three methods can be combined. For example, cols \u003d "2 *, 100.15%, 4 *".

    3. Attribute frameborder \u003d "(yes | no)"
    Determines whether a frame has a border. If the answer is yes, then the next fourth border attribute is in effect.

    4. Attribute border \u003d "parameter"
    In pixels, border specifies the thickness of the stroke for the frame area. For example, frameborder \u003d "2" defines an area with a 2-pixel outline.

    5. Attribute bordercolor \u003d "color"
    Determines the color of the border, if any. The color can be set both by words and by code (see html color palette).

    Note: Please note that the tag need a closing tag .

    Tag attributes and properties

    1. Attribute src \u003d "item address"
    The full URL to the element address must be specified here as a parameter. This attribute is required. He is already familiar to you, tk. he was present in examples 1 and 2.

    2. Attribute marginwidth \u003d "number"
    Specifies the padding within the frame from the borders in pixels in width. For example, marginwidth \u003d "10" will set the content margin to the left and right of the frame border.

    3. Attribute marginhight \u003d "number"
    It is similar to the second one with the only difference that it sets the offset in height.

    4. Attribute scrolling \u003d "(yes | no | auto)"
    Specifies the ability to scroll the frame if it could not fit into the frame of the area allocated to it. The default is auto (which means to create a scroll if necessary).

    5. The noresize attribute
    If this attribute is set, then the user is prohibited from changing the frame boundaries on his own. By default, this attribute is not set and the user can change the boundaries as he wants.

    5. Attribute name \u003d "title"
    With this attribute, you can give the frame a name. This is necessary so that other frames can access this frame. Example # 2 is just such a case.

    Note:
    The name must not start with an underscore "_".

    6. Attributes frameborder, border and bordercolor
    These three attributes are the same as for frameset (see frameset attributes above).

    Advantages and disadvantages of frames

    Pros of frames

    • The ability to display several pages independently in one window (example 1 and 2 above);
    • The ability to switch page content without reloading the page (only one area of \u200b\u200bthe screen changes);
    • The ability to flexibly build a site structure (header, menu, footer, etc. - all static information is stored separately in files, and this allows you to quickly edit part of the site);
    • The user can change the size of the viewport himself if the noresize option is not set;

    Cons of frames

    • Search engines poorly index sites on frames, because they are unable to interpret the loaded files in frames. The search engine distinguishes pages by their address (URL), while frames, despite different states, do not change the page address. This is contrary to the rules of the search engine, which means that it is not a fact that the search engine will be able to index the site.
    • It is impossible to bookmark a site on frames, because Page url will be the same. Thus, one can only save the initial state frame.
    • Not all browsers support frames.

    The future of frames:
    Many webmasters have long been abandoning frames. This is due to the difficulties of promotion in search engines. Now everyone is switching to Ajax as a more dynamic and modern way of displaying information on one page of the site.

    Dear reader, we have reviewed tags html document regarding frames. Despite the dubious future of this direction, every webmaster should know about frames.

    One of the most common ways to infect a site visitor's computer is to exploit a vulnerability related to a user's browser buffer overflow. The recipe is simple enough. Attackers inject malicious code by inserting an iframe into website pages and try to download malicious files to the computer of an unsuspecting user. It is quite easy to detect such malicious inserts on your websites. One has only to pay attention to the code snippets that use the iframe connection. Such inserts can be in both HTML and PHP files.

    Attackers almost always try to hide the use of malicious bids from the owners as much as possible, hiding them visually for resource users and obfuscating (obfuscating) their code.

    Hiding iframe inserts from users' eyes

    To disguise a malicious insert, hackers in most cases use the same method over and over again - they set the properties of the tag so that it is not displayed on the page, but is contained in its code. Most often, zero or one-pixel width and length are set: width \u003d "1px", height \u003d "1px".

    For example, malicious code might look like this:

    However, hackers often do not limit themselves to such disguises, supplementing the concealment with more sophisticated techniques that can confuse and complicate search and elimination even for advanced programmers.

    Obfuscation

    This is one of the most common ways to protect code in programming in unstructured languages \u200b\u200b(such as, for example, PHP). In fact, all encryption consists in the very confusion / obfuscation of the code by changing the names of variables and other elements. As a result, it is quite difficult to recognize signs of malware in obfuscated code and is possible only by indirect signs of using explicitly special JS (JavaScript) functions used just for obfuscation: unescape, fromCharCode.

    However, the detection of obfuscated code on the site does not mean that it is unambiguously harmful or easy to eliminate. You need to understand that, firstly, attackers could obfuscate the code by capturing part of the site's working code. In this case, when you try to cut out the encrypted fragment, you risk collapsing your resource. Secondly, the obfuscated code may not be malicious, but only a consequence of the operation of your CMS or its individual components, as well as additional modules installed by you.

    In any case, if you come across suspicious obfuscated code, you need to act with the utmost care.

    Other signs of infection

    If you doubt whether the code you found is malicious, then you can try to analyze indirect signs. If you have a large number of files on your site, you can pay attention to the date and time last change files. If you are well aware of the scenarios for working with your CMS files, you can take a closer look at the files changed on the same date at the same time, or with changes occurring at the same time interval, for example, 1 second.

    In case you are an advanced programmer, you can write a script that checks for the presence of the type of insertions you have detected on all files on your site. If you are even more advanced, you can force the script to cut the inserts, however, you should always be careful.

    Alternative methods

    We recommend that you use the Virusdai service to remove malicious inserts, even if you are an advanced specialist. Our service not only contains many signatures by which it finds malicious codesbut also saves time! Plus, the cost of using Virusday for cleaning is likely to be much lower than paying for your own working hours. You will be able to detect and remove not only iframe inserts, but many other threats as well. You can probably find and automatically remove the threat that caused iframe inserts on your site, such as Shell.

    Virusday service team.