![]() |
|
#1
|
|||
|
|||
|
I'm trying to create a scoreboard module using a script I found surfing the web and I managed to put it on a module but I couldn't arranged the size of the table, can someone help me with this and finish the module, I think many will like to have this module, by now you should know that I'm a newbie when it comes to coding
, here is the code:Code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet] Scoreboard</b></span></td>
</tr>
<tr>
<TD vAlign=top align=center height="1" width="135">
<TABLE cellSpacing=0 cellPadding=4 width="50%" border=0>
<TBODY>
<TR>
<TD class=menu-title noWrap></TD></TR></TBODY></TABLE>
<FORM name=jumpy>
<SELECT onchange=gone(); size=1 name=example>
<OPTION value=http://www.sportsline.com/nba/box-scoreboards selected>NBA</OPTION>
<OPTION value=http://www.sportsline.com/nfl/box-scoreboards>NFL</OPTION>
<OPTION value=http://www.sportsline.com/nhl/box-scoreboards>NHL</OPTION>
<OPTION value=http://www.sportsline.com/mlb/box-scoreboards>MLB</OPTION>
<OPTION value=http://www.sportsline.com/u/includes/script/PGA_leader_inc.htm>PGA</OPTION>
<OPTION value=http://www.sportsline.com/collegefootball/box-scoreboards>NCAA Football</OPTION>
<OPTION value=http://www.sportsline.com/collegebasketball/box-scoreboards>NCAA Basketball</OPTION></SELECT>
</FORM>
<P><font size="1">CBS Sportsline Cortesy</font>
<SCRIPT language=javascript>
var displaymode=0;
<!-- This adds the iframe -->
var iframecode="<center><iframe id='external' style='width:155;height:220;' src='http://www.sportsline.com/nba/box-scoreboards' scrolling='auto' border=0 marginwidth=1 marginheight=1 align=center frameborder=0></iframe></center>";
if (displaymode==0) {
document.write(iframecode);
}
function gone() {
var selectedurl=document.jumpy.example.options[document.jumpy.example.selectedIndex].value;
if (document.getElementById&&displaymode==0)
{
document.getElementById("external").src=selectedurl;
} else if (document.all&&displaymode==0)
{
document.all.external.src=selectedurl;
} else {
if (!window.win2||win2.closed)
{
win2=window.open(selectedurl);
} else {
win2.location=selectedurl;
win2.focus();
}
}
}
</SCRIPT>
</table>
<br />
|
|
#2
|
|||
|
|||
|
Well, that code is a mess. I didn't spend a lot of time on this, but try this:
Code:
<table align="center" border="1" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet] Scoreboard</b></span></td>
</tr>
<tr>
<td valign="top" align="center" height="1" width="135">
<form name="jumpy" style="margin: 0px; padding: 0px;">
<select onchange="gone();" size="1" name="example">
<option value="http://www.sportsline.com/nba/box-scoreboards" selected="selected">NBA</option>
<option value="http://www.sportsline.com/nfl/box-scoreboards">NFL</option>
<option value="http://www.sportsline.com/nhl/box-scoreboards">NHL</option>
<option value="http://www.sportsline.com/mlb/box-scoreboards">MLB</option>
<option value="http://www.sportsline.com/u/includes/script/PGA_leader_inc.htm">PGA</option>
<option value="http://www.sportsline.com/collegefootball/box-scoreboards">NCAA Football</option>
<option value="http://www.sportsline.com/collegebasketball/box-scoreboards">NCAA Basketball</option>
</select>
</form>
<font size="1">CBS Sportsline Cortesy</font>
<script type="text/javascript" language="javascript">
var displaymode=0;
<!-- This adds the iframe -->
var iframecode="<center><iframe id='external' style='width: 155px; height: 220px;' src='http://www.sportsline.com/nba/box-scoreboards' scrolling='auto' border='1' marginwidth='1' marginheight='1' align='center' frameborder='0'></iframe></center>";
if (displaymode==0) {
document.write(iframecode);
}
function gone() {
var selectedurl=document.jumpy.example.options[document.jumpy.example.selectedIndex].value;
if (document.getElementById&&displaymode==0) {
document.getElementById("external").src=selectedurl;
} else if (document.all&&displaymode==0) {
document.all.external.src=selectedurl;
} else {
if (!window.win2||win2.closed) {
win2=window.open(selectedurl);
} else {
win2.location=selectedurl;
win2.focus();
}
}
}
</script>
</td>
</tr>
</table>
<br />
|
|
#3
|
|||
|
|||
|
Thanks 58sniper!
|
|
#4
|
|||
|
|||
|
awesome , it works very nice
![]() Is there a way to change the colors more too match the color layout I have for my page ? http://www.pacertalk.com Also I assume if I just want to show NBA scores I could take out the Drop Down Box and it would just show NBA scores correct ? Last edited by TheSauceMaster; 06-23-2004 at 06:20 PM. |
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
|||
|
|||
|
Okay - I cleaned this up a little more. Among the changes:
1. fixed the background color issue. 2. Changed the 'default' display to MLB, since basketball season is over (and my Pistons won!) 3. Made the title a link to Sportsline.com 4. removed some redundant tags Replace the template with: Code:
<table align="center" border="1" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%"> <tr> <td class="tcat"><a href="http://www.sportsline.com/" class="smallfont"><b>$vboptions[blockbullet] Scoreboard</b></a></td> </tr> <tr> <td valign="top" align="center" width="135" class="alt1"> <form name="jumpy" style="margin: 0px; padding: 0px;"> <select onchange="gone();" size="1" name="example"> <option value="<A href="http://www.sportsline.com/nba/box-scoreboards">NBA</option">http://www.sportsline.com/nba/box-scoreboards">NBA</option> <option value="<A href="http://www.sportsline.com/nfl/box-scoreboards">NFL</option">http://www.sportsline.com/nfl/box-scoreboards">NFL</option> <option value="<A href="http://www.sportsline.com/nhl/box-scoreboards">NHL</option">http://www.sportsline.com/nhl/box-scoreboards">NHL</option> <option value="http://www.sportsline.com/mlb/box-scoreboards" selected="selected">MLB</option> <option value="<A href="http://www.sportsline.com/u/includes/script/PGA_leader_inc.htm">PGA</option">http://www.sportsline.com/u/includes/script/PGA_leader_inc.htm">PGA</option> <option value="<A href="http://www.sportsline.com/collegefootball/box-scoreboards">NCAA">http://www.sportsline.com/collegefootball/box-scoreboards">NCAA Football</option> <option value="<A href="http://www.sportsline.com/collegebasketball/box-scoreboards">NCAA">http://www.sportsline.com/collegebasketball/box-scoreboards">NCAA Basketball</option> </select> </form> <font size="1">Courtesy CBS Sportsline</font> <script type="text/javascript" language="javascript"> var displaymode=0; <!-- This adds the iframe --> var iframecode="<center><iframe id='external' style='width: 155px; height: 220px;' src='http://www.sportsline.com/mlb/box-scoreboards' scrolling='auto' border='1' marginwidth='1' marginheight='1' align='center' frameborder='0'></iframe></center>"; if (displaymode==0) { document.write(iframecode); } function gone() { var selectedurl=document.jumpy.example.options[document.jumpy.example.selectedIndex].value; if (document.getElementById&&displaymode==0) { document.getElementById("external").src=selectedurl; } else if (document.all&&displaymode==0) { document.all.external.src=selectedurl; } else { if (!window.win2||win2.closed) { win2=window.open(selectedurl); } else { win2.location=selectedurl; win2.focus(); } } } </script> </td> </tr> </table> <br /> |
|
#7
|
|||
|
|||
|
So how do I make a module for this? I am new and confused.
|
|
#8
|
|||
|
|||
|
Create a new template called adv_portal_sports and paste the above code into it.
Add a new module for CMPS: - Module Title - Sports - Module Identifier - Leave blank - OR Template to Include - sport - Activate and select the column you want it in. - Save and you are done. |
|
#9
|
|||
|
|||
|
Mucho Thanks , 58sniper works like a dream and I even modifed it to my taste
|
|
#10
|
|||
|
|||
|
I fixed up the '<a href' and doubles of the links.
Here you go. Just replace the whole template. Code:
<table align="center" border="1" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><a href="http://www.sportsline.com/" class="smallfont"><b>$vboptions[blockbullet] Scoreboard</b></a></td>
</tr>
<tr>
<td valign="top" align="center" width="135" class="alt1">
<form name="jumpy" style="margin: 0px; padding: 0px;">
<select onchange="gone();" size="1" name="example">
<option value="http://www.sportsline.com/nba/box-scoreboards">NBA</option>
<option value="http://www.sportsline.com/nfl/box-scoreboards">NFL</option>
<option value="http://www.sportsline.com/nhl/box-scoreboards">NHL</option>
<option value="http://www.sportsline.com/mlb/box-scoreboards" selected="selected">MLB</option>
<option value="http://www.sportsline.com/u/includes/script/PGA_leader_inc.htm">PGA</option">
<option value="http://www.sportsline.com/collegefootball/box-scoreboards">NCAA Football</option>
<option value="http://www.sportsline.com/collegebasketball/box-scoreboards">NCAA Basketball</option>
</select>
</form>
<font size="1">Courtesy CBS Sportsline</font>
<script type="text/javascript" language="javascript">
var displaymode=0;
<!-- This adds the iframe -->
var iframecode="<center><iframe id='external' style='width: 155px; height: 220px;' src='http://www.sportsline.com/mlb/box-scoreboards' scrolling='auto' border='1' marginwidth='1' marginheight='1' align='center' frameborder='0'></iframe></center>";
if (displaymode==0) {
document.write(iframecode);
}
function gone() {
var selectedurl=document.jumpy.example.options[document.jumpy.example.selectedIndex].value;
if (document.getElementById&&displaymode==0) {
document.getElementById("external").src=selectedurl;
} else if (document.all&&displaymode==0) {
document.all.external.src=selectedurl;
} else {
if (!window.win2||win2.closed) {
win2=window.open(selectedurl);
} else {
win2.location=selectedurl;
win2.focus();
}
}
}
</script>
</td>
</tr>
</table>
<br />
BTW, next time you make a post with code in it, remove the check by 'Automatically parse links in text'. |
|
#11
|
|||
|
|||
|
Quote:
Great mod.. Thanks!! |
|
#12
|
||||
|
||||
|
This is great work everyone
![]() juanchi - would you mind telling me how you found a script like this? I have no idea where to begin to look for one - thanks
|
|
#13
|
|||
|
|||
|
Quote:
|
|
#14
|
|||
|
|||
|
Is this Possible for english, scottish, and european football, and the up and coming Olympics would be great aswell.
|
|
#15
|
|||
|
|||
|
Yes, if the olympics would be possible that would be awesome.
|
|
#16
|
||||
|
||||
|
Quote:
I'll just do some searching
|
|
#17
|
|||
|
|||
|
I have spent many hours this evening trying to get this module to work on my site. For some reason I just cannot get it to appear on the homepage of my website. I have checked over and over looking for spelling errors and just anything obvious as to why it isn't showing up, does anyone have a clue as to why it isn't.............. Thanks
|
|
#18
|
||||
|
||||
|
add:
Code:
<option value="http://www.sportsline.com/olympics/box-scoreboards">Olympics</option> Demo: http://www.gzhq.net/ |
|
#19
|
|||
|
|||
|
Quote:
Thanks! |
|
#20
|
|||
|
|||
|
Thanks. I just tried that code last week but nothing happened. I guess they just activated it. Anyway, how did you get olympics to show automaticly with the title 'olympics'? I got ot to go to olympics but it still says 'mlb'.
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic Module | cLord | Add-On Modules & Modifications | 55 | 04-24-2006 08:45 AM |
| Analog Clock Module [FLASH] | cLord | Add-On Modules & Modifications | 28 | 04-22-2006 10:23 AM |
| PayPal Module | cLord | Add-On Modules & Modifications | 36 | 09-21-2005 01:08 AM |
| Module: Virus Map | 58sniper | Add-On Modules & Modifications | 9 | 06-05-2005 05:14 AM |
| Module: Trend Micro virus info | 58sniper | Add-On Modules & Modifications | 7 | 04-16-2005 04:16 PM |