 |
 |
 |
 |
 |
| Author |
Message |
Mr R

Joined: 27 Sep 2005 Posts: 82 Location: Spain |
|
Search and Replace |
|
I want to replace {nl} for <br /> and it doesn't work, is it a bug??
|
|
| Mon Oct 03, 2005 11:46 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
odin
Moderator
Joined: 29 Sep 2005 Posts: 138 Location: Poland |
|
Re: Search and Replace |
|
 |  | I want to replace {nl} for <br /> and it doesn't work, is it a bug?? |
And what is this "{nl}" ? I don't think it is error. Search and replace work really good, but for changeing usual verbs .
Are You using xml coding on page ? If not, "<br />" is used wrongfully.
|
|
| Mon Oct 03, 2005 1:14 pm |
|
 |
Mr R

Joined: 27 Sep 2005 Posts: 82 Location: Spain |
|
|
|
When I import my files, all <br /> are written as {nl}, and I only want to change this, but it doesn't work
|
|
| Mon Oct 03, 2005 1:32 pm |
|
 |
odin
Moderator
Joined: 29 Sep 2005 Posts: 138 Location: Poland |
|
|
|
This will be hard to take, but... as for now You'll have to change it in mysql manualy. I'll ask lexa what is this, but I can't mail him again and again. You know what I mean ? Turn on msn, i'll try to look at this more closely.
edit:
For every article change format to HTML with BR
edit2:
Those {nl} are automaticly convert to break lines. I've posted news using {nl}, and system converted these to <br>'s. Give me exapmle what is happening.
|
|
| Mon Oct 03, 2005 2:04 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2801 Location: Germany |
|
|
|
These {nl} are already in the news you want to import.
When you added news in your cutenews then the \n were replaced with {nl}.
Go to functions.inc.php and find something like this in replace_news:
 |  | } elseif($way == 'add'){
$find = array('|', "\r", "\n");
$replace = array('|', '', '{nl}'); |
Try to replace the {nl} with <br>.
|
|
| Mon Oct 03, 2005 7:22 pm |
|
 |
Mr R

Joined: 27 Sep 2005 Posts: 82 Location: Spain |
|
|
|
Well the problem is in comments, not in news. I edit the functions.inc.php but it doesn't work.
EDIT
I finally get it work, I add this code from function replace news, in function replace comments
 |  | elseif ($way == 'show'){
$find = array('{nl}');
$replace = array("<br>");
$sourse = stripslashes($sourse);
} |
|
|
| Mon Oct 03, 2005 7:54 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|