News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

adding html to a page

Started by xRated, October 18, 2018, 04:04:50 PM

Previous topic - Next topic

xRated

I have installed a few mods to my site now and trying to add some html into the pages but it just wont show.

The code im trying to use is

<!DOCTYPE html>
<head>
   <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
   <title></title>
         <script src="hxxp:static.chatwee-api.com/v2/script.js [nonactive]"></script>
      <script>

         document.addEventListener("DOMContentLoaded", function(event) {
            var chatId = "5bc0cf9dbd616deb1dc8b7c4";
            var chatweeManager = new ChatweeLib.ChatweeManager(chatId);
            chatweeManager.SetChatProperty("desktopDisplayMode", "embedded");
            chatweeManager.SetChatProperty("embeddedModeSizing", "auto");
            chatweeManager.SetChatProperty("embeddedModeContainerSelector", "#chatwee-widget");
            hxxp:chatweemanager.run [nonactive]();
         });

      </script>
   
   <style>

      body, html {
        height: 100%;
      }

      #right {
        height: 100%;
      }

   </style>

</head>
<body style="width: 100%; height: 100%; padding: 0px; margin: 0px;">
   <div id="chatwee-widget" style="width: 100%; height: 100%;">

   </div>
</body>

is this possible to add?

Im currenntly using the most updated version of smf

Kindred

not like that it's not possible...

and it's not a bug either.

You can;t add a full html page in the middle of an existing html page.

Please you don't indicate HOW or WHERE you are trying to add that code.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

xRated


SychO

He is speaking English though,

How and where are you trying to add the code ?
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Kindred

That was English.

You can not add that code.
that code is a stand alone HTML page.
there is no system in the world where you can add that code as you list within an existing page - and definitely not SMF.

Code (above the </head> of index.template.php) Select

<script src="https://static.chatwee-api.com/v2/script.js"></script>
<script>

document.addEventListener("DOMContentLoaded", function(event) {
var chatId = "5bc0cf9dbd616deb1dc8b7c4";
var chatweeManager = new ChatweeLib.ChatweeManager(chatId);
chatweeManager.SetChatProperty("desktopDisplayMode", "embedded");
chatweeManager.SetChatProperty("embeddedModeSizing", "auto");
chatweeManager.SetChatProperty("embeddedModeContainerSelector", "#chatwee-widget");
chatweeManager.Run();
});

</script>


and
Code (above the </body> in index.template.php) Select

<div id="chatwee-widget" style="width: 100%; height: 100%;">

</div>



Howeverm you can;'t just randomly add the code either, since you have to include it in an echo statement

Also, I might add "the most updated" is not an actual version and is possibly wrong.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

xRated

Why does it matter where i want to put it? all i wanted to know is if it could be done and clearly it doesen't work so why are you asking stupid questions?

Steve

Insulting team members will not endear you to them when you need help in the future. He asked so that maybe he could suggest a different way.
DO NOT pm me for support!

xRated

smf is probably the worst forum coding anyway. Hopefully I can convert to a better one. Support is trash and so are the mods to be honest

Kindred

lol...   OK...

even though I did tell you exactly where to put it
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

We can't help you if you won't help us do so.

You've been given a warning for your insulting posts. Further posts will need to be approved by a moderator.
DO NOT pm me for support!

SychO

The reason we asked you where and how, is because you said you tried and it didn't work, so by telling us what you did exactly we can easily help you out and point you to the right direction, there's no need to get worked up.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Chen Zhen


Use a portal (ie. Simple Portal) page but only include the javascript and then the div container.
You can add the css in the portal page settings.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Shambles

Quote from: xRated
smf is probably the worst forum coding anyway ... Support is trash and so are the mods ...

What enticed you to choose SMF in the first place?

vii

Quote from: xRated on October 18, 2018, 04:18:23 PM
English please

Basically, you were being asked what you were trying to do, because the code you pasted is a FULL WEB PAGE and not something you can just insert anywhere into an existing page. It would be a lot easier to help you if everyone knew what you expected that code to do.

Had you explained what you were trying to do instead of being needlessly hostile, you probably could have walked away from here with whatever you were trying to do in full working order. Increasingly unlikely to see that at this point. I wonder if you treat people trying to help you like this IRL. Probably not.

Arantor

I'm faintly curious to see what happens if someone tries to just jam this script into any of the other forum platforms. I guess they must all have trash coding.

Aleksi "Lex" Kilpinen

Quote from: xRated on October 18, 2018, 04:30:18 PM
Why does it matter where i want to put it? all i wanted to know is if it could be done and clearly it doesen't work so why are you asking stupid questions?

It matters, because knowing what you are trying to achieve exactly, and where you want your code to be visible in action, would help us tell you how to modify the code to make it work how you wanted within SMF.
You got your answer, but we wanted to try and help you further.
Clearly a mistake on our part, and if you continue like this, I'm sure it won't happen again.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: