X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Scrolling News (https://forum.x-cart.com/showthread.php?t=29718)

nostraduckus 03-15-2007 07:13 PM

Scrolling News
 
change your today_news.tpl to this:

Code:

{* $Id: today_news.tpl,v 1.10.2.1 2005/09/21 05:41:51 mclap Exp $ *}

<marquee scrollamount="1" scrolldelay="65" direction="up" width="176" height="150" style="font-family: Verdana; font-size: 8pt">

{if $news_message eq ""}
{$lng.txt_no_news_available}
{else}
<B>{$news_message.send_date|date_format:$config.Appearance.date_format}</B><BR>
{$news_message.body}
<BR><BR>
{if $usertype eq "C"}
<A href="news.php" class="SmallNote">{$lng.lbl_previous_news}</A>
{/if}
{/if}
{if $is_news_subscribeable eq 'Y'}
<HR size="1" noshade class="VertMenuHr">

</marquee>
{/if}



This will scroll the most current news item..havent figured out how to scroll previous ones, other than to copy and paste the text in between the <marquee> tags..(not the most efficient way)

balinor 03-16-2007 02:21 AM

Re: Scrolling News
 
Just remember that the <marquee> tag is depreciated and only works in IE.

Keys Care 04-08-2007 11:59 AM

Re: Scrolling News
 
Hi, I added your code and it looks good except that it also scrolls the email entry box and the subscribe button. 8O

It sort of looks like one of those banner games trying to enter the email address and submit on the fly :lol:

I tried inserting your code, but it still scrolls everything.

Would like to know your progress on older news scrolling as well.

Regards,

Bob

Keys Care 04-08-2007 12:08 PM

Re: Scrolling News
 
Thought about it some more and moved the </marquee> up in the stack. Here is the revised code.

Code:


{* $Id: today_news.tpl,v 1.10.2.1 2005/09/21 05:41:51 mclap Exp $ *}
<marquee scrollamount="1" scrolldelay="65" direction="up" width="176" height="150" style="font-family: Verdana; font-size: 8pt">
{if $news_message eq ""}
{$lng.txt_no_news_available}
{else}
<B>{$news_message.send_date|date_format:$config.Appearance.date_format}</B><BR>
{$news_message.body}
</marquee>
<br /><br />
{if $usertype eq "C"}
<a href="news.php" class="SmallNote">{$lng.lbl_previous_news}</a>
{/if}
{/if}
<br /><br />
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="VertMenuHr"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td>
</tr>
</table>
<font style="font-size: 8px;"><br /></font>


Now the message only scrolls leaving the email box and subscribe button.

Ant ideas of how to add more than one news point would be appreciated.

Regards,

Bob

nostraduckus 04-09-2007 05:17 PM

Re: Scrolling News
 
cool, glad it worked for you. does it work on most browsers for you? its working in firefox and internet explorer for me, havent tested the other ones. to show other news items that are in your database i assume you would have to call the news.php...but im not sure on the coding :(


All times are GMT -8. The time now is 05:35 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.