TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,985
  • Total Topics: 21,321
  • Online today: 781
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 506
  • Total: 506

Scrolling Recent Topics Block

Started by HaxXxoR, April 06, 2006, 02:17:55 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

joybreezy

Quote from: HaxXxoR on April 06, 2006, 08:57:08 PM
This is the code that i used;

SMF_ROOT/Themes/default/TPortalBlocks.template.php find;

Quote
echo '<div style="width: 100%; overflow: hidden;">';
    foreach($what as $w){

above add;

Quoteecho '<marquee  behavior="scroll" direction="up" height="200px" scrolldelay=" 10" scrollamount=" 1" onmouseover="this.stop()" onmouseout="this.start()">';

then find;

Quote$counter++;
    }
    echo '</div>';
}

and replace with;

Quote$counter++;
    }
    echo '</div></marquee>';

}



Thats why I am confused as well because based on this code instruction I went and found the lines listed and placed the new code above or below.    That is when I noticed that under TPcategories is where the first line that I am suppose to put code "above" is listed.   

IchBin

Well its off, but not by much. Look for this for the first part. Suprised you didn't see the similarities. :)

<div style="width: 100%; ' , $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , '">';
foreach($what as $w){

joybreezy

LOL.. thanks so much!!! I'm learning as I go along!!!  Thanks again for your help on this!!

yeshaib

IceBin - I have the same code you have with SMF 1.1.1 and TP 0.98
And I get this error message all the time never mind what I try to add or change
154: $counter=1; $cmax=count($what);
155: echo '<marquee  behavior="scroll" direction="up" height="200px" scrolldelay=" 10" scrollamount=" 1" onmouseover="this.stop()" onmouseout="this.start()">';

156: <div style="width: 100%; ' , $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , '">';

157: foreach($what as $w){
158


I must say that my system is running in Hebrew

www.my-audio.net

IchBin

I don't think you can scroll the div. You have to put the marquee around the text if I remember right. The error (since you didn't post what it is), I assume is from a bad formed echo statement. All echos have to start and end with certain code.
http://www.ichbin.us/index.php?topic=19.0

yeshaib

What do you need me to post for you?
I can do the same thing on my test site so you can see the error.

Thank you
Yeshai

IchBin

You said you get an error all the time, what error is it?

tamasir

IchBin!
Help!!!
My site Scrolling Recent Topics Block:
Default theme:
He works well.

Tolkien theme:
The text increasingly smaller.
Thank you
tamasir~

IchBin

lol, what a strange affect. Can you post the code you're using?

tamasir

#49
// TPortal recent topics block
function TPortal_recentbox()
{
global $context, $settings, $options, $txt , $modSettings;

    // is it a number?
if(!is_numeric($context['TPortal']['recentboxnum']))
$context['TPortal']['recentboxnum']='10';

// leave out the recycle board, if any
if(isset($modSettings['recycle_board']))
$bb=array($modSettings['recycle_board']);
else
$bb=array();

$what=ssi_recentTopics($num_recent = $context['TPortal']['recentboxnum'], $bb, $output_method = 'array');
// Output the topics
$counter=1; $cmax=count($what);
echo '
<div style="width: 100%; ' , $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , '">';


echo '<marquee  behavior="scroll" direction="up" height="170px" scrolldelay=" 10" scrollamount=" 1" onmouseover="this.stop()" onmouseout="this.start()">';

foreach($what as $w){
echo '
<div class="smalltext">
<a href="'.$w['href'].'">'.$w['short_subject'].'</a>
</div>
<div class="smalltext">', $txt[525], ' <b>', $w['poster']['link'], '</b></div>
<div class="smalltext">';
if(!$w['new'])
echo '<a href="'.$w['href'].'"><img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';



if($counter != $cmax)
echo '<hr />';
$counter++;
}
echo '
</marquee></div>';
}

I use this. :-\
My tinyporta/Tolkien theme:
http://freewebsablon.hu/forum/index.php?theme=99
tamasir~

This website is proudly hosted on Crocweb Cloud Website Hosting.