TinyPortal

Development => Support => Topic started by: MetalHellsangel on February 23, 2006, 09:10:20 AM

Title: I Figured it out, Scrolling recent posts!!
Post by: MetalHellsangel on February 23, 2006, 09:10:20 AM
It was so simple I felt stupid taking so long to figure it out...lol

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

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

before add

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

then find

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

}

and replace with

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

}
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: crip on February 23, 2006, 10:37:19 AM
Cool, good job. 8)
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: tattooedpierre on February 24, 2006, 07:31:23 AM
Thanks so much ;)
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: MetalHellsangel on February 24, 2006, 07:32:47 AM
Your very Welcome :D
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: clickbouyow on February 24, 2006, 06:39:16 PM
Where is this file?  TPortalBlocks.template.php?  I don't see it.
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: TwinsX2Dad on February 24, 2006, 09:40:12 PM
It is in your default themes folder.

/smf/Themes/default/
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: clickbouyow on February 25, 2006, 11:41:31 AM
Thanks,  But there is no statement like posted in that file.  Close enough but very different.
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: G6Cad on February 25, 2006, 01:13:35 PM
You dont have to change the whole block, just add this line .

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

Right after this, just make sure you add it AFTER and between the clamps

    foreach($what as $w){
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: whoesa on March 02, 2006, 10:48:30 AM
I tryed some things but all the right blocks are scrolling then??

I find this code:

    // Output the topics
$counter=1; $cmax=count($what);
echo '<div style="width: 100%; overflow: hidden;">';
foreach($what as $w){
echo '<div style="white-space: nowrap;" class="smalltext">
<a href="'.$w['href'].'">'.$w['short_subject'].'</a>
</div>
<div class="smalltext">', $txt[525], ' ', $w['poster']['link'], '</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> ';

echo '['.$w['time'].']</div>';


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


Can you tell me where to putt that line exactly please?

Thank you
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: MetalHellsangel on March 02, 2006, 10:50:39 AM
The Code I have above is rewrite of that area you can find the lines in TPortalBlocks.template.php  and just replace it with the code provided (ie follow the instructions up top)

Angel
Title: Re: I Figured it out, Scrolling recent posts!!
Post by: MetalHellsangel on March 15, 2006, 11:02:15 PM
Ok I revamped my post above and made it eaiser to follow, (I also fixed the typo's) so you should be able to follow the instructions a little eaiser.

Angel