Help with coding custom bbcodes
3 posters
Page 1 of 1
Help with coding custom bbcodes
Sorry if this is in the wrong board.
Anyway, I'd like to add another color bbcode. Like Text!
I've managed to add it to the list, but the color just stays black, and I don't know how to get rid of the brackets.
Anyone know hkw to fix this? Help is appreciated.
Anyway, I'd like to add another color bbcode. Like Text!
I've managed to add it to the list, but the color just stays black, and I don't know how to get rid of the brackets.
Anyone know hkw to fix this? Help is appreciated.
Last edited by Rarcer on November 3rd 2012, 5:20 pm; edited 1 time in total
Rarcer- New Member
- Posts : 5
Reputation : 1
Language : English
Re: Help with coding custom bbcodes
Is your forum's version phpBB 3?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Help with coding custom bbcodes
Yep. Phpbb3 prosilver.
Rarcer- New Member
- Posts : 5
Reputation : 1
Language : English
Re: Help with coding custom bbcodes
Could you post how you added the new color?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Help with coding custom bbcodes
Here's the code. Pretty sure it's in Javascript but I'm not 100%.
Got it from some guy named Rideem on fmquery. I think you might've linked someone else to it in another thread.
Anyway, it adds (color=lightred)(/color) to the text box when you click on the button, but that's it. Know how to actually make the color light red when you post?
- Code:
(function(){var d={add:function(b,e,c){$(function(){if(document.getElementById("text_edit")){void 0==c&&(c="");var a=document.createElement("span");a.innerHTML='<button class="button2" style="height: 22px; margin-right: 5px;" onClick="bbfontstyle(\''+e+"', '"+c+"'); return false;\">"+b+"</button>";document.getElementById("new_buttons_area").appendChild(a)}})},list:function(b,e,c){$(function(){if(document.getElementById("text_edit")){var a=document.createElement("span");a.innerHTML='<input type="button" style="height: 22px; margin-right: 5px;" value="'+ b+'" onclick="selectWysiwyg(this, \''+c+'\');" class="button2">';document.getElementById("new_buttons_area").appendChild(a);a=document.createElement("div");a.id=c;a.className="select";a.style.visibility="hidden";for(var d in e)a.innerHTML+="<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+e[d]+"', '');selectWysiwyg(this, '"+c+"');return false;\">"+d+"</button><br>";document.getElementById("text_editor_select_controls").appendChild(a)}})}, init:function(){$(function(){if(document.getElementById("html_edit")){var b=document.createElement("div");b.id="new_buttons_area";b.style.paddingTop="5px";document.getElementById("html_edit").parentNode.insertBefore(b,document.getElementById("html_edit").nextSibling)}})}};window.buttons=d;d.init()})();
buttons.add('Light red', '[color=lightred]','[/color]');
Got it from some guy named Rideem on fmquery. I think you might've linked someone else to it in another thread.
Anyway, it adds (color=lightred)(/color) to the text box when you click on the button, but that's it. Know how to actually make the color light red when you post?
Rarcer- New Member
- Posts : 5
Reputation : 1
Language : English
Re: Help with coding custom bbcodes
One problem is that there is not a color called light red.
Take a look here for the lists of colors - http://en.wikipedia.org/wiki/Hex_color & http://en.wikipedia.org/wiki/List_of_colors
Take a look here for the lists of colors - http://en.wikipedia.org/wiki/Hex_color & http://en.wikipedia.org/wiki/List_of_colors
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Help with coding custom bbcodes
Nevermind I just got the hexcode for the color I wanted and added it. Works like I wanted it to. Thanks for your help, slg.
Rarcer- New Member
- Posts : 5
Reputation : 1
Language : English
Re: Help with coding custom bbcodes
Topic Solved & Locked |
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum