Jump to content
De Dokta

Latest News Rotator Multilingual 1.0 BS

Recommended Posts

Hi
 
I made a new version of my Latest News Multilingual Addon (http://addons.oscommerce.com/info/9147) as content module for BS-Gold.

 

It displays news in a sliding or fading carousel which you can install on the index page or in the header area.

With the exception of the index.php, which by default has (still) no hook, no core files must be changed.
 

Download here: http://addons.oscommerce.com/info/9314

Demo here: http://www.video-stuff.de/demo/bootstrap

 

Pls. report any problems, bugs etc. here.
 
J.J.

Share this post


Link to post
Share on other sites

Hi,

 

several bugs:

 

1. when database is empty the index page is displayed wrong (Unbenannt2)

 -> when i put something in the database (entries) the News bar is displayed correctly

2. in admin area changes are not possible (Unbenannt)

 

<div id="contentText">

    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading">News / Announcements</td>
            <td class="pageHeading" align="right"><img src="images/pixel_trans.gif" border="0" alt="" width="57" height="40" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><img src="images/pixel_trans.gif" border="0" alt="" width="1" height="10" /></td>
      </tr>
      <tr><form name="new_news" action="http://www.rubberfashion.de/XXX/latest_news.php?action=update"method="post" enctype="multipart/form-data"><input type="hidden" name="news_id" value="1" />        <td><table border="0" cellspacing="0" cellpadding="2">
          
                    <tr>
            <td class="main">Headline</td>
            <td class="main">

post-336108-0-63418000-1432063416_thumb.png

post-336108-0-79888900-1432063527_thumb.png

Share this post


Link to post
Share on other sites

additional, but very small bug:

 

in Admin directory folder "deutsch" nict, but in most cases it is german :)

Share this post


Link to post
Share on other sites

@@rubberfashion

 

Thanks for your feedback.

You are right! These are bugs! :x

I've uploaded a new package where these bugs are fixed. In your case pls. replace \includes\modules\content\index\cm_news_carousel.php and admin\latest_news.php with the files from the new package.

 

J.J.

Share this post


Link to post
Share on other sites

Hi additional bug in the preview of a picture:

 

Thanks for quick answer. :)

post-336108-0-25046800-1432138774_thumb.png

Edited by rubberfashion

Share this post


Link to post
Share on other sites

Bug: cm_news_carousel.php

 

Line 70: $content = substr($content, 0, strrpos($content, ' ')) . '…<strong> '. TEXT_READ_MORE . '</strong>';

 

TEXT_READ_MORE not defined. Maybe a button (Reviews) would be nice.

 

<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, 'products_id=' . (int)$reviews['products_id']) . '"><span class="pull-right label label-info">' . REVIEWS_TEXT_READ_MORE . '</span></a>

Share this post


Link to post
Share on other sites

No bug, but can you add some space (cellspacing) to the news displaying.

-> move the news more in the center

 

i tryed to use html zu move the text, but the title is not moving.

post-336108-0-87718200-1432141595_thumb.png

Share this post


Link to post
Share on other sites

Bug: i guess the scroller was used from another modul.

When you add more items with scrolling some of the letters can not be read because of a white dot.

Also when you have different news the high of the news box change very often.

 

see: http://www.rubberfashion.de/index.php?language=ge

 

Possibility to set up a certain high or calculate the max high of all news :)

 

 

THANKS FOR YOUR SUPPORT.

 

Sorry for the many posts, but i am testing :)

post-336108-0-20019500-1432143297_thumb.png

Edited by rubberfashion

Share this post


Link to post
Share on other sites

Bug: cm_news_carousel.php

 

Line 70: $content = substr($content, 0, strrpos($content, ' ')) . '…<strong> '. TEXT_READ_MORE . '</strong>';

 

TEXT_READ_MORE not defined. Maybe a button (Reviews) would be nice.

 

<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, 'products_id=' . (int)$reviews['products_id']) . '"><span class="pull-right label label-info">' . REVIEWS_TEXT_READ_MORE . '</span></a>

 

i mean here like it is done in Reviews. Not refer to reviews. Sorry for confusion.

Share this post


Link to post
Share on other sites

Hi additional bug in the preview of a picture:

 

Thanks for quick answer. :)

 

What bug?

 

post-315569-0-61361500-1432145663_thumb.jpg

 

That has nothing to do with Latest news but with ckeditor. May be you use another version of ckeditor than me?!

 

J.J.

Share this post


Link to post
Share on other sites

No bug, but can you add some space (cellspacing) to the news displaying.

-> move the news more in the center

 

i tryed to use html zu move the text, but the title is not moving.

 

If I look at your site it seems that you forgot to add the css settings to your user.css.

Share this post


Link to post
Share on other sites

What bug?

 

attachicon.gifckeditor.jpg

 

That has nothing to do with Latest news but with ckeditor. May be you use another version of ckeditor than me?!

 

J.J.

 

Hi,

 

i mean the text in the preview window. But i also see that it is also a problem of ckeditor as you said.

Share this post


Link to post
Share on other sites

If I look at your site it seems that you forgot to add the css settings to your user.css.

 

Hi

 

Thanks for your help.

 

This was the problem.

Share this post


Link to post
Share on other sites

Hi again,

 

after checking W3C i got 3 errors:

 

The problem is when you insert links (<a>) in the news text.

 

The entry is displayed as a fully link. When you insert a link you will have a double open a-tag.

 

W3C Error: <a> Start tag a seen but an element of the same type was already open.

 

https://validator.w3.org/check?uri=http%3A%2F%2Fwww.rubberfashion.de%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices

Edited by rubberfashion

Share this post


Link to post
Share on other sites

Hi again,

 

after checking W3C i got 3 errors:

 

The problem is when you insert links (<a>) in the news text.

 

The entry is displayed as a fully link. When you insert a link you will have a double open a-tag.

 

W3C Error: <a> Start tag a seen but an element of the same type was already open.

 

Hi

 

This is indeed a problem: the news rotator has already a built in link <a href> because I wanted to link from the displayed news in the rotator (which may be truncated) to the respective (complete) news in the news module.

If you want to use the rotator for something different e.g. to display some new products with a link to the respective product page, you should remove this built in link ( $wrapper_slides .= '<a href="' . tep_href_link('latest_news.php', 'news_id=' . $latest_news['news_id'], $request_type) . '">'; and $wrapper_slides .= '</a>';) from the module!

 

J.J.

 

 

Share this post


Link to post
Share on other sites

Another problem is, if the news text consists html you will also get W3C problems or cuttet HTML code.

Now the headline is only wrapped as a link.

 

Also TEXT_READ_MORE is already not defined!

 

This will solve the problem:

 

            $wrapper_slides .= '<a href="' . tep_href_link('latest_news.php', 'news_id=' . $latest_news['news_id'], $request_type) . '">';
            
            $wrapper_slides .= '<div class="carousel-text"><strong>' . $latest_news['headline'] . '</strong><span class="pull-right"><i>' . sprintf(TEXT_NEWS_DATE_ADDED, tep_date_short($latest_news['date_added'])) . '</i></span>' . '</div>';
            
            $wrapper_slides .= '</a>';
            
            $text_lenght = strlen($latest_news['content']);
            
            if($latest_news['content'] != strip_tags($latest_news['content'])) {
            $content = $latest_news['content'];
            }
            else
            {
            if($text_lenght > '1100') {
            
            $content = truncateHtml($latest_news['content'], 800);
            $content = substr($content, 0, strrpos($content, ' ')) . '><strong> '. TEXT_READ_MORE . '</strong>';
            } else {
            $content = $latest_news['content'];
            }
            }
            $wrapper_slides .= '<div class="carousel-text">' . $content .'</div>';
            
            //$wrapper_slides .= '</a>';
 

 

 

Share this post


Link to post
Share on other sites

Anyone can do with addons what he thinks to be good or properly.

For me your changes make no sense: The average user expects when he reads the note "read more", that a click on this note leads him somewhere. No one would think to click on the headline in that case!

Share this post


Link to post
Share on other sites

@@rubberfashion

I'm looking at theis addon, and can't get it to work as you have in your shop.  Can you post here any changes you made?

 

Hope you can help

 

re

 

No bug, but can you add some space (cellspacing) to the news displaying.

-> move the news more in the center

 

i tryed to use html zu move the text, but the title is not moving.

 

thanks

mike


osC BS gold live - osC CE in development (awesome)

Share this post


Link to post
Share on other sites

Hello guys,

 

i wanted to install this great addon but I have problem in index.php becose I have front page en that addon has migrate the 

 

<div class = "alert alert-info">
     <? php echo tep_customer_greeting (); ?>
   </ div>
 
to another php file.
 
I tried to insert 
<div class = "modular-index">
      <? php echo $ oscTemplate-> getContent ('index'); ?>
  </ div>
in other place but get always php error.
 
use 234BS EDGE
 
thanks very muchos for help
Camella

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×