De Dokta Posted May 17, 2015 Share Posted May 17, 2015 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. sihi 1 Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 19, 2015 Share Posted May 19, 2015 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"> Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 20, 2015 Share Posted May 20, 2015 additional, but very small bug: in Admin directory folder "deutsch" nict, but in most cases it is german :) Quote Link to comment Share on other sites More sharing options...
De Dokta Posted May 20, 2015 Author Share Posted May 20, 2015 @@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. Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 20, 2015 Share Posted May 20, 2015 (edited) Hi additional bug in the preview of a picture: Thanks for quick answer. :) Edited May 20, 2015 by rubberfashion Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 20, 2015 Share Posted May 20, 2015 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> Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 20, 2015 Share Posted May 20, 2015 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. Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 20, 2015 Share Posted May 20, 2015 (edited) 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 :) Edited May 20, 2015 by rubberfashion Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 20, 2015 Share Posted May 20, 2015 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. Quote Link to comment Share on other sites More sharing options...
De Dokta Posted May 20, 2015 Author Share Posted May 20, 2015 Hi additional bug in the preview of a picture: Thanks for quick answer. :) What bug? That has nothing to do with Latest news but with ckeditor. May be you use another version of ckeditor than me?! J.J. Quote Link to comment Share on other sites More sharing options...
De Dokta Posted May 20, 2015 Author Share Posted May 20, 2015 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. Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 21, 2015 Share Posted May 21, 2015 What bug? ckeditor.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. Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 21, 2015 Share Posted May 21, 2015 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. Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 22, 2015 Share Posted May 22, 2015 (edited) 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 May 22, 2015 by rubberfashion Quote Link to comment Share on other sites More sharing options...
De Dokta Posted May 22, 2015 Author Share Posted May 22, 2015 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. Quote Link to comment Share on other sites More sharing options...
rubberfashion Posted May 27, 2015 Share Posted May 27, 2015 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>'; Quote Link to comment Share on other sites More sharing options...
De Dokta Posted May 27, 2015 Author Share Posted May 27, 2015 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! Quote Link to comment Share on other sites More sharing options...
Mikepo Posted July 6, 2015 Share Posted July 6, 2015 @@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 Quote osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!) Link to comment Share on other sites More sharing options...
rubberfashion Posted July 8, 2015 Share Posted July 8, 2015 Please send a message to [email protected] I will send you the file then. Regards Dave Quote Link to comment Share on other sites More sharing options...
SpicyGirl Posted March 14, 2016 Share Posted March 14, 2016 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.