Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
zacklk
Regular
Regular



Joined: Mar 06, 2010
Posts: 79

PostPosted: Fri Aug 27, 2010 11:23 pm Reply with quote

Hi Mr.Raven i was wondering whether u can give me the code of scrolling old articles block on ur home page. thank you.
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Sat Aug 28, 2010 2:21 am Reply with quote

Have you looked in the downloads section here?
 
View user's profile Send private message
bobbyg
Worker
Worker



Joined: Dec 05, 2007
Posts: 212
Location: Tampa, Florida

PostPosted: Sat Jul 30, 2011 8:46 pm Reply with quote

I am using [ Only registered users can see links on this board! Get registered or login! ] for several blocks on [ Only registered users can see links on this board! Get registered or login! ] 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;

while (list($sid, $title, $time, $comments) = $db->sql_fetchrow($result)) {
    $sid = intval($sid);
    $title = stripslashes($title);
    $see = 1;
    setlocale(LC_TIME, $locale);
    ereg ('([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})', $time, $datetime2);
    $datetime2 = strftime(_DATESTRING2, mktime($datetime2[4],$datetime2[5],$datetime2[6],$datetime2[2],$datetime2[3],$datetime2[1]));
    $datetime2 = ucfirst($datetime2);
    if ($articlecomm == 1) {
        $comments = '('.$comments.')';
    } else {
        $comments = '';
    }
    if($time2==$datetime2) {
        $boxstuff .= '<tr><td valign="top"><strong><big>&middot;</big></strong></td><td> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</td></tr>';
    } else {
        if(empty($a)) {
            $boxstuff .= '<tr><td colspan="2"><b>'.$datetime2.'</b></td></tr><tr><td valign="top"><strong><big>&middot;</big></strong></td><td> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</td></tr>';
            $time2 = $datetime2;
            $a = 1;
        } else {
            $boxstuff .= '<tr><td colspan="2"><b>'.$datetime2.'</b></td></tr><tr><td valign="top"><strong><big>&middot;</big></strong></td><td> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</td></tr>';
            $time2 = $datetime2;
        }
    }
    $vari++;
    if ($vari==$oldnum) {
        $min = $oldnum + $storynum;
        $dummy = 1;
    }
}

if ($dummy == 1 AND is_active('Stories_Archive')) {
    $boxstuff .= '</table><br /><a href="archive.html"><b>'._OLDERARTICLES.'</b></a>';
} else {
    $boxstuff .= '</table>';
}

if ($see == 1) {
    $content = $boxstuff;
}
[b]$content .= ' </div></div>'."\n";[/b]?>


--- Edited to add "code" tags - Killing-Hours
 
View user's profile Send private message Visit poster's website
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Sun Jul 31, 2011 6:06 pm Reply with quote

bobbyg wrote:
I am using [ Only registered users can see links on this board! Get registered or login! ] for several blocks on [ Only registered users can see links on this board! Get registered or login! ] 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.

RavensScripts
 
View user's profile Send private message
bobbyg







PostPosted: Mon Aug 01, 2011 3:55 am Reply with quote

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.
 
neralex







PostPosted: Mon Aug 01, 2011 2:13 pm Reply with quote

bobbyg wrote:
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:
Code:
<script type="text/javascript" src="jscroller2.js"></script>


notice:
for all others who read this thread. i use in my example the js-file from the authors page:
[ Only registered users can see links on this board! Get registered or login! ]

Code:
<script type="text/javascript" src="jscroller2-1.61.js"></script>


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;">';
   
while (list($sid, $title, $time, $comments) = $db->sql_fetchrow($result)) {
    $sid = intval($sid);
    $title = stripslashes($title);
    $see = 1;
    setlocale(LC_TIME, $locale);
    ereg ('([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})', $time, $datetime2);
    $datetime2 = strftime(_DATESTRING2, mktime($datetime2[4],$datetime2[5],$datetime2[6],$datetime2[2],$datetime2[3],$datetime2[1]));
    $datetime2 = ucfirst($datetime2);


    if ($articlecomm == 1) {
        $comments = '('.$comments.')';
    } else {
        $comments = '';
    }
    if($time2==$datetime2) {
      
    $boxstuff .= '<span><strong><big>&middot;</big></strong> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</span>';      
    $boxstuff .= '<br />';
    } else {
        if(empty($a)) {
         
    $boxstuff .= '<span><b>'.$datetime2.'</b><br />';
    $boxstuff .= '<strong><big>&middot;</big></strong> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</span>';
            $boxstuff .= '<br />';   
            $time2 = $datetime2;
            $a = 1;
        } else {
         $boxstuff .= '<span><b>'.$datetime2.'</b><br />';
            $boxstuff .= '<strong><big>&middot;</big></strong> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</span>';
            $boxstuff .= '<br />';
            $time2 = $datetime2;
        }
    }
    $vari++;
    if ($vari==$oldnum) {
        $min = $oldnum + $storynum;
        $dummy = 1;
    }
}
// close both slider divs
   $boxstuff .= '</div>';
   $boxstuff .= '</div>';
   
if ($dummy == 1 AND is_active('Stories_Archive')) {
    $boxstuff .= '</div><br /><a href="archive.html"><b>'._OLDERARTICLES.'</b></a>';
} else {
    $boxstuff .= '</div>';
}

if ($see == 1) {
    $content = $boxstuff;
}
   
?>


css-code:
Code:
#scroller_containerX {width:168px; height:100px; margin-left:3px; overflow:hidden;}

#scroller_containerX {overflow:auto; height:100px; width:168px; overflow-x:hidden; overflow-y:hidden;}



EDIT: i think... for myself... to much divs Smile

i tried a another modify of this block and changed to ul & li with one div.

at 1st, i added a new css-class into the css-file of my theme. (if you don't need clear:both; (no floating before), delete it.):
Code:
.oldarticleUL {clear:both; margin:0; padding:0; list-style:none;}


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;">';
   
while (list($sid, $title, $time, $comments) = $db->sql_fetchrow($result)) {
    $sid = intval($sid);
    $title = stripslashes($title);
    $see = 1;

    setlocale(LC_TIME, $locale);

// set new timestamp
//   $tempstamp = new DateTime($time);
//   $newtstamp = $tempstamp->format('l, d.m.Y');

   
    ereg ('([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})', $time, $datetime2);
    $datetime2 = strftime(_DATESTRING2, mktime($datetime2[4],$datetime2[5],$datetime2[6],$datetime2[2],$datetime2[3],$datetime2[1]));
    $datetime2 = ucfirst($datetime2);


    if ($articlecomm == 1) {
        $comments = '('.$comments.')';
    } else {
        $comments = '';
    }
    if($time2==$datetime2) {
      
    $boxstuff .= '<span><strong><big>&middot;</big></strong> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</span><br />';

    } else {
        if(empty($a)) {
         
          $boxstuff .= '<span><b>'.$datetime2.'</b><br />';
             $boxstuff .= '<strong><big>&middot;</big></strong> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</span><br />';   
            $time2 = $datetime2;
            $a = 1;         
        } else {
         $boxstuff .= '<span><b>'.$datetime2.'</b><br />';
            $boxstuff .= '<strong><big>&middot;</big></strong> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'">'.$title.'</a> '.$comments.'</span><br />';
            $time2 = $datetime2;
        }
    }
    $vari++;
    if ($vari==$oldnum) {
        $min = $oldnum + $storynum;
        $dummy = 1;
    }
}
// close slider divs
//   $boxstuff .= '</div>';
   $boxstuff .= '</div>';
// li example close   
   $boxstuff .= '</li>';
   
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 Smile

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;">';
   
while (list($sid, $title, $time, $topic, $topictext, $topicid, $comments) = $db->sql_fetchrow($result)) {
    $sid = intval($sid);
   
   if ($topictitle_on == 'on') {
    $topic2 = stripslashes($topicid);
    $topictitle = stripslashes($topicid);   
      if  ($topic2 != "") {
          if(strlen($topic2) > $topictitle_on_count) {   
          $topic2 = substr($topic2,0, $topictitle_on_count-2)."..";    
          }      
      }
    $title = stripslashes($title);
    $storytitle = stripslashes($title);      
      if  ($title != "") {
          if(strlen($title) > $topictitle_on_storytitle_count) {   
          $title = substr($title,0, $topictitle_on_storytitle_count-2)."..";    
          }      
      }            
   $topicname_on = '<a href="modules.php?name=News&amp;new_topic='.$topic.'" title="'.$topictitle.'">'.$topic2.'</a> ';
    } else {   
   $topicname_on = '';
    $title = stripslashes($title);
    $storytitle = stripslashes($title);      
      if  ($title != "") {
          if(strlen($title) > $topictitle_off_storytitle_count) {   
          $title = substr($title,0, $topictitle_off_storytitle_count-2)."..";    
          }      
      }
    }   
         
    $see = 1;

    setlocale(LC_TIME, $locale);
   
    ereg ('([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})', $time, $datetime2);
    $datetime2 = strftime(_DATESTRING2, mktime($datetime2[4],$datetime2[5],$datetime2[6],$datetime2[2],$datetime2[3],$datetime2[1]));
    $datetime2 = ucfirst($datetime2);


    if ($articlecomm == 1) {
        $comments = '<br />('.$comments.')';
    } else {
        $comments = '';
    }
    if($time2==$datetime2) {
      
    $boxstuff .= '<span>'.$topicname_on.'<small>&bull;</small> <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'" title="'.$storytitle.'">'.$title.'</a> '.$comments.'</span><br />';

    } else {
        if(empty($a)) {
         
          $boxstuff .= '<span><b>'.$datetime2.'</b><br />';
             $boxstuff .= ''.$topicname_on.'<small>&bull;</small>  <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'" title="'.$storytitle.'">'.$title.'</a> '.$comments.'</span><br />';   
            $time2 = $datetime2;
            $a = 1;         
        } else {
         $boxstuff .= '<span><b>'.$datetime2.'</b><br />';
            $boxstuff .= ''.$topicname_on.'<small>&bull;</small>  <a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.'" title="'.$storytitle.'">'.$title.'</a> '.$comments.'</span><br />';
            $time2 = $datetime2;
        }
    }
    $vari++;
    if ($vari==$oldnum) {
        $min = $oldnum + $storynum;
        $dummy = 1;
    }
}
// close silder divs
//   $boxstuff .= '</div>';
   $boxstuff .= '</div>';
// li example close   
   $boxstuff .= '</li>';
   
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;
}
   
?>


Wink
 
bobbyg







PostPosted: Tue Aug 02, 2011 12:43 am Reply with quote

--- 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.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©