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.

change the text of Preview/Send button

View previous topic View next topic Go down

In progress change the text of Preview/Send button

Post by mahdy on January 19th 2012, 3:58 am

Hi, how can I change the text of Send and Preview button? Also, I'd like to change the text in the header (Topic/Posts/Last Posts) of every category.


You guys are awsome. Thanks in advance.

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by SLGray on January 19th 2012, 6:38 am

To change the text in the Send and Preview buttons, you have to create new images or, you may requests some here: http://help.forumotion.com/f6-graphic-design-section .


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35624
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by mahdy on January 19th 2012, 12:58 pm

thank you, slg.

so, how do I replace my own images with the existing preview/send images?

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by Guest on January 19th 2012, 2:24 pm

Try to add this in Javascript management:
Code:
jQuery(document).ready(function() {
    jQuery('input.button2').each(function() {
        if(jQuery(this).attr('value') == 'Send') jQuery(this).attr('value', 'YOUR Send text');
        if(jQuery(this).attr('value') == 'Preview') jQuery(this).attr('value', 'YOUR Preview text');
    });
})

Guest
Guest


Back to top Go down

In progress Re: change the text of Preview/Send button

Post by mahdy on January 19th 2012, 2:50 pm

Hi Gassy, thanks for the code. I've noticed a change in Preview button, but the Send button's text is still the same.

Sad

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by Guest on January 19th 2012, 2:54 pm

Can you provide your forum url please? Smile

Guest
Guest


Back to top Go down

In progress Re: change the text of Preview/Send button

Post by mahdy on January 19th 2012, 3:05 pm

http://forum.cinemapeoples.com

I've written the contents of forum in my own language.

also, I've changed the navbar text with javascript except register and log in/log out text. any help? :'(

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by Nera. on January 19th 2012, 3:30 pm


Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by mahdy on January 19th 2012, 4:08 pm

@Nera. wrote:
@mahdy wrote:but the Send button's text is still the same.
Sad

http://help.forumotion.com/t96021-how-to-change-the-send-button-when-posting



Thanks Nera.

unfortunately that didn't help Sad ... is it because i'm on phpbb3?

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by LGforum on January 19th 2012, 4:37 pm

Hi it can be done with a just one line.

Add this to an already existing jQuery function. That means below this line '$(function(){' in any of your scripts. Assuming you have at least one.

Code:
document.post.post.value="NEW TEXT HERE";

and the same thing for the preview:
Code:
document.post.preview.value="NEW PREVIE TEXT HERE";

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by mahdy on January 19th 2012, 5:17 pm

@LGforum wrote:Hi it can be done with a just one line.

Add this to an already existing jQuery function. That means below this line '$(function(){' in any of your scripts. Assuming you have at least one.

Code:
document.post.post.value="NEW TEXT HERE";

and the same thing for the preview:
Code:
document.post.preview.value="NEW PREVIE TEXT HERE";


Hi LGforum, Thanks a lot. I've added these codes to an existing jQuert function, but still the same.. no change Sad

just a though, is there any possibility to clash these codes with my existing codes?? like, the codes for changing navbar text? Crying or Very sad

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by LGforum on January 19th 2012, 5:25 pm

Odd. I'm going to stick it in a function for you, just to double check you got it correct:

Code:
$(function() {
if (document.post){
document.post.post.value="NEW TEXT HERE";
document.post.preview.value="NEW PREVIEW TEXT HERE";
}});

Other scripts will clash with it, if any of your scripts are crashing/hitting errors. Since your scripts get compiled into one, fi one of them crashes they all do.
If you wish to provide your forum URL, I can find any errors quickly.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by mahdy on January 19th 2012, 5:32 pm

every other code is working fine except this one :-S ... I've created another javascript to put your codes in there. and you know what? no cnage at all in preview/send buttons :'(

here is my forum's link: www.forum.cinemapeoples.com

i've written the contents into my language.

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by LGforum on January 19th 2012, 5:48 pm

thing is, the other code in this topic, is possibly the slowest worst way of doing it lol. No offence.

Just tested the code on my board and it woks perfectly.
The reason its not working on your board is likely down to another script crashing.

I presume your ticking 'in all pages'?
And also within your new text, you can not use a " symbol.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by mahdy on January 19th 2012, 5:57 pm

I think so. It #'s clashing with my other codes.

I've tried with ticking 'in all the pages' and 'in the topis' as well.. no positive outcome :'(

this is the code I write in a new javascript...

Code:

$(function() {
        if (document.post){
        document.post.post.value=Post it;
        document.post.preview.value=Watch Before Post;
        }});

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

In progress Re: change the text of Preview/Send button

Post by LGforum on January 19th 2012, 9:45 pm

Oh it's not working because you need to put new value in speech marks like on my code.

Use this:
Code:

 
$(function() {
        if (document.post){
        document.post.post.value="Post it";
        document.post.preview.value="Watch Before Post";
        }});

You can add the middle 3 lines to an existing jQuery function like we discussed earlier now, to cut down on script.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.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