First time user of Portal need advice on code

Current Version: 2.1.0
Released: 2015-10-26
Forum rules
Before creating a new support thread, please take a look at the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked

Topic author
auntie_bi0tic
Active Member
Posts: 1
Joined: 18. November 2017 13:19

First time user of Portal need advice on code

Post by auntie_bi0tic »

I have just started to set up my site and am so pleased to find your portal appears to work!
My question is with code.
I have tried to place the code for google translate in a custom module but nothing shows up.
The code is

Code: Select all

[b]<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>[/b]
I have tried clicking both options in module

Activate BBCode for the custom block
BBCode could be used in this box. If BBCode is not activated, HTML will be parsed.

But code does not appear.
Any advice please. this is important to me as I would like to use code in my site
Thx in advance
User avatar

Kirk
Dev
Posts: 1956
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: First time user of Portal need advice on code

Post by Kirk »

Hi
I just tried it, it works.
Try it like this:

Code: Select all

<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
This one

Code: Select all

[b][/b]
is BBCode not html.
BBCode must be disabled.
Gruß Udo
Locked

Return to “Board3 Portal 2.1.x - English Support”