The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Easy write for staff on editor

5 posters

Go down

Solved Easy write for staff on editor

Post by TheCrow Wed 13 Nov - 15:41

Hello.. Well my problem is this..

I am using this code in Forum Widgets and its visible only for staff.

Code:
<script>jQuery(function(){jQuery(function(){jQuery('<a class="sceditor-button" unselectable="on" title="BBCode ( Ready Code)"><div unselectable="on" style="background-image:url(https://cdn1.iconfinder.com/data/icons/fatcow/16/text_letter_omega.png)"></div></a>').insertBefore('.sceditor-button-size').click(function(){jQuery('#text_editor_textarea').sceditor("instance").insertText("<center>???code???</center>")})})});</script>
All i want is, in the code to complete the code where it says ???code??? so as soon as you push it, to show this:

Code:
[font=Comic Sans MS][size=16][color=red][/color][/size][/font]
Thank you...


Last edited by Marios94 on Tue 19 Nov - 12:54; edited 1 time in total
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Thu 14 Nov - 19:49

bump


Easy write for staff on editor Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Ikerepc Thu 14 Nov - 20:37

Hello

You need just html code for this:
Code:
[font=Comic Sans MS][size=16][color=red][/color][/size][/font]
I'm I right?

If yes try this:
Code:
<font style="Comic Sans MS" size="16px" color="#ff0000"></font>
if you don't want that, please try to explain better.
Ikerepc
Ikerepc
Active Poster

Male Posts : 1187
Reputation : 167
Language : Who cares...
Location : Where web help & support is needed

http://admins.forumotion.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Thu 14 Nov - 21:07

This code should work as the first code u wrote in the reply from. for example if i use this:
<font style="Comic Sans MS" size="16px" color="#ff0000">Text Here!</font>
i should have as preview message this:
Text Here!

Unfortunately this code doesn't work.. Sad
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Ikerepc Thu 14 Nov - 22:37

Then you can use css.

Paste this in css stylesheet:
Code:
.stms {
  font-family: "Comic Sans MS",Arial,Verdana,Tahoma;
  color: #f00;
  text-height: 16px;
}
Then paste in that code in place of font tag this tag:
Code:
<span class="stms"></span>
Ikerepc
Ikerepc
Active Poster

Male Posts : 1187
Reputation : 167
Language : Who cares...
Location : Where web help & support is needed

http://admins.forumotion.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Fri 15 Nov - 0:56

now it doesn't show the button...

To show you my problem...
I have this widget that i named BBcode. In this widget i have this code:
Code:
<script>jQuery(function(){jQuery(function(){jQuery('<a class="sceditor-button" unselectable="on" title="BBCode ( Έτοιμος Κώδικας)"><div unselectable="on" style="background-image:url(https://cdn1.iconfinder.com/data/icons/fatcow/16/text_letter_omega.png)"></div></a>').insertBefore('.sceditor-button-size').click(function(){jQuery('#text_editor_textarea').sceditor("instance").insertText("<center>????? Here the text ?????</center>")})})});</script>
All i want is to complete the ????? so that the code in the reply form to show after posting this:
Code:
[font=Comic Sans MS][size=16][color=#ff0000]Here the text[/color][/size][/font]
Result of button after posting:
Here the text

Just this...
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by SLGray Fri 15 Nov - 1:15

How you removed this - ????? Here the text ????? - and added what you want?


Easy write for staff on editor Slgray10

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

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Fri 15 Nov - 1:18

That 's what i want.. TO make a code that as soon as you press the button to paste one code so the result will be as the one above..


Easy write for staff on editor Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by SLGray Fri 15 Nov - 1:20

What exactly happens when you press the button now?


Easy write for staff on editor Slgray10

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

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Fri 15 Nov - 1:37

the way i gave the code it shows :
Code:
<center>????? Here the text ?????</center>


Easy write for staff on editor Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Ange Tuteur Fri 15 Nov - 1:40

Hello Marios94,

Widgets do not preserve bbcodes, they instead are converted to HTML. If you want this to be visible only to staff do the following.

Administration Panel > Modules > HTML & JAVASCRIPT > HTML pages management

create a new HTML page, name what you wish, and paste the source code:
Code:
<!--
jQuery(function(){jQuery(function(){jQuery('<a class="sceditor-button" unselectable="on" title="BBCode ( Έτοιμος Κώδικας)"><div unselectable="on" style="background-image:url(https://cdn1.iconfinder.com/data/icons/fatcow/16/text_letter_omega.png)"></div></a>').insertBefore('.sceditor-button-size').click(function(){jQuery('#text_editor_textarea').sceditor("instance").insertText("[font=Comic Sans MS][size=16][color=#ff0000]Here the text[/color][/size][/font]")})})});
-->
Now edit your widget with the following content modifying the src:
Code:
<script src="/MYHTMLPAGE"></script>
Your script source must be your HTML page location which has the script:
Easy write for staff on editor Captu118

If you do everything correctly the button should apply the correct bbcodes.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Fri 15 Nov - 8:36

I used the exact code to the HTML, and then i went to widget i added both links: the first was "/h1-page" and the other one "*link of forum*/h1-page" but in both occasions, the button did not appear to the text editor.


Easy write for staff on editor Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Kaizer Lee Fri 15 Nov - 11:33

Because the code you want is for the old editor Smile.

No one has done any new codes for the Staff buttons lol. Just informing anyone if they're wondering since I've asked this problem too ._.
Kaizer Lee
Kaizer Lee
Active Poster

Female Posts : 1064
Reputation : 54
Language : English, Tagalog, Spanish and Chinese
Location : Philippines

http://www.medievalchaos.net/forum

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Ange Tuteur Fri 15 Nov - 15:13

Marios94 wrote:I used the exact code to the HTML, and then i went to widget i added both links: the first was "/h1-page" and the other one "*link of forum*/h1-page" but in both occasions, the button did not appear to the text editor.
How did you copy the HTML script I provided? I've been noticing the code tags have been messing with scripts adding line breaks where they're not needed.

If you haven't, copy the script I've provided using the 'select content' button.

Try this also instead of the other script tags:
Code:
<script type="text/javascript" src="/h1-page"></script>
Kaizer Lee,

This script is for the sceditor.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Fri 15 Nov - 15:37

Seth i did that and the code u gave me, made the button disappear..

Lets try the second one u just gave me


Edit: Still nothing
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Ange Tuteur Fri 15 Nov - 15:50

That is very weird, I have it working perfect on my test forum.
Easy write for staff on editor Captu119

So to clarify you've done the following:

Created HTML page with script:
Easy write for staff on editor Captu120

Created widget with script source, applied to forum.
Easy write for staff on editor Captu121
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Sat 16 Nov - 12:14

Ok, so i show? I Show you:

HTML:
Easy write for staff on editor Lh94oNw

Widget:
Easy write for staff on editor K8IZMJU

Reply Form:
Easy write for staff on editor I7uM9Td


Easy write for staff on editor Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Ange Tuteur Sat 16 Nov - 14:53

Well there's one more thing for you to try then, because I'm not exactly sure what could be preventing it from working.

Are your forum widget settings set as the following?
Easy write for staff on editor Captu122

Left and/or right need to be at 180 depending on which column this widget is in.

If that isn't it perhaps you should try resyncing your forum.
Administration Panel > General > Forum > Configuration

Scroll to bottom, tick 'Resynchronize your forum', and save.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Sat 16 Nov - 16:32

the settings are like that and also, i made the resynchronize but still nothing!


Easy write for staff on editor Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Tue 19 Nov - 2:13

up


Easy write for staff on editor Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Ange Tuteur Tue 19 Nov - 2:57

Hello Marios94,

Apologies for the wait as I've just figured the issue as to why it is not showing today. Chrome cannot read scripts in comments which renders the past method useless.

Please do the following.
Administration Panel > Modules > HTML & JAVASCRIPT > HTML pages management

Edit your old page, delete the contents, and paste this in its place:
Code:
jQuery('#modBouton').click(function(){
jQuery('#text_editor_textarea').sceditor("instance").insertText("[font=Comic Sans MS][size=16][color=#ff0000]Here the text[/color][/size][/font]");
});
Save and then head over to widgets management.

Edit your current widget, delete the contents, and paste this in its place:
Code:
<script type="text/javascript">jQuery(function(){
jQuery(function(){
jQuery('<a id="modBouton" class="sceditor-button" unselectable="on" title="BBCode ( Έτοιμος Κώδικας)"><div unselectable="on" style="background-image:url(https://cdn1.iconfinder.com/data/icons/fatcow/16/text_letter_omega.png)"></div></a>').insertBefore('.sceditor-button-size');
});
});
jQuery.getScript('/h2-page');
</script>
Before you save you need to edit one thing, this line:(its at the bottom of the widget)
Code:
jQuery.getScript('/h2-page');
Change the source to your HTML page which has the script and it should work.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by TheCrow Tue 19 Nov - 12:53

Seth you are amazing!! Thank you very much!! The code works!!! Topic solved!


Easy write for staff on editor Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6916
Reputation : 795
Language : Greek, English

https://www.inforumgr.com

Back to top Go down

Solved Re: Easy write for staff on editor

Post by Ange Tuteur Tue 19 Nov - 17:16

You're welcome I love you 

Topic Solved and Archived
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

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