News: When asking for support, it helps us and you, if you read the Posting Guidelines

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

February 21, 2020, 02:04:05 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189508
  • Total Topics: 20801
  • Online Today: 191
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 1
Guests: 182
Total: 183

Author Topic: [php] Block "Scrolling Marquee Recent topics"  (Read 19221 times)

0 Members and 1 Guest are viewing this topic.

Offline rocknroller

  • Better to live 100 years as a millionaire than 7 days in misery.
  • Jr. Member
  • **
  • Posts: 33
  • Mini chat HR
    • Mini Chat - Domaca Pricaonica
[php] Block "Scrolling Marquee Recent topics"
« on: March 21, 2012, 10:22:26 AM »
Hello everyone, this is my first post here, so to contribute something.
if this isn't right place moderators please move it.

Add this code into php block. Remove body and title from block, put it in top, upper, bottom or lower block. It's really nice way to show recent posts and does not occupy much space.

Code: [Select]
global $settings, $txt, $scripturl, $post;
$array = ssi_recentTopics(16, null, null, 'array');
echo '<marquee scrollamount="3" class="moving" onmouseover="this.stop()" onmouseout="this.start()">';
foreach ($array as $post)
{              if (!empty($post['new']) )
                    echo'';
                else
                    echo'<img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />';echo'<div class="triangle-isosceles" id="a', $post['topic'], '" style="display: none">', $post['preview'], '</div><a href="'. $post['href']. '" target="_self" onmouseover="document.getElementById(\'a', $post['topic'], '\').style.display = \'block\'" onmouseout="document.getElementById(\'a', $post['topic'], '\').style.display = \'none\'">', $post['short_subject'], '</a>';
}
echo '</marquee>
<style type="text/css">
marquee.moving a
{
     font-size:12px;
     font-weight:bold;
     margin-right:50px;
}
.triangle-isosceles {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index:1000;
    padding:15px;
    margin:1em 0 3em;
    color:#fff;
    max-width: 400px;
    border: 1px solid #ccc;
    -moz-border-radius:10px;
    -webkit-border-radius:10px;
    border-radius:10px;
    -moz-box-shadow: 1px 1px 0px 0px #777;
    -webkit-box-shadow: 1px 1px 0px 0px #777;
    box-shadow: 1px 1px 0px 0px #777;
    background: -moz-linear-gradient(top, rgba(41,137,216,0.9) 0%, rgba(30,87,153,0.9) 94%, rgba(30,87,153,0.9) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(41,137,216,0.9)), color-stop(94%,rgba(30,87,153,0.9)), color-stop(100%,rgba(30,87,153,0.9)));
    background: -webkit-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: -o-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: -ms-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
}
</style>';


*block uses marquee tah which is not XHTML vaild
*block uses CSS3


« Last Edit: March 22, 2012, 09:47:06 AM by rocknroller »
Tražite li mjesto za opuštanje, zabavu, Besplatno Upoznavanje, brbljanje i pricanje tu je Mini Chat HR, Domaci sajt sadrži sobe za druženje tj. chat za mobitel, isto kao i za stolna racunala. I to bez prijave email adrese, najbolje pricaonice su MiniChatHR.com

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: [php] Block "Scrolling Marquee Recent topics"
« Reply #1 on: March 22, 2012, 04:29:24 AM »
rocknroller,

The first line in your code is not necessary and will cause an error in the block.  Also, I have edited the subject of your topic ...

Code: (Remove from code) [Select]
require_once('SSI.php');
Other than that, nice job. O0

ZarPrime

Offline rocknroller

  • Better to live 100 years as a millionaire than 7 days in misery.
  • Jr. Member
  • **
  • Posts: 33
  • Mini chat HR
    • Mini Chat - Domaca Pricaonica
Re: [php] Block "Scrolling Marquee Recent topics"
« Reply #2 on: March 22, 2012, 09:48:08 AM »
Removed, thank you.
Tražite li mjesto za opuštanje, zabavu, Besplatno Upoznavanje, brbljanje i pricanje tu je Mini Chat HR, Domaci sajt sadrži sobe za druženje tj. chat za mobitel, isto kao i za stolna racunala. I to bez prijave email adrese, najbolje pricaonice su MiniChatHR.com