The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Is there a way to change the background color in the popup windows for attached images?
I think this would imply a html-page being displayed instead of just the plain image. But how do i change this? Best regards, Matthias |
#2
|
||||
|
||||
![]()
Find the template and then change it there. to find the template - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. Sometimes the template is the one mentioned at the very top of the page source.
|
#3
|
|||
|
|||
![]()
Thank you, Lynne!
So i found this code in postbit_attachmentthumbnail, which seems to be the link used, when opening an attached image: Code:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]" rel="Lightbox_$post[postid]" id="attachment$attachment[attachmentid]"<if condition="$show['newwindow']"> target="_blank"</if>> thumbnail code removed</a> I don't know much about php, so can this be done in a few simlpe steps? |
#4
|
||||
|
||||
![]()
I thought you wanted to change the background of the actual pop-up? If so, click on the link to pop it up and the view the page source and find the template name there.
|
#5
|
|||
|
|||
![]() Quote:
|
#6
|
||||
|
||||
![]()
Oh, I thought you meant the page where you do the attaching (the pop-up you get when you hit Manage Attachments). Are you using lightbox? I have no clue how to change that.
|
#7
|
|||
|
|||
![]()
I'm not using Lightbox because i need the images to open in a new window.
I'm running a site for phtographers, where many image attachments are made and viewed, and people would really appreciate seeing the pictures on a dark background. As far as i understand (and i really don't understand much about php) i would have to modify the attachment.php in a way, that is does not only send the plain image, but an .html file with my desired background color. EDIT: I found a solution myself ![]() It's based on a simple java script, which requires the user to have JS turned on, but that would be the same with lightbox anyway. It requires the following changes to postbit_attachmentthumbnail: At the beginning add: Code:
<script type="text/javascript"> function showPic(it) { var w = window.open("","","width="+screen.width+",height="+screen.height+",left=0,top=0,resizable=1,scrollbars=1,status=0,menubar=0,top=0,left=0"); w.document.writeln("<body bgcolor='#333333'>"); w.document.writeln("<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'><tr><td align='center' valign='middle'><img src='" + it + "'></td></tr>"); w.document.writeln("<\/body>"); w.document.close(); } </script> And to the thumbnail-Link add: Code:
onclick="showPic(this.href);return false" |
#8
|
||||
|
||||
![]()
Ah, good sleuthing! :up:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|