How to use html in the Closed Site dialog box

Post

Posted
Rating:
#7614 (In Topic #1919)
If the site is closed, Composr shows a box with text in it. How would I add an image there?

Regular html seems to be filtered out.

I looked for information on but it's not mentioned in the tempcode tutorial, much, not the comcode tutorial. The [img] tag only returns the url of the image.

Image

Screenshot from 2023-08-13 07-53-36.png

Screenshot from 2023-08-13 07-53-36.png

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5
#7615
Comcode (Comcode help – Composr) is the way but if you want to close the site and use a completely custom html page, create a closed.html in the root of your install. You will still be able to access the website by appending ?keep_force_open=1 to the URL.

Post

Posted
Rating:
#7621
I don't think the closed message supports Comcode / whatnot.

If you would like it to, please add a feature request on the tracker: My View - Composr CMS feature tracker . As Adam mentioned, you can also make your own closed page.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by PDStig)
#7623
Comcode works actually, just for the record.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Adam Edington)
#7624

Adam said

Comcode works actually, just for the record.

Noted. I'll investigate why img failed to work.

Post

Posted
Rating:
#7625
Image worked for me (using the example code from the Comcode help page) but perhaps there is an issue with non-local images?

Post

Posted
Rating:
#7751

hello
Composr CMS uses Comcode for content creation, and it's designed to be secure to prevent potential security vulnerabilities. By default, HTML is often restricted to ensure safe content rendering. However, Composr provides various ways to include images in Comcode without directly using HTML.

To add an image within a Composr box or content, you can use the


Post

Posted
Rating:
#7752
forum posts utilize / filter HTML so if you were trying to demonstrate such, you may need to edit your post. It got significantly broken / cut off.

What I do is put spaces in between the tags, e.g. < img > and just tell people to remove the spaces. Sometimes a code block will work too.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Keith Parker)
#7755
Hello,
 

Composr uses Comcode for templating, and embedding images within Comcode can be done using the image Comcode tag. However, if regular HTML is not working as expected, you might need to use Comcode's image tag specifically.

Here's an example of how you can use the image tag in Composr to display an image within a box:


Code

[block param="box"][image="URL_OF_YOUR_IMAGE" caption="Optional Image Caption"][/block]

 

Replace "URL_OF_YOUR_IMAGE" with the actual URL or path to your image.

Alternatively, if you want to use a background image for the box, you can use the background parameter:

Code

[block param="box" background="URL_OF_YOUR_IMAGE" caption="Optional Image Caption"]Your text goes here.[/block]

 

Again, replace "URL_OF_YOUR_IMAGE" with the actual URL or path to your image.

Make sure to adjust the Comcode according to your needs and the specific requirements of the Composr platform you are using.

If you are facing issues, you may want to check the Composr forums or documentation for any platform-specific considerations or restrictions related to embedding images within boxes.


Last edit: by PDStig


Post

Posted
Rating:
#7757
In a Closed Site dialog box, you can use HTML to customize the content and appearance of the dialog box. This can be done by including HTML markup within the dialog box's code. For example, you can use HTML tags like <div>, <p>, <h1>, <h2>, etc., to structure the content and style it using CSS. Additionally, you can include links (<a> tags) or images (<img> tags) to provide more interactive and visually appealing content. However, it's important to note that the specific implementation of HTML in a Closed Site dialog box will depend on the platform or system you are using to create and manage the dialog box.





1 guest and 0 members have recently viewed this.