Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Scrolling News

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-15-2007, 07:13 PM
 
nostraduckus nostraduckus is offline
 

Member
  
Join Date: Jan 2007
Posts: 19
 

Default 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)
__________________
ming@rumplequiltskin.com.au
www.rumplequiltskin.com.au
NSW, Australia
X-Cart Version 4.0.19
Reply With Quote
  #2  
Old 03-16-2007, 02:21 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Scrolling News

Just remember that the <marquee> tag is depreciated and only works in IE.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-08-2007, 11:59 AM
  Keys Care's Avatar 
Keys Care Keys Care is offline
 

eXpert
  
Join Date: Feb 2007
Location: Cheyenne - Santa Monica - Oregon
Posts: 214
 

Default 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.

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

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

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

Regards,

Bob
__________________
All-Natural Healing Skin and Pet Care Products
4.6.0 Gold, ShipWorks 3
Reply With Quote
  #4  
Old 04-08-2007, 12:08 PM
  Keys Care's Avatar 
Keys Care Keys Care is offline
 

eXpert
  
Join Date: Feb 2007
Location: Cheyenne - Santa Monica - Oregon
Posts: 214
 

Default 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
__________________
All-Natural Healing Skin and Pet Care Products
4.6.0 Gold, ShipWorks 3
Reply With Quote
  #5  
Old 04-09-2007, 05:17 PM
 
nostraduckus nostraduckus is offline
 

Member
  
Join Date: Jan 2007
Posts: 19
 

Default 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
__________________
ming@rumplequiltskin.com.au
www.rumplequiltskin.com.au
NSW, Australia
X-Cart Version 4.0.19
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:37 PM.

   

 
X-Cart forums © 2001-2020