Joined: Dec 05, 2007 Posts: 201 Location: Tampa, Florida
Posted:
Sat Jul 30, 2011 8:46 pm
I am using
Only registered users can see links on this board! Get registered or login to the forums!
for several blocks on
Only registered users can see links on this board! Get registered or login to the forums!
I got the Old Articles to scroll but the problem I am having is the "Old Articles" title also scrolls.
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 $locale, $oldnum, $storynum, $storyhome, $cookie, $categories, $cat, $prefix, $multilingual, $currentlang, $db, $new_topic, $user_news, $userinfo, $user;
if (!isset($see)) {$see = ''; } // added by Guardin as variable wasnt defined
if (!isset($dummy)) { $dummy = ''; } // add by Guardian as variable was not defined
if (!isset($articlecomm)) { $articlecomm = ''; } // add by fkelly as variable was not defined
if (!isset($time2)) { $time2 = ''; } // add by fkelly as variable was not defined
$content = '';
getusrinfo($user);
if ($multilingual == 1) {
if ($categories == 1) {
$querylang = 'where catid=\''.intval($cat).'\' AND (alanguage=\''.$currentlang.'\' OR alanguage=\'\')';
} else {
$querylang = 'where (alanguage=\''.$currentlang.'\' OR alanguage=\'\')';
if ($new_topic != 0) {
$querylang .= ' AND topic=\''.intval($new_topic).'\'';
}
}
} else {
if ($categories == 1) {
$querylang = 'where catid=\''.intval($cat).'\'';
} else {
$querylang = '';
if ($new_topic != 0) {
$querylang = 'WHERE topic=\''.intval($new_topic).'\'';
}
}
}
if (isset($userinfo['storynum']) AND $user_news == 1) {
$storynum = $userinfo['storynum'];
} else {
$storynum = $storyhome;
}
$boxstuff = '<table border="0" width="100%">';
$boxTitle = _PASTARTICLES;
[b]?>
<p><script type="text/javascript" src="jscroller2.js"></script></p>
<div id="scroller_container">
<div class="jscroller2_up jscroller2_speed-20 jscroller2_alternate jscroller2_mousemove">
<?[/b]
$sql = 'SELECT sid, title, time, comments FROM '.$prefix.'_stories '.$querylang.' ORDER BY time DESC LIMIT '.$storynum.', '.$oldnum;
$result = $db->sql_query($sql);
$vari = 0;
Only registered users can see links on this board! Get registered or login to the forums!
for several blocks on
Only registered users can see links on this board! Get registered or login to the forums!
I got the Old Articles to scroll but the problem I am having is the "Old Articles" title also scrolls.
yeah. thanks!
its a litte bit offtopic, but i searched the last night a litte jquery text-scroller for another output but this one is very cool. many scrollers are use the same id or class. here is it perfekt for me. i can use it on every place of my RN.
Joined: Dec 05, 2007 Posts: 201 Location: Tampa, Florida
Posted:
Mon Aug 01, 2011 3:55 am
I have made several attempts to get the block title outside of the scroller without success. I am hoping someone might have a suggestion that would make this work. You can see it on my site mentioned bove.
I have made several attempts to get the block title outside of the scroller without success. I am hoping someone might have a suggestion that would make this work. You can see it on my site mentioned bove.
i have found a solution for you!
at 1st you must load the js script into your header. open the directory /includes/custom_files/ and make a file called custom_head.php. here can load your js- or css-files into your header before the body was started. now open this file and put this line into it:
now you can search the right place for your scrolling div-containers. i have modify the block without tables and change it to div and spans. now can give the containers css ids or/and classes to change width and height in your theme.
block-Old_Articles.php:
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 $locale, $oldnum, $storynum, $storyhome, $cookie, $categories, $cat, $prefix, $multilingual, $currentlang, $db, $new_topic, $user_news, $userinfo, $user;
if (!isset($see)) {$see = ''; } // added by Guardin as variable wasnt defined
if (!isset($dummy)) { $dummy = ''; } // add by Guardian as variable was not defined
if (!isset($articlecomm)) { $articlecomm = ''; } // add by fkelly as variable was not defined
if (!isset($time2)) { $time2 = ''; } // add by fkelly as variable was not defined
$content = '';
getusrinfo($user);
if ($multilingual == 1) {
if ($categories == 1) {
$querylang = 'where catid=\''.intval($cat).'\' AND (alanguage=\''.$currentlang.'\' OR alanguage=\'\')';
} else {
$querylang = 'where (alanguage=\''.$currentlang.'\' OR alanguage=\'\')';
if ($new_topic != 0) {
$querylang .= ' AND topic=\''.intval($new_topic).'\'';
}
}
} else {
if ($categories == 1) {
$querylang = 'where catid=\''.intval($cat).'\'';
} else {
$querylang = '';
if ($new_topic != 0) {
$querylang = 'WHERE topic=\''.intval($new_topic).'\'';
}
}
}
if (isset($userinfo['storynum']) AND $user_news == 1) {
$storynum = $userinfo['storynum'];
} else {
$storynum = $storyhome;
}
// old table replaced with div
$boxstuff = '<div style="margin:0; padding:0; width:100%">';
$boxTitle = _PASTARTICLES;
$sql = 'SELECT sid, title, time, comments FROM '.$prefix.'_stories '.$querylang.' ORDER BY time DESC LIMIT '.$storynum.', '.$oldnum;
$result = $db->sql_query($sql);
$vari = 0;
// open both slider divs
$boxstuff .= '<div id="scroller_containerX">';
$boxstuff .= '<div class="jscroller2_up jscroller2_speed-20 jscroller2_alternate jscroller2_mousemove" style="white-space:nowrap; margin: 0;">';
i have modified the complete block-file again and put my ul & li example in my first version.
block-Old_Articles.php:
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 $locale, $oldnum, $storynum, $storyhome, $cookie, $categories, $cat, $prefix, $multilingual, $currentlang, $db, $new_topic, $user_news, $userinfo, $user;
if (!isset($see)) {$see = ''; } // added by Guardin as variable wasnt defined
if (!isset($dummy)) { $dummy = ''; } // add by Guardian as variable was not defined
if (!isset($articlecomm)) { $articlecomm = ''; } // add by fkelly as variable was not defined
if (!isset($time2)) { $time2 = ''; } // add by fkelly as variable was not defined
$content = '';
getusrinfo($user);
if ($multilingual == 1) {
if ($categories == 1) {
$querylang = 'where catid=\''.intval($cat).'\' AND (alanguage=\''.$currentlang.'\' OR alanguage=\'\')';
} else {
$querylang = 'where (alanguage=\''.$currentlang.'\' OR alanguage=\'\')';
if ($new_topic != 0) {
$querylang .= ' AND topic=\''.intval($new_topic).'\'';
}
}
} else {
if ($categories == 1) {
$querylang = 'where catid=\''.intval($cat).'\'';
} else {
$querylang = '';
if ($new_topic != 0) {
$querylang = 'WHERE topic=\''.intval($new_topic).'\'';
}
}
}
if (isset($userinfo['storynum']) AND $user_news == 1) {
$storynum = $userinfo['storynum'];
} else {
$storynum = $storyhome;
}
//$boxstuff = '<div style="margin:0; padding:0; width:100%">';
// ul example
$boxstuff = '<ul class="oldarticleUL">';
$boxTitle = _PASTARTICLES;
$sql = 'SELECT sid, title, time, comments FROM '.$prefix.'_stories '.$querylang.' ORDER BY time DESC LIMIT '.$storynum.', '.$oldnum;
$result = $db->sql_query($sql);
$vari = 0;
// open slider divs
// $boxstuff .= '<div id="scroller_containerX">';
// li example
$boxstuff .= '<li id="scroller_containerX">';
$boxstuff .= '<div class="jscroller2_up jscroller2_speed-20 jscroller2_alternate jscroller2_mousemove" style="white-space:nowrap; margin:0;">';
if ($dummy == 1 AND is_active('Stories_Archive')) {
// $boxstuff .= '</div><br /><a href="archive.html"><b>'._OLDERARTICLES.'</b></a>';
// ul example close
$boxstuff .= '</ul><br /><a href="archive.html"><b>'._OLDERARTICLES.'</b></a>';
} else {
// $boxstuff .= '</div>';
// ul example close
$boxstuff .= '</ul>';
}
if ($see == 1) {
$content = $boxstuff;
}
?>
EDIT: i think... i missed the topic name
i tried a another way and added the topictext into this block and if it its active, you can set a char count. if you disable the topic title in the block-file, then you can see only the story title with a own char count seeting.
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 $locale, $oldnum, $storynum, $storyhome, $cookie, $categories, $cat, $prefix, $multilingual, $currentlang, $db, $new_topic, $user_news, $userinfo, $user;
if (!isset($see)) {$see = ''; } // added by Guardin as variable wasnt defined
if (!isset($dummy)) { $dummy = ''; } // add by Guardian as variable was not defined
if (!isset($articlecomm)) { $articlecomm = ''; } // add by fkelly as variable was not defined
if (!isset($time2)) { $time2 = ''; } // add by fkelly as variable was not defined
// block settings: name of the topic before the title
$topictitle_on = 'on'; // set to another one or leave it empty '' and the topicname was not dislayed
$topictitle_on_count = '12'; // set topic title char count, if $topictitle_on = 'on';
$topictitle_on_storytitle_count = '20'; // set story title char count, if $topictitle_on = 'on';
$topictitle_off_storytitle_count = '34'; // set story title char count, if $topictitle_on = '';
$content = '';
getusrinfo($user);
if ($multilingual == 1) {
if ($categories == 1) {
$querylang = 'where catid=\''.intval($cat).'\' AND (alanguage=\''.$currentlang.'\' OR alanguage=\'\')';
} else {
$querylang = 'where (alanguage=\''.$currentlang.'\' OR alanguage=\'\')';
if ($new_topic != 0) {
$querylang .= ' AND topic=\''.intval($new_topic).'\'';
}
}
} else {
if ($categories == 1) {
$querylang = 'where catid=\''.intval($cat).'\'';
} else {
$querylang = '';
if ($new_topic != 0) {
$querylang = 'WHERE topic=\''.intval($new_topic).'\'';
}
}
}
if (isset($userinfo['storynum']) AND $user_news == 1) {
$storynum = $userinfo['storynum'];
} else {
$storynum = $storyhome;
}
//$boxstuff = '<div style="margin:0; padding:0; width:100%">';
// ul example
$boxstuff = '<ul class="oldarticleUL">';
$boxTitle = _PASTARTICLES;
$sql = 'SELECT s.sid, s.title, s.time, s.topic, s.comments, t.topictext, t.topicid FROM '.$prefix.'_stories s LEFT JOIN ' . $prefix . '_topics t ON t.topicid = s.topic '.$querylang.' ORDER BY s.time DESC LIMIT '.$storynum.', '.$oldnum;
$result = $db->sql_query($sql);
$vari = 0;
// open silder divs
// $boxstuff .= '<div id="scroller_containerX">';
// li example
$boxstuff .= '<li id="scroller_containerX">';
$boxstuff .= '<div class="jscroller2_up jscroller2_speed-20 jscroller2_alternate jscroller2_mousemove" style="white-space:nowrap; margin:0;">';
if ($dummy == 1 AND is_active('Stories_Archive')) {
// $boxstuff .= '</div><br /><a href="archive.html"><b>'._OLDERARTICLES.'</b></a>';
// ul example close
$boxstuff .= '</ul><br /><a href="archive.html"><b>'._OLDERARTICLES.'</b></a>';
} else {
// $boxstuff .= '</div>';
// ul example close
$boxstuff .= '</ul>';
}
Joined: Dec 05, 2007 Posts: 201 Location: Tampa, Florida
Posted:
Tue Aug 02, 2011 12:43 am
--- Edited to add "code" tags - Killing-Hours[/quote]
Thanks Killing-Hours --not unusual to forget things at my age --lol
neralex -- thanks for the help --I didn't use all of your changes, but modified mine using some of your changes.
I might point out I am using the same <script type="text/javascript" src="jscroller2-1.61.js"></script> I just shortened the name in my coding.
Your idea to (modify the block without tables and change it to div and spans. now can give the containers css ids or/and classes to change width and height in your theme.) is a good idea.
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