Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Extra text box for announcements in middle of home page


websta

Recommended Posts

Posted

Greetings,

 

My client wants an admin-area-accessible place to add comments on the homepage (for users and for SEO).

 

Any suggestions for contributions, or alternate approaches are appreciated! :unsure:

 

I installed the Krika News contribution and now have two repeating versions of the main text, and although the English_news.txt file was appropriately updated, it is not appearing on the homepage. :blush: No clue what's wrong...

 

See the problem on the site here.

 

Help me Techie-Wan Kenobi! You're my only hope!

Posted

I figured it out. There is a problem in the instructions in Krika News.

 

This is how the inserted text in includes/languages/english.php should read:

 

//aqu? defines los textos en tu idioma

define('TABLE_HEADING_NEWS', 'Announcements');

define('TEXT_NEWS', $news_text =( implode ('', file( 'English_news.txt' ) ) ) );

Posted

And the code on catalog/index.php should end up reading like this:

 

<tr>

<td class="main"><?php echo TEXT_MAIN; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<!-- new -->

<tr>

<td class="main"><?php include(DIR_WS_MODULES . FILENAME_NEWS); ?>

</td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

</tr>

  • 4 weeks later...
Posted

Hello, I'm using this contribution with "Scroll in news - size of the box 160px" fix.. but scrolling isn't stopping in Opera browser.. In FireFox and in IE everything is fine. Has someone have fix for this? Thanks.

 

PS. Sorry for my English.

Posted

Hi, It's me again :D

 

I fixed this problem with Opera (and Nescape) B) - for that browser we must use manual scrolling.

 

Right code for module news.php below:

 

<?php
/*
 $Id: news.php,v1.0 2004/05/10 22:50:51 

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<head>
<style type="text/css">

#marqueecontainer{
position: relative;
width: 98%; /*marquee width */
height: 160px; /*marquee height */
background-color: white;
overflow: hidden;
border: 3px solid white;
padding: 2px;
padding-left: 4px;
}

</style>

<script type="text/javascript">

/***********************************************
* Cross browser Marquee II- ? Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee


</script>
</head>

<!-- scroller //-->
	  <tr>
		<td>
<?php

 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left', 'text' => TABLE_HEADING_NEWS);

new contentBoxHeading($info_box_contents);

 $info_box_contents = array();
 $row = 0;
 $col = 0;
 $info_box_contents[$row][$col] = array('align' => 'left',
									   'text'  => '<left><div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"><div id="vmarquee" style="position: absolute; width: 98%;">'. TEXT_NEWS . '</div></div></left>');

 new contentBox($info_box_contents);

?>

	   </td>
	  </tr>
<!-- links_eof //-->

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...