Content Warning. - SOLVED

Working on a new template and need help? Come here for support.

Moderator: Help Desk Team

Content Warning. - SOLVED

Postby setomage » August 3rd, 2019, 6:21 pm

I'm trying to figure out the custom warning message system, but can't seem to get it to work the way I want it.

I know the defalt system is :
Code: Select all
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>
   
<script language="JavaScript">
if (confirm("Warning: This comic contains mature content not suitable for minors. Please only continue if you are a legal adult where you live.")) {
   
   window.location = "http://www.randomscribbles.ca/mature.php?ref=http%3A%2F%2Fwww.randomscribbles.ca%2F";
   
} else {
   
   window.location = "http://www.smackjeeves.com";
   
}   
</script></body></html>


For the mot part I don't mind the way the default message is done, but I would like to change the message its self. But I can't seem to wrap my head around what's needed.
Last edited by setomage on August 4th, 2019, 10:33 am, edited 1 time in total.
User avatar
setomage
 
Posts: 4
Joined: March 2nd, 2019, 3:57 pm

Re: Content Warning.

Postby eishiya » August 3rd, 2019, 7:51 pm

I don't think you can replace the default pop-up message. If you want anything custom, you'll need to use the Custom Mature Warning options in the comic management page, where you can create a fully custom warning page. You could still do it as a pop-up with that if you want to by copy+pasting the code you provided above (but replace the URLs with the appropriate template variables to ensure forward compatibility), but you might as well make one that looks nicer, since it'll be the entry point for many potential readers.
Image
User avatar
eishiya
 
Posts: 9766
Joined: December 5th, 2009, 11:17 am

Re: Content Warning.

Postby setomage » August 4th, 2019, 10:14 am

I tried to copy the code & pasted the code, but it doesn't work. More so, since the java script the code uses isn't there.

Not sure what to do for a HTML one, since I'm not the most savvy a HTML
User avatar
setomage
 
Posts: 4
Joined: March 2nd, 2019, 3:57 pm

Re: Content Warning.

Postby eishiya » August 4th, 2019, 10:18 am

You can copy+paste the entire thing, including the JavaScript. There is no external JavaScript or anything, this is all there is. Just a simple confirm box.

Code: Select all
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>
   
<script language="JavaScript">
if (confirm("Warning: This comic contains mature content not suitable for minors. Please only continue if you are a legal adult where you live.")) {
   
   window.location = "{ACCEPT_URL}";
   
} else {
   
   window.location = "{REJECT_URL}";
   
}
</script></body></html>


If you use this code, make sure "Enable Custom Template" is set to Yes, and that "Use Overall Layout?" is unchecked.
Image
User avatar
eishiya
 
Posts: 9766
Joined: December 5th, 2009, 11:17 am

Re: Content Warning. - SOLVED

Postby setomage » August 4th, 2019, 10:34 am

You rock eishiya!

Thanks for the help
User avatar
setomage
 
Posts: 4
Joined: March 2nd, 2019, 3:57 pm

Re: Content Warning. - SOLVED

Postby eishiya » August 4th, 2019, 10:39 am

No problem!

Did you figure out why it didn't work before?
Image
User avatar
eishiya
 
Posts: 9766
Joined: December 5th, 2009, 11:17 am

Re: Content Warning. - SOLVED

Postby setomage » August 4th, 2019, 4:37 pm

eishiya wrote:No problem!

Did you figure out why it didn't work before?


Yes. ("Use Overall Layout?" is unchecked) I had it checked when I was trying to us it. Unchecking it got it to work.
User avatar
setomage
 
Posts: 4
Joined: March 2nd, 2019, 3:57 pm


Return to Template Development & Support

Who is online

Users browsing this forum: No registered users and 3 guests