include html code in widget

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
lantaca
Posts: 25
Joined: Thu May 23, 2024 9:02 pm

include html code in widget

Post by lantaca » Tue Aug 25, 2026 9:41 am

Hi all
i would like to include a little banner in my blog
i have created a widget and i have copy the code

Code: Select all

<script>!function(d,l,e,s,c){e=d.createElement("script");e.src="//ad.altervista.org/js.ad/size=300X250/?ref="+encodeURIComponent(l.hostname+l.pathname)+"&r="+Date.now();s=d.scripts;c=d.currentScript||s[s.length-1];c.parentNode.insertBefore(e,c)}(document,location)</script>
i cat viwe noting.
i try to add [html] [/html] but nothing is canged

what i have to do?

User avatar
fraenkiman
FlatPress Coder
Posts: 536
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: include html code in widget

Post by fraenkiman » Tue Aug 25, 2026 6:56 pm

Hi lantaca,

There are many possible causes.

The JavaScript looks error-free so far.

In the admin area -> Plugins -> BBCode, the option “Use HTML with BBCode” must be enabled.

In the editor, you need to wrap it in the BBCode HTML tag.

Code: Select all

[html]<script>!function(d,l,e,s,c){e=d.createElement("script");e.src="//ad.altervista.org/js.ad/size=300X250/?ref="+encodeURIComponent(l.hostname+l.pathname)+"&r="+Date.now();s=d.scripts;c=d.currentScript||s[s.length-1];c.parentNode.insertBefore(e,c)}(document,location)</script>[/html]
If the JavaScript is supposed to load content from “external sources”, you’ll need to enable “Allow unsafe JavaScript” and “Allow embedding of external content via iFrame” in the admin area -> Configuration -> FlatPress Protect.

Then the ad banner should work.

If the ad banner still isn’t displaying, disable DNS filters (e.g., PiHole, AdGuard) and browser extensions such as uBlock.

Best regards,
Frank

lantaca
Posts: 25
Joined: Thu May 23, 2024 9:02 pm

Re: include html code in widget

Post by lantaca » Tue Aug 25, 2026 8:27 pm

hi, thanks for the support

in my admin area, there is no "Allow embedding of external content via iFrame”" option...

i use FlatPress version 1.4.dev. today i have try to update to 1.5.1 version but disaster... :-) nothing work

User avatar
fraenkiman
FlatPress Coder
Posts: 536
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: include html code in widget

Post by fraenkiman » Tue Aug 25, 2026 9:55 pm

Yes, the “Allow embedding of external content via iFrame” feature has only been available since January 2026 / PR #775 -> FlatPress 1.5.

Try the 1.3 to 1.5.1 update package.

I changed the authentication method between the 1.3.1 and 1.4 releases. You might run into this issue with 1.4.dev. Here are the instructions that might help you upgrade to 1.5.1.

lantaca
Posts: 25
Joined: Thu May 23, 2024 9:02 pm

Re: include html code in widget

Post by lantaca » Wed Aug 26, 2026 8:16 am

hi, there is someting wrong in my blog or host...

i have tried to upgrade from 1.4, from 1.3, reinstal a fresh version of 1.5.1 but at the and of the file copy or the new installations, there is always that same screen

i use flat press by the first version, but is the first time i have thease prombles that i don't undrestand...

i'll try to clear all my web space and reinstall another time a new fresh 1.5.1 version, without my contents, then we can see the problem
Attachments
Screenshot 2026-08-26 100928.png
Screenshot 2026-08-26 100928.png (47.24 KiB) Viewed 109 times

User avatar
fraenkiman
FlatPress Coder
Posts: 536
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: include html code in widget

Post by fraenkiman » Wed Aug 26, 2026 8:10 pm

That doesn't look like a FlatPress error.
Screenshot 2026-08-26 215840.png
Screenshot 2026-08-26 215840.png (4.47 KiB) Viewed 95 times
ERR_TOO_MANY_REDIRECTS (“This page has been redirected too many times”) means that a webpage is stuck in an infinite loop. Page A redirects to Page B, and Page B redirects back to Page A. The browser aborts the process.

Check your redirect rules in the Customer Center and rename any existing .htaccess file to _htaccess.

Install a fresh 1.5.1 instance after you’ve made a full backup of your existing 1.4.dev instance. If that works, copy the following directories from your 1.4.dev backup:

Code: Select all

fp-content\content\<all>
fp-content\images\<all>
fp-content\attachs\<all>
After testing:

Code: Select all

fp-interface\themes\<your theme>
fp-plugins\<your own plugins>

lantaca
Posts: 25
Joined: Thu May 23, 2024 9:02 pm

Re: include html code in widget

Post by lantaca » Thu Aug 27, 2026 9:08 am

good morning

i have try to install a fresh instance of 1.5.1 but i have some problem
follow here

i think i have problem with https protocol. with "s" i have the rederict problem, witout "s" the blog don't have the "css" style

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest