Author |
Message |
jib_intelli
Hangin' Around

Joined: Aug 17, 2004
Posts: 43
|
Posted:
Sun Aug 24, 2008 2:11 am |
|
Hi Guys!!
I'm using the NSN supporters left scrolling block on my site. The marquee tag is not recognised as valid xhtml. Is there a workaround to it. The code is as follows:
Code:<?php
/********************************************************/
/* NSN Supporters(TM) Universal */
/* By: NukeScripts Network (webmaster@nukescripts.net) */
/* http://www.nukescripts.net */
/* Copyright © 2000-2005 by NukeScripts Network */
/************************************************************************/
/* PHP-Nuke Platinum: Expect to be impressed COPYRIGHT */
/* */
/* Copyright (c) 2004 - 2006 by http://www.techgfx.com */
/* Techgfx - Graeme Allan (goose@techgfx.com) */
/* */
/* Copyright (c) 2004 - 2006 by http://www.conrads-berlin.de */
/* MrFluffy - Axel Conrads (axel@conrads-berlin.de) */
/* */
/* Refer to TechGFX.com for detailed information on PHP-Nuke Platinum */
/* */
/* TechGFX: Your dreams, our imagination */
/************************************************************************/
if (stristr($_SERVER['SCRIPT_NAME'], "block-GT_Supporters_Lt.php")) {
Header("Location: ../index.html");
die();
}
get_lang("Supporters");
global $prefix, $db, $user, $admin;
$supporterlt = $db->sql_fetchrow($db->sql_query("SELECT * from ".$prefix."_nsnsp_config"));
$content = "<center>Supported by<br/><br/>";
$content .= "<marquee behavior=\"scroll\" direction=\"left\" height=\"31\" width=\"90%\" scrollamount=\"3\" scrolldelay=\"90\" onmouseover='this.stop()' onmouseout='this.start()'>\n";
$result = $db->sql_query("SELECT site_id, site_name, site_image FROM $prefix"._nsnsp_sites." WHERE site_status>'0' ORDER BY site_name");
while (list($site_id, $site_name, $site_image) = $db->sql_fetchrow($result)) {
$content .= " <a href=\"supporters-site-$site_id.html\" target=\"_blank\"><img src=\"$site_image\" height=\"31\" width=\"88\" alt=\"\" title=\"$site_name\" border=\"0\"/></a> \n";
}
$content .="</marquee><br/><br/>\n";
if ($supporterlt['require_user'] == 0 || is_user($user)) { $content .= "[ <a href='supporters-submit.html'>"._BESUPPORTER."</a> ]<br/>\n"; }
if (is_admin($admin)) { $content .= "[ <a href='modules.php?name=Supporters&file=admin'>"._GOTOADMIN."</a> ]<br/>\n"; }
$content .= "[ <a href='supporters.html'>"._SUPPORTERS."</a> ]</center>\n";
?>
|
Please help, the code is working fine in both FireFox and IE but it is not being validated as XHTML. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
 |
wHiTeHaT
Life Cycles Becoming CPU Cycles

Joined: Jul 18, 2004
Posts: 579
|
Posted:
Sun Aug 24, 2008 3:40 am |
|
|
|
 |
wHiTeHaT

|
Posted:
Sun Aug 24, 2008 4:48 am |
|
|
|
 |
wHiTeHaT

|
Posted:
Sun Aug 24, 2008 5:57 am |
|
I did some investigation and it seem you not using latest nsn supporters module...or do you.
If not... download from nukescripts, after you logged :
http://www.nukescripts.net/modules.php?name=Downloads&op=getit&lid=1105
once installed/upgraded :
Goto root/header.php
add after:
Code:if (file_exists('themes/'.$ThemeSel.'/images/favicon.ico')) {
echo '<link rel="shortcut icon" href="themes/'.$ThemeSel.'/images/favicon.ico" type="image/x-icon" />'."\n";
}
|
the folowing :
Code:
?>
<style type="text/css">
/*################################# */
/* CSS for my first scrolling box */
#scrollingContainer{
width:170px; /* 170 pixels in width */
height:250px; /* Height of box */
border:1px solid #000; /* Black border around box */
background-color: #E2EBED; /* Light blue background color */
padding:2px; /* A little bit of space between border of box and text inside */
float:left; /* I want the text to wrap around the box */
margin-right:10px; /* Right margin of 10 pixels */
font-size:0.9em; /* Smaller font size than the rest of the page */
overflow:hidden; /* Hide overflow content */
}
/* End css for my first scrolling box */
/* CSS for my second scrolling box */
#scrollingContainer2{
width:100px; /* Width of second box */
height:150px; /* Height of second box */
border:1px solid #000;
background-color: #DDD;
padding:2px; /* A little bit of space between border of box and text inside */
float:right; /* I want the text to wrap around the box */
margin-left:10px; /* Space at the left of the box */
color:red; /* red text color */
}
#scrollingContent2{
font-size:0.9em;
}
</style>
<script type="text/javascript">
// <![CDATA[
/************************************************************************************************************
(C) www.dhtmlgoodies.com, November 2005
This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.
Thank you!
www.dhtmlgoodies.com
Alf Magne Kalleland
************************************************************************************************************/
var slideTimeBetweenSteps = 30; // General speed variable (Lower = slower)
var scrollingContainer = false;
var scrollingContent = false;
var containerHeight;
var contentHeight;
var contentObjects = new Array();
var originalslideSpeed = false;
function slideContent(containerId)
{
var topPos = contentObjects[containerId]['objRef'].style.top.replace(/[^\-0-9]/g,'');
topPos = topPos - contentObjects[containerId]['slideSpeed'];
if(topPos/1 + contentObjects[containerId]['contentHeight'] / 1 < 0)topPos = contentObjects[containerId]['containerHeight'];
contentObjects[containerId]['objRef'].style.top = topPos + 'px';
setTimeout('slideContent("' + containerId + '")',slideTimeBetweenSteps);
}
function stopSliding()
{
var containerId = this.id;
contentObjects[containerId]['slideSpeed'] = 0;
}
function restartSliding()
{
var containerId = this.id;
contentObjects[containerId]['slideSpeed'] = contentObjects[containerId]['originalSpeed'];
}
function initSlidingContent(containerId,slideSpeed)
{
scrollingContainer = document.getElementById(containerId);
scrollingContent = scrollingContainer.getElementsByTagName('DIV')[0];
scrollingContainer.style.position = 'relative';
scrollingContainer.style.overflow = 'hidden';
scrollingContent.style.position = 'relative';
scrollingContainer.onmouseover = stopSliding;
scrollingContainer.onmouseout = restartSliding;
originalslideSpeed = slideSpeed;
scrollingContent.style.top = '0px';
contentObjects[containerId] = new Array();
contentObjects[containerId]['objRef'] = scrollingContent;
contentObjects[containerId]['contentHeight'] = scrollingContent.offsetHeight;
contentObjects[containerId]['containerHeight'] = scrollingContainer.clientHeight;
contentObjects[containerId]['slideSpeed'] = slideSpeed;
contentObjects[containerId]['originalSpeed'] = slideSpeed;
slideContent(containerId);
}
// ]]>
</script>
<?php
|
after that create a block name what ever youwish i used:
block-Mytest_Block.php
inside this file insert:
Code:
<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if(!defined('NUKE_FILE') AND !defined('BLOCKS_FILE')) { header("Location: ../index.php"); }
global $prefix, $db, $user, $sp_config, $spmodule;
$content = '<div id="scrollingContainer">';
$content .= ' <div id="scrollingContent">';
$result = $db->sql_query("SELECT `site_id`, `site_name`, `site_image` FROM `".$prefix."_nsnsp_sites` WHERE `site_status`>'0' ORDER BY `site_name` DESC");
while(list($site_id, $site_name, $site_image) = $db->sql_fetchrow($result)) {
list($width, $height, $type, $attr) = getimagesize($site_image);
if($width > $sp_config['max_width']) { $width = $sp_config['max_width']; }
if($height > $sp_config['max_height']) { $height = $sp_config['max_height']; }
$content .= ' <p><a href="modules.php?name='.$spmodule.'&op=SPGo&site_id='.$site_id.'" target="_blank"><img src="'.$site_image.'" height="'.$height.'" width="'.$width.'" title="'.$site_name.'" alt="'.$site_name.'" border="0" /></a></p>';
}
$content .= ' </div>';
$content .= '</div>';
$content .= '<script type="text/javascript">';
$content .= "initSlidingContent('scrollingContainer',3);";
$content .= '</script>';
?>
|
Have fun.
Grtzz wHiTeHaT
[PS] i made a working version on my site so you can see |
|
|
|
 |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Sat Oct 03, 2009 2:04 pm |
|
@ wHiTeHaT Thank you so much for posting this solution !
I had over 30 errors from my created scrolling block (no NS) and now it´s W3C valid again.
I owe you a beer.
 |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sun Oct 04, 2009 8:26 am |
|
Doesn't the latest NS scrolling block also have some form of JS implementation? Just serves as another example. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Susann

|
Posted:
Sun Oct 04, 2009 8:38 am |
|
Yeah, it just didn´t scroll with my block but should normally work too. |
|
|
|
 |
Palbin
Site Admin

Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Sun Oct 04, 2009 8:56 am |
|
In the latest package we included a much simpler script from dynamic drive for use in the NS block. It fixed javascript warnings in IE. I really can't remember, but I don't think it scrolled in IE either (at least IE 8 ). Just an FYI. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
 |
|