![]() ![]() |
About the News List 1.0 Block, News not in list but scrolling (MARQUEE) |
Apr 17 2010, 01:12 AM
Post
#1
|
|
|
Group: Members Posts: 2 Joined: 17-April 10 Member No.: 300 ![]() |
Hi,
I downloaded the News List 1.0 Block and i want to ask you if it is possimble to show the news in one line scrolling with MARQUEE. I tryed to edit the block but the news are scrolling all together and not in one line, one by one. Thanks in advance. Regards, Vagelis. |
|
|
|
Apr 21 2010, 07:10 AM
Post
#2
|
|
![]() Group: Administrators Posts: 546 Joined: 12-September 03 From: Earth Member No.: 193 ![]() |
Hello Vagelis-
I do not have MKPortal installed anywhere so I can't test this. But this example should work (in some browsers) using the "marquee" tag. Just change the attribute values in the marquee tag to whatever you need. CODE <? /* +-------------------------------------------------------------------------- | News List 1.0 Block for MKPortal 1.0 09.09.2005 | by visiblesoul <Don K. Colburn> | Copyright (c) 2005 visiblesoul.net | http://www.visiblesoul.net +-------------------------------------------------------------------------- | This is a very simple block. | It displays only the news title and category with minimal formatting. +-------------------------------------------------------------------------- */ $cutoff = 50; //how many characters to display in title $limit = 5; //how many news items to display if (!$limit) { $limit = 5; } $content = " <tr> <td><marquee behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"150\" scrollamount= \"1\" scrolldelay= \"5\" onmouseover='this.stop()' onmouseout='this.start()'> <table> "; $link_user = $mklib_board->forum_link("profile"); $query = $DB->query( "SELECT id, titolo FROM mkp_news_sections ORDER BY `id` DESC"); while( $row = $DB->fetch_row($query) ) { $idcat = $row['id']; $categoria[$idcat]['titolo'] = $row['titolo']; } $query1 = $DB->query( "SELECT id, idcategoria, titolo FROM mkp_news WHERE validate = '1' ORDER BY `id` DESC LIMIT $limit"); while( $row = $DB->fetch_row($query1) ) { $idcategoria = $row['idcategoria']; $titolo = stripslashes($row['titolo']); $sezione = $categoria[$idcategoria]['titolo']; if (strlen($titolo) > $cutoff) { $titolo = substr( $titolo,0,($cutoff - 3) ) . "..."; $titolo = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$titolo); } $content .= " <tr> <td width=\"20%\" nowrap=\"nowrap\" style=\"padding-right: 3px;\">[$sezione]</td> <td width=\"80%\"><a style=\"font-weight: bold;\" href=\"index.php?ind=news&op=news_show_single&ide={$row['id']}\">$titolo</a></td> </tr> "; } $content .= " </table> </marquee></td> </tr> "; unset($row); unset($idcat); unset($categoria); unset($query); unset($query1); unset($idcategoria); unset($titolo); unset($sezione); ?> It's better to create scrolling using javascript but I don;t have any good code for that off the top of my head. --------------------
Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks. Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk. "If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard |
|
|
|
Apr 21 2010, 07:34 AM
Post
#3
|
|
|
Group: Members Posts: 2 Joined: 17-April 10 Member No.: 300 ![]() |
Hi and thanks for your answer.
That i need is something like ticker to show the latest news in one line one by one. I want to replace the shoutbox with thi ticker script. If you can do it for me, i will pay as much you want. Just a script to replace the shoutbox with this. Inform me if you can do it and how much you want me to pay. Have a look on this http://www.madata.gr/ site ont the top the ticker. Best Regards, Vagelis. |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
| Lo-Fi Version | Time is now: 6th September 2010 - 07:46 PM |





Apr 17 2010, 01:12 AM





