own custom block with javascript

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
Harledir
Active Member
Posts: 3
Joined: 13. January 2015 14:26

own custom block with javascript

Post by Harledir »

Your Portal Version: 2.1.0-RC1
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://legion-of-lost-souls.eu

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
hi all,

i am trying to get 2 custom blocks to work within the portal. Both of these have a javascript for the actual content. The javascript pulls the information off a remote site (to show server status and teamspeak3 server).

Both blocks are showing up fine on the portal. The javascript is not being excuted or shown. If i add a <p>Hello World!</p> to the content it is being shown fine.

Server status block:

Code: Select all

{$LR_BLOCK_H_L}LotRO Server Status{$LR_BLOCK_H_R}
             <div style="text-align: center;">

<p>Hello World!</p>
<script type="text/javascript" src="http://lux-hdro.de/serverstatus-widget.php?snowbourn=1"></script>

 </div>
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
teamspeak server block

Code: Select all

{$LR_BLOCK_H_L}Teamspeak3 Server{$LR_BLOCK_H_R}
             <div style="text-align: center;">

<p>Hello World!</p>
<div id="ts3viewer_1057264" style="width:; background-color:;"> </div>

<script type="text/javascript" src="http://static.tsviewer.com/short_expire/js/ts3viewer_loader.js"></script>

<script type="text/javascript">
<!--
var ts3v_url_1 = "http://www.tsviewer.com/ts3viewer.php?ID=1057264&text=000000&text_size=12&text_family=1&js=1&text_s_weight=bold&text_s_style=normal&text_s_variant=normal&text_s_decoration=none&text_s_color_h=525284&text_s_weight_h=bold&text_s_style_h=normal&text_s_variant_h=normal&text_s_decoration_h=underline&text_i_weight=normal&text_i_style=normal&text_i_variant=normal&text_i_decoration=none&text_i_color_h=525284&text_i_weight_h=normal&text_i_style_h=normal&text_i_variant_h=normal&text_i_decoration_h=underline&text_c_weight=normal&text_c_style=normal&text_c_variant=normal&text_c_decoration=none&text_c_color_h=525284&text_c_weight_h=normal&text_c_style_h=normal&text_c_variant_h=normal&text_c_decoration_h=underline&text_u_weight=bold&text_u_style=normal&text_u_variant=normal&text_u_decoration=none&text_u_color_h=525284&text_u_weight_h=bold&text_u_style_h=normal&text_u_variant_h=normal&text_u_decoration_h=none";
ts3v_display.init(ts3v_url_1, 1057264, 100);
-->
</script>

 </div>
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}

i tried using the builtin custom block/module function from the ACP and copy&pasted the javascript into the content part with the same result - it does not work.

Any idea how this should be done? Thanks for any help![/i]

Topic author
Harledir
Active Member
Posts: 3
Joined: 13. January 2015 14:26

Re: own custom block with javascript

Post by Harledir »

i have no idea why, but this morning the blocks are showing the excuted javascript.

(i did delete cache etc...) oh well, at least it works. Please close this as resolved.

Topic author
Harledir
Active Member
Posts: 3
Joined: 13. January 2015 14:26

Re: own custom block with javascript

Post by Harledir »

just noticed what happened, but don´t have a solution.

when viewing the site with HTTP everything works (javascript in the blocks is being executed)
when viewing it with HTTPS the blocks stay empty (javascript is not being executed / or the results are not being displayed)

How can i get this to work with HTTPS as well?
User avatar

talonos
Portal Specialist
Posts: 242
Joined: 7. June 2009 15:12
phpBB.com User: talonos

Re: own custom block with javascript

Post by talonos »

in your code try changing

Code: Select all

http://
to

Code: Select all

https://
and see if it still loads on your site with using HTTP:// and if it does then try it on HTTPS://

if its works on http but not https then theres not much you can does as its the source that is at fault for which you have no control of (Teamviewer will proberly have this problem)
Creating board3 website? check the sites out below for board3 compatible extensions
Talonos: Pretereo stormrage EU OFFLINE!
Locked

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