video that plays when page loads using java-module and colorbox, but only ad ADMIN

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
5/20/2014 11:05:35 AM
Gravatar
Total Posts 122

video that plays when page loads using java-module and colorbox, but only ad ADMIN

Hi joe

I was very proud to insert in forum this tip: how you can put a youtube video that plays when page loads using java-module and colorbox

But I got a problem.. it work ONLY if I log as administrator ... then it work great!!, if i do not logon or as a simple user nothing happens !!!

can you help me please ? I've replicated on demo site (page more / java with colorbox and youtube) and gives me the same result

I do use colorbox to do this... may be I have to put something in .config file ? can you tell me what ?

Michele from Rome

<<

Hi to all,
after a lot of search and test, here are how you can put a youtube video that plays when page loads using java-module and colorbox

so you can use it with mojo version 2.4.0.3 or greater

- create javascript-module
- set true on flag 'add script element Around Raw script
- the raw script position should be: 'in the page, at the position....
- put below code in 'raw script content

==============================================

$(document).ready(function(){

$.colorbox({
    iframe      : true,
    innerWidth  : 425,
    innerHeight : 344,
    opacity : 0.3,
    title: "...your title comes here...",
    href        : "http://www.youtube.com/embed/C18aErzSWJw?autoplay=1&rel=0&wmode=transparent"
  });
});

>>

5/20/2014 11:44:57 AM
Gravatar
Total Posts 18444

Re: video that plays when page loads using java-module and colorbox, but only ad ADMIN

Hi,

The main colorbox script is only loaded if there is a known feature on the page that needs it, the feature will enable it by server side code. We use colorbox for the admin file manager link so it is loaded when you are logged in as admin.

If you want to always load colorbox script then in layout.master put IncludeColorBox="true" on the <portal:ScriptLoader 

Hope that helps,

Joe

5/21/2014 5:21:54 AM
Gravatar
Total Posts 122

Re: video that plays when page loads using java-module and colorbox, but only ad ADMIN

Great Joe... it works perfectly on 2 of my 3 subsites

On the third one I've done the same implementation, but still do not work

So I've copied the master.config of working site to the third one (they are identical)... but still does not work

grrrrrr , I do not know what to do.. even becouse the third site is the most important and I have just managed with a horriible pop up window

Have you suggestions ??

best of all

Michele from Rome

5/21/2014 5:32:34 AM
Gravatar
Total Posts 122

Re: video that plays when page loads using java-module and colorbox, but only ad ADMIN

Hi

I,ve noticed that even with a brutal popup (pure javascript, not colorbox) does work BUT only if i'm in as administrator

this is the code

<SCRIPT LANGUAGE="JavaScript">
<!--
function popup()
{
  aa = window.open("http://www.youtube.com/embed/C18aErzSWJw?autoplay=1&rel=0&wmode=transparent","","top=300, left=400, width=560, height=315, status=no, menubar=no, toolbar=no, scrollbars=no");
  finestra.focus();
}
// -->
</SCRIPT>
</HEAD>

<BODY onLoad="popup()">
</BODY>

5/21/2014 8:21:59 AM
Gravatar
Total Posts 18444

Re: video that plays when page loads using java-module and colorbox, but only ad ADMIN

javascript runs in the web browser not on the server so the way to debug it is with web browser dev tools, check for script errors on the page using the console and check for script files that failed to load using network tab in web browser dev tools. even unrelated script errors can break script execution.

5/22/2014 6:34:07 AM
Gravatar
Total Posts 122

Re: video that plays when page loads using java-module and colorbox, but only ad ADMIN

Hi Joe, please forgive me... but i'm lost

situation: In a multisite enviroment (Folder Based Sites) with 4 sites, each has in home page the java-module that displays automatically with colorbox (same code on all sites) a video on entry

problem: works on sites 1, 2, 3 but not on 4

1) www.idisanita.idi.it, 2) www.ospedalesancarlo.idi.it, 3) www.villapoala.idi.it, 4) www.idi.it

bringing the entire skin from site 4 to site 3, loaded on site 3 and tested it... works fine, so it seems not to be a skin problem

if entering on site 4 as administrator, module works fine

Conclusion: site 4 does not "loads" colorbox automatically (even if the master.config is ok... because I tested it on site 2)
Other information:
- tested all 4 sites with IE and Firefox... can't be a browser problem
- can't be a general configuration... it's a multisite and all resources are shared
- site 4 has stadard pages and modules ande features... nothing custom

Can you please help me ? I'm stopped and cannot work out a solution or even a detection ??

Thank you in advance

Michele from Rome

 

You must sign in to post in the forums. This thread is closed to new posts.