MyBB Source

everyBB - The forum owners community

MyBB 1.6 Officially Released!

Latest Releases: Valid Referrals - Bonus - Mark Thread Read

 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to remove and add a new post button?
Author Message
matrixsc
Member


Posts: 55
Joined: Mar 2009
Reputation: 0
MyBux: 4
Post: #1
How to remove and add a new post button?
If it's possible how do i remove the insert hyperlink command and replace it with a new button and new command.

I'm wanting to add a [hide] [/hide] as a command instead and rename the insert hyperlink as hide hack and a new icon.


Or if not would it be possible to add a complete new button and if so how?


Looked around but i can't seem to work how how to do this?


Thanks.
05-14-2009 09:13 PM

Advertisement

AglioEoliO
Junior Member


Posts: 38
Joined: Nov 2008
Reputation: 0
MyBux: 12
Post: #2
RE: How to remove and add a new post button?
just some tips... I´ve never read such tutorial or plugin to MYBB EDITOR too



buttons are generated by a javascript
jscripts/editor.js

Code:
line 218:
{type: 'button', name: 'url', sprite: 'link', insert: 'url', title: this.options.lang.title_hyperlink},

insert value = BBCODE you want to use
title = I don´t have a clue where "lang.title_hyperlink" is, but it´s a language tag for sure... then You just need to find wich php file in 'inc\languages\your_lang\' contains this and modify that single line

images are in
jscripts/your-current-theme/images

download "NOTEPAD++" and try to edit that JS file then edit this image
[Image: toolbar.gif]



I´ll like to use some buttons to Video Tags,like youtube... if anyone hack this please post how to do it...

EDIT:
Code:
line 214:
{type: 'button', name: 'list_num', sprite: 'list_num', insert: 'list', extra: 1, title: this.options.lang.title_numlist},

I think this is what I need to youtube, as my bbcode is
Code:
[video=youtube]abcdefgh[/video]

[code]
line 214:
{type: 'button', name: 'list_num', sprite: 'list_num', insert: 'video', extra: 'youtube', title: this.options.lang.title_numlist},
..
(This post was last modified: 05-14-2009 10:29 PM by AglioEoliO.)
05-14-2009 10:25 PM
matrixsc
Member


Posts: 55
Joined: Mar 2009
Reputation: 0
MyBux: 4
Post: #3
RE: How to remove and add a new post button?
Ok i'm lost here what i have to put here

So if i wanted to change this to have it post [hide] [/hide] When pressed how would i go about changing what in this line?
editor.js:-
{type: 'button', name: 'php', sprite: 'php', insert: 'php', title: this.options.lang.title_php}


It seems the global.lang is what will need changing as well?

line 146 :- $l['editor_title_php'] = "Insert formatted PHP code";



Sorry but this is well over my head at the moment can't work out what to do at all.

Thanks.
05-15-2009 08:31 AM
matrixsc
Member


Posts: 55
Joined: Mar 2009
Reputation: 0
MyBux: 4
Post: #4
RE: How to remove and add a new post button?
Ok i've sorted it thank you
05-15-2009 07:37 PM
AglioEoliO
Junior Member


Posts: 38
Joined: Nov 2008
Reputation: 0
MyBux: 12
Post: #5
RE: How to remove and add a new post button?
I remember that in SMF this is way to easy to change... in mybb there is absolutelly no Docs about it, not even a plugin
05-15-2009 09:23 PM
 





Web Design | Web Design Jobs