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.
auntie_bi0tic
Topic author
Active Member
Active Member
Posts: 1
Joined: 18. November 2017 14:19

First time user of Portal need advice on code

Post by auntie_bi0tic » 18. November 2017 14:28

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
Portal Professional
Portal Professional
Posts: 1435
Joined: 27. July 2010 18:02
phpBB.de User: Kirk

Re: First time user of Portal need advice on code

Post by Kirk » 18. November 2017 16:11

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

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