Taking out titlebar in popup ? Taking out titlebar in popup ?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Taking out titlebar in popup ?

Started by babylon, January 08, 2005, 02:37:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

babylon

Hello all,


first i like the coppermine very much and like to set some things as i realy want it.
i have a question about the popup...
Can i change the popup so it doesnt show the addressbar ?
As far as i could figure out the popup is done via displayimage.php and tried like...addressbar=no ,but that doesnt respond...
I knew i was probably doing it wrong but can it bee changed ?

Thanks,

Babylon ;)

kegobeer

Here's a good link about how to open and control the features of a new window using javascript.  There is no 'addressbar' property, but there is 'toolbar' and 'menubar'.  Refer to the link for more information.

The javascript is in scripts.js, in the root Coppermine directory, in case you were wondering.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

babylon

link ....what link?  :-[

so....to what should this be changed then...im not good at this... :\'(


function MM_openBrWindow(theURL,winName,features) { //v2.0
 window.open(theURL,winName,features);
}

function writeCookie(name, data, noDays){
 var cookieStr = name + "="+ data
 if (writeCookie.arguments.length > 2){
   cookieStr += "; expires=" + getCookieExpireDate(noDays)
   }
 document.cookie = cookieStr
}

function readCookie(cookieName){
  var searchName = cookieName + "="
  var cookies = document.cookie
  var start = cookies.indexOf(cookieName)
  if (start == -1){ // cookie not found
    return ""
    }
  start += searchName.length //start of the cookie data
  var end = cookies.indexOf(";", start)
  if (end == -1){
    end = cookies.length
    }
  return cookies.substring(start, end)
}

function blocking(nr, cookie, vis_state)
{
       if (document.layers)
       {
               current = (document.layers[nr].display == 'none') ? vis_state : 'none';
               if (cookie != '')
                       writeCookie(nr, current);
               document.layers[nr].display = current;
       }
       else if (document.all)
       {
               current = (document.all[nr].style.display == 'none') ? vis_state : 'none';
               if (cookie != '')
                       writeCookie(nr, current);
               document.all[nr].style.display = current;
       }
       else if (document.getElementById)
       {
               display = (document.getElementById(nr).style.display == 'none') ? vis_state : 'none';
               if (cookie != '')
                       writeCookie(nr, display);
               document.getElementById(nr).style.display = display;
       }
}


function adjust_popup()
{
       var w, h, fixedW, fixedH, diffW, diffH;

       if (document.all) {
               fixedW = document.body.clientWidth;
               fixedH = document.body.clientHeight;
               window.resizeTo(fixedW, fixedH);
               diffW = fixedW - document.body.clientWidth;
               diffH = fixedH - document.body.clientHeight;
       } else {
               fixedW = window.innerWidth;
               fixedH = window.innerHeight;
               window.resizeTo(fixedW, fixedH);
               diffW = fixedW - window.innerWidth;
               diffH = fixedH - window.innerHeight;
       }
       w = fixedW + diffW;
       h = fixedH + diffH;
       if (h >= screen.availHeight) w += 16;
       if (w >= screen.availWidth)  h += 16;
       w = Math.min(w,screen.availWidth);
       h = Math.min(h,screen.availHeight);
       window.resizeTo(w,h);
       window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
}

Tranz

Could you post a (direct) URL to an image with a popup? My popups don't show the addressbar.

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

babylon

Ok..il post it again and a little bit clearer......


Hi all...

have a technical question..
had a simular one on other forum but its not realy about templates or design....

so im starting it here again.....

my problem is this....
When you click on a image in the gallery at some point if you want to look the full picture you get the popup...right?

Okay....but my gallery is installed on a subdomain..
So when you get the popup..you see the same url like here on coppermine..http://coppermine.sourceforge.net   the subdomain url...
And that address shows all on top of the popup window...(in big blue border)
So how can i change that...so it doesnt display the root url...
Or can i change the popup to a chromeless kind ?
Or do i have to disable the popup ?
Any help please...

donnoman

I would guess that you don't have your target address configured properly in your config.

Here's the doc's:
http://coppermine.sourceforge.net/manual.php#config_general

This is somewhat misleading since it says it only applies to e-cards, but in truth it applies to any pop-ups that coppermine produces.

Quote

Target address for the 'See more pictures' link in e-cards
This is the URL where a user will be directed when he will click on the "See more pictures" link in an e-card (just the path to your coppermine folder, e.g. http://yourdomain.tld/coppermine/). Don't specify a certain file (like index.php) in this field.
This must be the URL of your gallery, since the value entered here is used in other parts of Coppermine as well.


donnoman

Also regarding your full size pic popup; The html is in displayimage.php you can enter the parameters to limit the toolbar there instead of modifying scripts.js

look in the html_picture() function:

           $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";

babylon

hi thanks ...

but i figured that target address needed to be changed....
But it doesnt make any difference..
it still shows the subdomain name instead of the url everybody should see..
It simple shows the subdomain where it originaly is installed...
Disabeling the popup or chromeless would solve it....

Weird thing is,i have in the same folder(sub) a blog installed and that shows the urls right as it should....
the situations is,i bought a domainname and asked my host to link that domain to the subdomain....(running more sites on one account)

the blog shows all correct but the gallery still falls back the the real url...
Any understand what i mean ?
if not then please suggest a disable tutorial...... :\'(

donnoman

babylon were going to need to see an example. can you post a url to your gallery?

babylon

#10
well that would be difficult cause i modified some pages so in order to see something you have to be logged in...
but signing up is just as good...http://www.euroblog.nl/gall/login.php  Warning, not worksafe, adult content

kegobeer

Create a test user account and post the name/password here.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

babylon

well i dont have to do that,just signup....

Tranz

Quote from: babylon on January 09, 2005, 03:47:54 AM
well i dont have to do that,just signup....

No. You cannot expect supporters to sign up for dozens of galleries to help. Just remember you are not the only person ever asking for help pertaining to login issues.

babylon

ok sorry...
login is              user
password is...    test

thats the easiest login i could think off... ;)

Casper

First, always post a warning when posting a url to a site containing nudity or other adult content.

I don't understand your problem, your pop-ups act as expected for me, see the screenshots below (one in firfox, one in IE)

I suggest you provide a screenshot to explain.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

donnoman

I think thats what he doesn't like is that it's displaying the domain in the fullsize pic pop-up, and wants it like the first screenshot.
It's not that the full size pic is not working.

The code that sets the title is in displayimage.php

function display_fullsize_pic()

<title><?php echo $CONFIG['gallery_name'?>: <?php echo $lang_fullsize_popup['click_to_close'];
    
?>
</title>


Adding the domain name to windows without an address bar appears to be a "feature" from the browser rather than put there by Coppermine.

You may just have to live with it.

babylon

well both are right,man i feel stupid...
i think i was watching some weird cache or whatever cause yesterday it showed a different web address...
but its ok now...thanks for all your time guys...

kegobeer

No problem.  I'm going to mark this thread as invalid, since there was no real problem.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots