100%
|
Post by Aaron on Jun 4, 2005 17:04:02 GMT -8
Member of the Month - PopUpFor use on ProBoards version 4.[ Cross Browser ] Preview: HereMain Footer: <script type="text/javascript"> <!-- /* Member of the Month Pop-Up Created by Naruto hatakeforum.proboards30.com/index.cgi */
// This is the title of your pop-up var iTitle = "Member of the Month";
// This is the height and width of your pop-up var iHeight = "300"; var iWidth = "180";
// This is the MotM's Name and Profile URL var iMotM = "Display Name"; var iMotMUrl = "/index.cgi?action=viewprofile&user=USERNAME_HERE";
// A description under the MotM's name var iMotMDesc = "This user has displayed great support towards the forums. Congratulations on earning Member of the Month!";
// No editting necessary, below this point function popOpen() { var iStyle1 = document.getElementsByTagName("style")[0].innerHTML; var iStyle2 = document.getElementsByTagName("style")[1].innerHTML; var iStyle = "<style type=\"text/css\">" + iStyle1 + iStyle2 + "\n</style>"; var iData = "<html>\n" + "<head>\n" + "<title>" + iTitle + "</title>\n" + "" + iStyle + "\n" + "</head>\n" + "<body>\n" + "<br />\n" + "<div align=\"center\">\n" + "<table width=\"90%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"bordercolor\">\n" + "<tr>\n" + "<td>\n" + "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\">\n" + "<tr>\n" + "<td class=\"titlebg\" align=\"center\"><font class=\"titletext\"><b>Member of the Month</b></font></td>\n" + "</tr>\n" + "<tr>\n" + "<td class=\"windowbg\"><font size=\"1\"><br /><center><a href=\"#\" onclick=\"window.opener.location=\'" + iMotMUrl + "\';window.close();\">" + iMotM + "</a></center><br />" + iMotMDesc + "</font></td>\n" + "</tr>\n" + "</table>\n" + "</td>\n" + "</tr>\n" + "</table>\n" + "</div>\n" + "</body>\n" + "</html>"; window.open("","","width=" + iWidth + ",height=" + iHeight + ",scrollbars=yes,toolbar=no,location=no,status=no,menubar=no").document.write(iData); } var td = document.getElementsByTagName("td"); for(t=0;t<td.length;t++) { if(td[t].width=="40%" && td[t].align=="left" && td[t].vAlign=="top" && td[t].innerHTML.match(/Total Members: /i)) { td[t].innerHTML += "<br />"; td[t].innerHTML += "<font size=\"1\">View the <a href=\"javascript:popOpen();\">Member of the Month</a></font>."; } } //--> </script>
Last Edit: Jun 17, 2005 16:22:23 GMT -8 by Aaron
|
|
|
Post by Chenoa on Jun 6, 2005 20:02:40 GMT -8
Awesome code.How could I incorporate a pic of the member under the description of the member?
|
|
|
Post by CD on Jun 6, 2005 21:41:13 GMT -8
For the description part, add this.
<br><img src='url to image' border='0'>
Edit the part that says "url to image"
|
|
|
Post by Chenoa on Jun 6, 2005 21:54:10 GMT -8
and where in the code do i put it..sorry.
|
|
|
Post by CD on Jun 6, 2005 21:57:39 GMT -8
var iMotMDesc = "This user has displayed great support towards the forums. Congratulations on earning Member of the Month!"; In that part. Its in blue in the code above. That's what I meant by description.
|
|
|
Post by Chenoa on Jun 6, 2005 21:59:21 GMT -8
so can i add the img code to the end of the description?
|
|
|
Post by CD on Jun 6, 2005 22:01:17 GMT -8
Yep. Add it before the second quote, and the semicolon. It'd be something like this:
var iMotMDesc = "This user has displayed great support towards the forums. Congratulations on earning Member of the Month!<br><br><img src='URL TO IMAGE' border='0'>";
|
|
|
Post by Chenoa on Jun 6, 2005 22:05:23 GMT -8
ok I will give it a go..thanks for your patience and help *exhalts*
|
|
|
Post by Chenoa on Jun 6, 2005 22:09:39 GMT -8
It worked perfectly (huge hugs)
|
|
|
Post by CD on Jun 6, 2005 22:10:47 GMT -8
All I did was answer before someone else did. Not a big deal.
|
|