Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 10 Years, 8 Months, 2 Weeks ago [How To?] Add custom BBcodes to formatting box
#1
Solved: 10 Years, 8 Months, 2 Weeks ago
Hi again,

I was just wondering is it possible to add custom bbcodes to the text formatting box when making a post. I have a few custom bbcodes that I'd like to add a button for. Is it just a template to edit?

Andy
#2
Solved: 10 Years, 8 Months, 2 Weeks ago
This user has been denied support. This user has been denied support.
Edit your codebuttons template.
#3
Solved: 10 Years, 8 Months, 2 Weeks ago
It will require some CSS, Javascript and template changes I think. There are some tutorials around if you search for them in the User Submitted Tutorials forum IIRC (I tried looking but couldn't find any but there are definetely some there). Smile
Thanks, Polarbear541
#4
Solved: 10 Years, 8 Months, 2 Weeks ago
This user has been denied support. This user has been denied support.
It's in your Ungrouped Templates set.
#5
Solved: 10 Years, 8 Months, 2 Weeks ago
I think this is the most up-to-date tutorial, you just need to register to view it - http://www.mybbextras.com/showthread.php?tid=1

(2010-09-10, 07:45 PM)BrianRR Wrote: It's in your Ungrouped Templates set.

You can't add buttons just by editing that template, it's more complex than that.
#6
Solved: 10 Years, 8 Months, 2 Weeks ago
Hmm, that template folder has no recognisable css, it just includes the javascript file.
I went to the javascript file and edited the following section:

this.options.lang.title_image},
				{type: 'button', name: 'url', sprite: 'link', insert: 'url', title: this.options.lang.title_hyperlink},
				{type: 'button', name: 'email', sprite: 'email', insert: 'email', extra: 1, title: this.options.lang.title_email},
				{type: 'separator'},
				{type: 'button', name: 'box', sprite: 'box', insert: 'box', title: this.options.lang.title_box},
				{type: 'button', name: 'quote', sprite: 'quote', insert: 'quote', title: this.options.lang.title_quote},
				{type: 'button', name: 'code', sprite: 'code', insert: 'code', title: this.options.lang.title_code},
				{type: 'button', name: 'php', sprite: 'php', insert: 'php', title: this.options.lang.title_php},
				{type: 'button', name: 'video', insert: 'video', image: 'television.gif', dropdown: true, title: this.options.lang.title_video, options: this.videos}
			]
		});

See the "box" code. And that worked, however it shows a 'B', the same as Bold. I tried using the 'image: television.gif' but it didnt change, so im guessing there is another file that I need to edit. Any ideas?

Andy
Oh, you sent a tutorial. Looking now, cheers Smile
Woo, I finally got it.

After 15 minutes of editing the default folder, and wondering why the picture wouldn't show up, I thought hmm.... I use the Office 2007 editor....

Once I edited the correct files it worked perfectly! Cheers for your help guys.

I've got a cool little [box] box now Big Grin

[Image: editorb.gif]
#7
Solved: 10 Years, 8 Months, 2 Weeks ago
Maybe you could make a newer tutorial on how to do this? I want to add a Spoiler button to my editor.
#8
Solved: 10 Years, 8 Months, 2 Weeks ago
The tutorial above works fine. I was just editing the wrong file Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)