Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Pimp My Site! > Comments in a pop up window
Avandius (New Admin) 10/7/2008 1:17 PM EST : Comments in a pop up window
Avandius
Posts: 337
Fingers of Fury!

Do you guys have any idea how to do this? Right now they go to a new page thats unformmated width wise so that the text scales 100%. I do not know how to edit the comment area.

What i would like to do is make this pop up into a new smaller window or even better yet pop up in the middle of the page and dim the rest of it.

My site: http://www.guildportal.com/Guild.aspx?GuildID=241533&TabID=2372227

What im trying to do is listed on this site, with the popup window:

http://www.guildportal.com/Guild.aspx?GuildID=258012&TabID=2168224&ForumID=1233963&TopicID=7304078&Page=1#36475187
TopBottom

Mottie (MVP) 10/7/2008 4:36 PM EST : RE: Comments in a pop up window
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Avandius!

All you need to do is add rel="facebox" into a link
<a rel="facebox" href="URL TO PAGE OR IMAGE">Click me</a>
Check out this post for more information including how to change the style of the box.
TopBottom

Avandius (New Admin) 10/8/2008 8:54 AM EST : RE: Comments in a pop up window
Avandius
Posts: 337
Fingers of Fury!

Yeah i got that for images.. not sure how to add it to the "comments" link which is done by guildportal not me. Any clue?

Thanks for the quick reply!!
TopBottom

Avandius (New Admin) 10/30/2008 8:09 AM EST : RE: Comments in a pop up window
Avandius
Posts: 337
Fingers of Fury!

Alright to beat a dead topic. Previously you gave me the script to make the comment window pop up in another box, using this script:

<script type="text/javascript">
$(document).ready(function() {
 $("a").each(function() {
  if ($(this).attr("target").match("_commentWindow")) { makePopupWindow($(this),'_commentWindow',600,300); }
 });
 $(document).bind('reveal.facebox', function() {
  $("#facebox").find("a").each(function() {
   if ($(this).attr("target").match("_commentWindow")) { makePopupWindow($(this),'_commentWindow',600,300); }
  });
 });
 function makePopupWindow (linkEl,pName,pWidth,pHeight) {
  var temp = "toolbar=0,status=0,resizable=1,scrollbars=1,width=" + pWidth + ",height=" + pHeight;
  linkEl.click (function(){
   var w = window.open (linkEl.attr("href"),pName,temp);
   w.focus();
   return false;
  });
 }
});
</script>

Now i would like to make it use the face box cosmetics. Where it dims the background, centers in the page and gives me that cool facebox look that you can add to galleries and the like.

Any idea how to edit this to do just that?
TopBottom

Mottie (MVP) 10/30/2008 10:38 AM EST : RE: Comments in a pop up window
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Wow are you trying to kill me? LOL

Just so you know, I'm not a programmer.. I've never taken any programming classes and no college courses. I'm self taught and I've learned to do things from example. The stuff I figure out how to do is mostly out of curiosity and testing.

So, I could say I'll look into it but I'm running out of time here... I'm moving soon and I don't know how much internet time I'll have after that.

That being said, here is a how-to on how to position the window and here is the line you need to modify.

var temp = "top=50,left=50,toolbar=0,status=0,resizable=1,scrollbars=1,width=" + pWidth + ",height=" + pHeight;

I added the text, but I don't know if it's absolute pixels or if you can use percentages of screen size.... I'd test it if I had more time.

To Dim the background... I have no idea how to make that work nicely across all browsers since the pop-up window is outside your main window. I really don't want to re-invent facebox.
TopBottom

RedRydur (Guild Admin) 10/30/2008 10:49 AM EST : RE: Comments in a pop up window
RedRydur
Posts: 1065
Zomgawsh Poster

Mottie said:
I'm moving soon and I don't know how much internet time I'll have after that.



NOOOOO!!!!!! Your not allowed too! Hush with such talk!
---------------------------------------------
-
RedRydur the Pure
TopBottom

Avandius (New Admin) 10/30/2008 12:11 PM EST : RE: Comments in a pop up window
Avandius
Posts: 337
Fingers of Fury!

lol thanks ill play around with it... think of it this way. I'm not trying to kill you im challenging you!

You should definitily find a job in scripting. I bet everyone of us would vouch for you if you could get an employer to visit our site.
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%