PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
zacklk
Regular
Regular


Joined: Mar 06, 2010
Posts: 79

PostPosted: Tue Aug 17, 2010 2:08 am Reply with quote Back to top

IE 8 stop supporting "marquee" tag. even it is supported by most other browsers, W3 validator showing as a error. Im using "marquee" to scroll downloads and my game arcade contains. is there any way to use jquery or something similar to do this process?

i found great jquery scroller here
Only registered users can see links on this board!
Get registered or login to the forums!
but i dont have any clue how to use it in my blocks.

this is my download block code.

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/*         Additional security & Abstraction layer conversion           */
/*                           2003 chatserv                              */
/*      http://www.nukefixes.com -- http://www.nukeresources.com        */
/************************************************************************/
/************************************************************************/
/* Additional code clean-up, performance enhancements, and W3C and      */
/* XHTML compliance fixes by Raven and Montego.                         */
/************************************************************************/

if ( !defined('BLOCK_FILE') ) {
   Header('Location: ../index.php');
   die();
}

global $prefix, $db;

$content = '';
$n = 1;
$result = $db->sql_query('SELECT lid, title FROM '.$prefix.'_downloads_downloads ORDER BY hits DESC LIMIT 0,10');
while (list($lid, $title) = $db->sql_fetchrow($result)) {
   $lid = intval($lid);
   $title2 = htmlspecialchars(str_replace('_', ' ', $title), ENT_QUOTES, _CHARSET);
   $content .= '<strong><big>&middot;</big></strong>&nbsp;'.$n.
      ': <a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid='.$lid.'">'.$title2.'</a><br />';
   ++$n;
}
?>



can anyone tell me how to apply jquery scroller or something smiler to this code. thanks in advance.
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Tue Aug 17, 2010 6:38 am Reply with quote Back to top

ok, try this...

upload jscroller-0.4.js to includes/jquery/

create and upload includes/addons/head-jscroller.php

Code:
<?php

if (stristr(htmlentities($_SERVER['PHP_SELF']), 'head-jscroller.php')) {
   Header('Location: ../../index.php');
   die();
}

addJSToHead('includes/jquery/jquery.js', 'file');
addJSToHead('includes/jquery/jscroller-0.4.js', 'file');
   $inlineJS = '<script type="text/javascript">'."\n";
   $inlineJS .= '$(document).ready(function(){'."\n";
   $inlineJS .= '        $jScroller.add("#scroller_container","#scroller","down",1);'."\n";
   $inlineJS .= '        $jScroller.start();'."\n";
   $inlineJS .= '});'."\n";
   $inlineJS .= '</script>'."\n\n";
addJSToHead($inlineJS, 'inline');


?>


and your block
Code:
<?php

if ( !defined('BLOCK_FILE') ) {
   Header('Location: ../index.php');
   die();
}

global $prefix, $db;

$content = '';
$content .= '<div id="scroller_container">'."\n";
$content .= '  <div id="scroller">'."\n";
$n = 1;
$result = $db->sql_query('SELECT lid, title FROM '.$prefix.'_downloads_downloads ORDER BY hits DESC LIMIT 0,10');
while (list($lid, $title) = $db->sql_fetchrow($result)) {
   $lid = intval($lid);
   $title2 = htmlspecialchars(str_replace('_', ' ', $title), ENT_QUOTES, _CHARSET);
   $content .= '<strong><big>&middot;</big></strong>&nbsp;'.$n.
      ': <a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid='.$lid.'">'.$title2.'</a><br />';
   ++$n;
}
$content .= '  </div>'."\n";
$content .= '</div>'."\n";
?>
View user's profile Send private message
zacklk
Regular
Regular


Joined: Mar 06, 2010
Posts: 79

PostPosted: Tue Aug 17, 2010 8:34 am Reply with quote Back to top

i tryed it. its loading 1st and then the block is comming blank.
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Tue Aug 17, 2010 4:11 pm Reply with quote Back to top

ahh yes, I tried it and realized there was some CSS to add too. Add this to your themes/YOUR_THEME/style/style.css

Code:
/* Scroller Box */
#scroller_container {
 position: relative;
 width: 150px;
 height: 100px;
 overflow: hidden;
}

#scroller p {
 padding: 0;
}
/* Scoller Box */


you can adjust the width and height to your needs. If you run multiple themes you'll need to add to all the style.css files... You can see it working on my testing site @ the bottom
Only registered users can see links on this board!
Get registered or login to the forums!


I might also suggest changing the direction to up and adding a true at the end (so it pauses on mouseover), like so:
$jScroller.add("#scroller_container","#scroller","up",1,true);
in your head-jscroller.php file Wink
View user's profile Send private message
zacklk
Regular
Regular


Joined: Mar 06, 2010
Posts: 79

PostPosted: Tue Aug 17, 2010 8:25 pm Reply with quote Back to top

cool. works great. thanks a lot spastic.
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Tue Aug 17, 2010 8:42 pm Reply with quote Back to top

np, glad you got it working Wink
View user's profile Send private message
zacklk
Regular
Regular


Joined: Mar 06, 2010
Posts: 79

PostPosted: Wed Aug 18, 2010 3:46 am Reply with quote Back to top

hi spastic, i like to ask one more thing. is there any way to show, how many hits for each download in the next raw? sorry about disturbing and thanks a lot for all ur help Smile
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Wed Aug 18, 2010 8:14 am Reply with quote Back to top

yes, here's the part you will need to modify in your block
Code:
$result = $db->sql_query('SELECT lid, title, hits FROM '.$prefix.'_downloads_downloads ORDER BY hits DESC LIMIT 0,10');
while (list($lid, $title, $hits) = $db->sql_fetchrow($result)) {
   $lid = intval($lid);
   $title2 = htmlspecialchars(str_replace('_', ' ', $title), ENT_QUOTES, _CHARSET);
   $hits = intval($hits);
   $content .= '<strong><big>&middot;</big></strong>&nbsp;'.$n.
      ': <a href="modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid='.$lid.'">'.$title2.'</a><br />Hits: '.$hits.'<br />';
   ++$n;
}
View user's profile Send private message
zacklk
Regular
Regular


Joined: Mar 06, 2010
Posts: 79

PostPosted: Wed Aug 18, 2010 10:20 pm Reply with quote Back to top

great. as always u been a big help. thanks a lot sir Smile
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum