The update (to be released as v2.2.1) is now available on the plugin's GitHub repository: https://github.com/lat9/news_box_manager.
The update (to be released as v2.2.1) is now available on the plugin's GitHub repository: https://github.com/lat9/news_box_manager.
Hi, I was so impressed with the sql fix I installed it on our live site just in time to advertise a company charity event.... Then i came across a bug. Not a big one! Our site has an issue with the 'more_news' page an wondered if it was a straight forward bug or something that's conflicting with just our site.
It's best explained better with a snipet of the source code provided by W3C as below:
<p>Every penny raised helps us make a difference to people affected by cancer</p><br />↩
<br />↩
<ul><br />↩
<li>When: Friday 28th September</li><br />↩
As you can see, the page automatically provides <br />'s at the end of every line. The resulting large spaces between each paragraph don't help the apparance. It behaves completely normal on the home and news_archive pages.
I have tried adding things like: br { display: none;} to the css, it worked for the page but had effects on some other pages. Alos tried: #moreNewsDefault .newsContent+br { padding: 0.3em 0; display: none;} which had no effect at all.
Many thanks for any assistance
Since the default template (/includes/templates/template_default/tpl_more_news_default.php) simply echos the 'content' you provide for the article, I'm going to guess that you're using an HTML editor in the admin to produce that content.
You can correct those added <br />'s by turning off the HTML editor (reverting to 'Text') to remove those unwanted HTML additions.
Thanks for such a speedy response.
You are correct, I'm using ckeditor. However, from the editor, you can see the source code that it creates. There are no <br/>'s there. Thinking that it might be uploading something different to the server, I looked there. Again found no <br/>'s
Below is same example as before copied straight from the server data field:
<p>Every penny raised helps us make a difference to people affected by cancer</p>
<ul>
<li>When: Friday 28th September</li>
<li>Where: Our Machinery Department</li>
<li>Time: 10:00am - 2:00pm</li>
</ul>
<p><strong>If you are in our area, please call in to enjoy a cuppa and a chat!</strong></p>
As I mentioned, it works properly in the other two pages.
It's certainly got me scratching my head!
Darn it, it's the more_news page's header that's adding those. I'll get that corrected, too.
Open /includes/modules/pages/more_news/header.php.php and find
Change those lines, removing the call to nl2br (which converts any new-line characters to <br />'s):Code:$news_title = nl2br($news_box_query->fields['news_title']); $news_content = nl2br($news_box_query->fields['news_content']);
I'll get that logged and updated on the plugin's GitHub repository.Code:$news_title = $news_box_query->fields['news_title']; $news_content = $news_box_query->fields['news_content'];
Update: https://github.com/lat9/news_box_manager/issues/8
Last edited by lat9; 28 Sep 2018 at 04:38 PM.
Thanks Lat9, It works like a dream, no more <br />'s anywhere!!
No problem, @honda-crunch; thanks for letting me know!
Hi
I have downloaded, but not installed it yet.
Is there a way to have the following accessible to members only
News Archive page
More News page
and have only the following visible to all
Latest News sidebox
Latest News centerbox
I guess there is some coding involved, do you think it might be a good feature in case?
@keneso, I've created this GitHub issue so I remember your request.
Bookmarks