Moderator text on website

You have a question or need an advice about how to do something? Ask it here!
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Moderator text on website

Post by friso »

Bernd

Is it possible, or is there a way to display the moderator text on the website with the linebreaks i created in the moderator text box itself?
Now all the text is displayed without any linebreaks?

Thanx

Friso
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Moderator text on website

Post by radio42 »

What control-command do you use to transfer the moderator text to your web site?

However, note, that your local moderator text might contain Carriage Return/Line Break characters (\r\n) which your web-site does not translate automatically.
I.e. HTML does not 'understand' those text formatting characters, as HTML expects the "<br />" sequence instead.
There are two possibilities:
a) in your web-site you enclose the moderator text into a "<code>"/"</code>" block
b) you replace any Carriage Return/Line Break characters (\r\n) by respective "<br />" characters (either within your web-site or with the "*[REPLACE:{value}:{source}:{destin}]" macro function)

I suggest to discuss these options with your web site designers...
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: Moderator text on website

Post by friso »

Bernd

It works, when i add 2 times <br><br>. After that on the website there is one blanc line so that looks much better.
Is it possible to add a button in tag editor that automatically adds the <br><br>?
Or something wich does the same.

Thanx
Friso
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Moderator text on website

Post by radio42 »

Yes, as said, you can use the "*[REPLACE:{value}:{source}:{destin}]" macro function to do so when uploading your moderator text to the web site.
E.g.:
*[REPLACE:{${moderatortext}}:{\r\n}:{<br/><br/>}]
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: Moderator text on website

Post by friso »

Bernd

Do i have to put these macro in Proppfrexx in the http_get, or in my php script?
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: Moderator text on website

Post by friso »

Bernd

Ok, but how can i use this macro you give me
Now i got this: http://frisotrip.nl/proppfrexx/insert_d ... }&modtext="*[REPLACE:{${moderatortext}}:{\r\n}:{<br/><br/>}]"

But that gives me the whole rule as text.
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Moderator text on website

Post by radio42 »

How did your command look like before?
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: Moderator text on website

Post by friso »

Bernd

It looked like this:
Now i got this: http://frisotrip.nl/proppfrexx/insert_d ... p?artist=${artist}&title=${title}&albumart=${albumart}&modtext=${moderatortext}
friso
Posts: 173
Joined: 10 Apr 2012 10:05
Re: Moderator text on website

Post by friso »

Bernd

Thanx i solved it in php:)
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Moderator text on website

Post by radio42 »

I am not sure, if line breaks can really be translated within macros.
So at best you leave the original code and translate that on the web (PHP) side, e.g. using the "str_replace()" function.

Post Reply