Maian Script World on Facebook Maian Script World on Twitter Maian Script World - Latest News Maian Script World on YouTube Maian Script World on LinkedIn


Please Read

You are required to register before you can post. This is via a custom verification system. Please post any problems you are encountering here and I`ll do my best to respond as soon as I can. Please note that a reply WILL be posted to all queries, so do not double post. There are no guarantees when a reply will appear but I do my best to answer all within 3/4 days max. Bumping topics won`t make the slightest difference.

IMPORTANT: Posts in English ONLY please, thank you! Any other languages will be ignored and your message deleted.
SEARCH: Use the search option to see if your question has been answered on the forum before. Or check the relevant script docs.
CUSTOMER: If you have purchased a commercial version of any of my software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
PRIVATE MESSAGES: Private messages are currently disabled.
LINKS: Any links posted are 'NOFOLLOW' and will not be picked up by search engines.

You are not logged in.

#1 25-01-2008 12:40:35

bert56
Members
From: Netherlands
Registered: 24-01-2008
Posts: 8

<br> instead of <br />

If someone leaves a comment in the source code it shows <br />

Is it possible that the source will show <br>


Bert

Offline

#2 26-01-2008 12:51:22

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,071

Re: <br> instead of <br />

Not a problem Bert. Open the main 'index.php' file and find this code on line 451:

<strong>nl2br(cleanData(&#036;COMMENTS->comments))</strong>

Change to:

<strong>str_replace(define_newline(),'<br>',(cleanData(&#036;CO MMENTS->comments)))</strong>

David.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#3 26-01-2008 14:09:17

bert56
Members
From: Netherlands
Registered: 24-01-2008
Posts: 8

Re: <br> instead of <br />

Hello David,

I did what you said and replaced the code in the Main Index File.


I also replace the <br /> to <br> and the /> to >

in the following files:
contact.tpl.php
captcha.tpl
reply-box.tpl


When I fill out a comment this is now the outcome:

<p class="comment_visitor">test<br /><br>test<br /><br>test<br /><br />
       <span class="comment_date">Posted by <b>webmaster</b> on 26-01-2008 - 14:01</span>
       </p>


I stil have <br /> in the code, what I'm doing wrong?


Hope you can help.


Maby I'm going nuts but I want that also after leaving a comment my site still Validates:
HTML 4.01 Transitional (I have without any message the whole site Validated)


Bert

Offline

#4 27-01-2008 08:14:50

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,071

Re: <br> instead of <br />

The breaks for the comments are auto parsed via the system using PHP nl2br function. So, where you see that in the index.php, it needs replacing with:

str_replace(define_newline(),'<br>',

David.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

Board footer

2Checkout.com is an authorized reseller of goods and services provided by Maian Script World.© 2003-2013 David Ian Bennett. All Rights Reserved | Forum: FluxBB

Privacy Policy | Refund Policy