1
wcrwcr
Debaser - customizing the popup window
  • 2005/5/20 8:28

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi all

I?m trying to customize the dbaser player?s popup window
and found the "templates/dbaser_player.html" where I can edit all the layout features but till now I didn?t find the javascript that controls the window itself.

Where can I edit the "javascript:openWithSelfMain" function in order to set things like scroll bars, resizible window, etc, etc ?

Thank in advance.

2
OBecanoby
Re: Debaser - customizing the popup window
  • 2005/5/20 23:15

  • OBecanoby

  • Just popping in

  • Posts: 18

  • Since: 2005/2/1 4


The only file that I found to edit this is in modules/debaser/js and it is the only file there resizewindow.js. I dont know if it can be found in the admin controls of your website but it can be edited from your server or localy and then uploaded by ftp depending on how your site is set up.
hope this helps.

3
wcrwcr
Re: Debaser - customizing the popup window
  • 2005/5/21 1:51

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Thanks OBecanoby

I already did a look on this file, but honestly i didn?t find any spot to edit the poupup player window.

Wondering if the code isn?t on the db

4
OBecanoby
Re: Debaser - customizing the popup window
  • 2005/5/21 22:23

  • OBecanoby

  • Just popping in

  • Posts: 18

  • Since: 2005/2/1 4


If you change the numbers that i have put in color the window will open bigger the default is 200 and I put in 400 and the player window opened bigger at least in IE.Anything other than that Is beyond me. lol
hope this helps.
JS file
__________________________________________________________
/* This javascript comes from http://www.howtocreate.co.uk */
function resizeWinTo( idOfDiv ) {
var oH = getRefToDivMod( idOfDiv ); if( !oH ) { return false; }
var oW = oH.clip ? oH.clip.width : oH.offsetWidth;
var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; }
var x = window; x.resizeTo( oW + 200, oH + 200 );
var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;
if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }
else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }
else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }
if( window.opera && !document.childNodes ) { myW += 16; }
x.resizeTo( oW + ( ( oW + 400 ) - myW ), oH + ( (oH + 400 ) - myH ) );
}
function getRefToDivMod( divID, oDoc ) {
if( !oDoc ) { oDoc = document; }
if( document.layers ) {
if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
y = getRefToDivNest(divID,oDoc.layers[x].document); }
return y; } }
if( document.getElementById ) { return oDoc.getElementById(divID); }
if( document.all ) { return oDoc.all[divID]; }
return document[divID];
}

5
wcrwcr
Re: Debaser - customizing the popup window
  • 2005/6/3 19:57

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi all

Any light on that???

thanks

6
Anonymous
Re: Debaser - customizing the popup window
  • 2005/6/4 14:49

  • Anonymous

  • Posts: 0

  • Since:


In the templates for genre.php and singlefile.php you will find java script:openWithSelfMain, but...

...if you look at the function in xoopsroot/include/xoops.js most things are predefined.

Snip:
function openWithSelfMain(url,name,width,height) {
    var 
options "width=" width ",height=" height "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no";


So if you want to adapt the function, then duplicate it and change the for you relevant parts and call this new function in the debaser-templates.

The resize.js is just looking for the outer limits of the content and then resizing the window to the exact size of the content.

I hope this was understandable?

7
wcrwcr
Re: Debaser - customizing the popup window
  • 2005/6/4 17:22

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Thanks Francis

Quote:
I hope this was understandable?


Very understandable

As matter of fact with my question I was trying to avoid basically two things:

1. avoid the resize of the window and some layout mess

2. somehow trap the "Ctrl+N" event to avoid the opening of a new window and a possible direct download of the media, without the streaming.

That is a taugh one. At least for me
For the moment i?m using the well know "No rightclick script." as I spotted here: https://xoops.org/modules/newbb/viewtopic.php?topic_id=36324&forum=7&post_id=158139#forumpost158139

Thnk you Francis
Any next release news?

8
Anonymous
Re: Debaser - customizing the popup window
  • 2005/6/4 21:02

  • Anonymous

  • Posts: 0

  • Since:


Quote:
1. avoid the resize of the window and some layout mess


Simple solution: when opening the player window with openWithSelfMain fill in the desired size of the window. Then remove the onload in the player-template and the div-tag that is around the table. Should do the work.

The rest is not so easy. I guess there must be some way to suppress the ctrl-n event. Disabling right-click won't help in every case. My browser has some nice extensions so I don't need a right click.

I really don't know a good way to prevent showing the path to the file. The player-code inside need a source to a file. Anti-leeching doesn't work in debaser like in any other download-module, since the file in these modules will not be "executed". Perhaps someone stumbles over this comment and teaches me something else?

For the next release: Mid of June I hope.

9
giba
Re: Debaser - Last version ?
  • 2005/7/1 18:34

  • giba

  • Just can't stay away

  • Posts: 638

  • Since: 2003/4/26


Where to find the last version of the module to dbaser brought up to date?

10
wcrwcr
Re: Debaser - Last version ?
  • 2005/7/1 19:00

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hello Giba

That?s the last version :https://xoops.org/modules/repository/visit.php?cid=45&lid=1428

But frankblack is doing a huge and nice job on bringing us the version 1, full of great features

I can?t wait for that.

Login

Who's Online

285 user(s) are online (60 user(s) are browsing Support Forums)


Members: 0


Guests: 285


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits