The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How to change the inscription Reason for editing my language.

View previous topic View next topic Go down

Solved How to change the inscription Reason for editing my language.

Post by smurfavr on October 5th 2014, 12:50 pm

How to change the inscription Reason for editing my language.

smurfavr
Active Poster

Male Posts : 1416
Reputation : 11
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by Ramdaman on October 5th 2014, 2:52 pm

Press Edit, and under the message box youll find a text saying "Reason for edit" and a text bar next to it

Ramdaman
Active Poster

Male Posts : 1614
Reputation : 97
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by smurfavr on October 10th 2014, 8:01 pm

I want this inscription Reason for editing it shows in my language.

smurfavr
Active Poster

Male Posts : 1416
Reputation : 11
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by Ange Tuteur on October 10th 2014, 10:27 pm

Hello smurfavr,

Try this :
Administration Panel > Modules > JavaScript codes management > Create a new script

Title : Your choice
Placement : In the topics
Paste the code below :
Code:
$(function() {
 var reasonTxt = 'Edited for :',
 p = $('.post .postbody + .gensmall');
 for (i=0;i<p.length;i++) if (/Reason for editing :/.test(p[i].innerHTML)) p[i].innerHTML = p[i].innerHTML.replace(/Reason for editing :/,reasonTxt);
});

The only variable you need to edit is :
Code:
reasonTxt = 'Edited for :'

Replace Edited for : by any texts you want.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by smurfavr on October 11th 2014, 4:23 am

Thank you Ange Tuteur.

How to make captions to be displayed on 2 lines as I have given an example.

Now is
Последната промяна е направена от smurfa_vr на Вто 30 Сеп 2014 - 19:42; мнението е било променяно общо 1 път Причина за редакция :insult team

I want so
Последната промяна е направена от smurfa_vr на Вто 30 Сеп 2014 - 19:42; мнението е било променяно общо 1 път
Причина за редакция : insult team.

How to do this inscription Reason for editing (Причина за редакция ) be of a different color .

How all the words to be the bottom in the box and not in the middle.
Последната промяна е направена от smurfa_vr на Вто 30 Сеп 2014 - 19:42; мнението е било променяно общо 1 път
Причина за редакция : insult team.

smurfavr
Active Poster

Male Posts : 1416
Reputation : 11
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by Ange Tuteur on October 11th 2014, 9:08 pm

In the message variable you can use HTML :
Code:
reasonTxt = 'Edited for :'

add <br/> before the message to place it on a new line :
Code:
reasonTxt = '<br/>Edited for :'

You can also use tags to style your texts :
Making them red.
Code:
reasonTxt = '<br/><span style="color:red">Edited for :</span>'

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by smurfavr on October 11th 2014, 9:49 pm

@Ange Tuteur wrote:

You can also use tags to style your texts :
Making them red.
Code:
reasonTxt = '<br/><span style="color:red">Edited for :</span>'

This misunderstood how to do it. How do I remove these characters () of the reson for editing.

smurfavr
Active Poster

Male Posts : 1416
Reputation : 11
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by Ange Tuteur on October 11th 2014, 10:03 pm

Try replacing your script by :
Code:
$(function () {
  var reasonTxt = '<br/>Причина :',
  p = $('.post .postbody + .gensmall');
  for (i = 0; i < p.length; i++) if (/Reason for editing :/.test(p[i].innerHTML)) p[i].innerHTML = p[i].innerHTML.replace(/\((Reason for editing :.*?)\)/, '$1').replace(/Reason for editing :/, reasonTxt)
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by smurfavr on October 11th 2014, 10:07 pm

How all the words to be the bottom in the box and not in the middle.
Последната промяна е направена от smurfa_vr на Вто 30 Сеп 2014 - 19:42; мнението е било променяно общо 1 път
Причина: insult team.


How to do this inscription Reason for editing (Причина за редакция ) be of a different color .

smurfavr
Active Poster

Male Posts : 1416
Reputation : 11
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by Ange Tuteur on October 11th 2014, 10:14 pm

I believe the space depends on how much content the member has written; it can't be changed.

For the color, try replacing your script by :
Code:
$(function () {
 var reasonTxt = '<br/>Причина :',
  reasonColor = '#FF0';
 p = $('.post .postbody + .gensmall');
 for (i = 0; i < p.length; i++) if (/Reason for editing :/.test(p[i].innerHTML)) p[i].innerHTML = p[i].innerHTML.replace(/\((Reason for editing :.*?)\)/, '<span style="color:'+reasonColor+'">$1</span>').replace(/Reason for editing :/, reasonTxt)
});

reasonColor = '#FF0'; Is the color of the text, #FF0 being yellow.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by smurfavr on October 11th 2014, 10:18 pm

Thank you Ange Tuteur.

smurfavr
Active Poster

Male Posts : 1416
Reputation : 11
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: How to change the inscription Reason for editing my language.

Post by Ange Tuteur on October 11th 2014, 10:21 pm

You're welcome !

Topic archived

Have a great day. ^^

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum