Coding-Spot

You are not connected. Please login or register

Go to page : 1, 2  Next

 
 

how to add staff option

Message (Page 1 of 2)


 
Advance Member

Posted on Fri May 31, 2013 10:28 am

 
http://prntscr.com/17jcxk

hello how to add staff option like in the quick reply?



View user profile



 
Administrator
Administrator

Posted on Fri May 31, 2013 10:31 am

 
This was an old tutorial of fmquery, but since they're close, the owner of the site posted it instead on avacweb.
Here: http://www.avacweb.com/t993-how-to-create-a-new-text-editor-button

Happy



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri May 31, 2013 3:11 pm

 
Code:
(function(){var f={add:function(c,d,b){$(function(){if(document.getElementById("html_edit")){void 0==b&&(b="");var a=document.createElement("span");a.innerHTML='<button class="button2" style="height: 22px; margin-right: 5px;" onClick="bbfontstyle(\''+d+"', '"+b+"'); return false;\">"+c+"</button>";document.getElementById("new_buttons_area").appendChild(a)}})},list:function(c,d,b){$(function(){if(document.getElementById("text_edit")){var a=document.createElement("span");a.innerHTML='<input type="button" style="height: 22px; margin-right: 5px;" value="'+ c+'" onclick="selectWysiwyg(this, \''+b+'\');" class="button2">';document.getElementById("new_buttons_area").appendChild(a);a=document.createElement("div");a.id=b;a.className="select";a.style.visibility="hidden";for(var e in d)a.innerHTML=/,/.test(d[e])?a.innerHTML+("<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+d[e].replace(/(.*),.*/,"$1")+"', '"+d[e].replace(/.*,(.*)/,"$1")+"');selectWysiwyg(this, '"+b+"');return false;\">"+e+"</button><br>"): a.innerHTML+("<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+d[e]+"', '');selectWysiwyg(this, '"+b+"');return false;\">"+e+"</button><br>");document.getElementById("text_editor_select_controls").appendChild(a)}})},init:function(){$(function(){if(document.getElementById("html_edit")){var c=document.createElement("div");c.id="new_buttons_area";c.style.paddingTop="5px";document.getElementById("html_edit").parentNode.insertBefore(c,document.getElementById("html_edit").nextSibling)}})}}; window.buttons=f;f.init()})();
buttons.add('Image', '[img]', '[/img]');
buttons.list('Test List', {
'Code': '[code],[/code]',
'Bump': 'Bumping this topic!',
'Image': '[img],[/img]'
}, 'bbcode_list_1');
buttons.list('Test List', {
'Happy': ':)',
'Sad': ':(',
}, 'bbcode_list_2');

little bit confuse where can i add the bb codes? in 'bbcode_list_1' and bbcode_list_2'?



View user profile



 
Administrator
Administrator

Posted on Fri May 31, 2013 3:16 pm

 
I can't explain it, i don't know how i can tell you in the way you'll get it.
Just try it on your test forum first, then you'll see the output, then try clicking the buttons so you can get how it'll work. Happy



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri May 31, 2013 3:19 pm

 
ok mark. on that code where can i put the button image?



View user profile



 
Administrator
Administrator

Posted on Fri May 31, 2013 3:27 pm

 
What do you mean? Oh my



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri May 31, 2013 3:28 pm

 
Code:
buttons.add('Image', '[img]', '[/img]');
buttons.list('Test List', {
'Code': '[code],[/code]',
'Bump': 'Bumping this topic!',
'Image': '[img],[/img]'
}, 'bbcode_list_1');
buttons.list('Test List', {
'Happy': ':)',
'Sad': ':(',
}, 'bbcode_list_2');

on this code mark.. what part need to be edit and change?



View user profile



 
Administrator
Administrator

Posted on Fri May 31, 2013 3:34 pm

 
Ok, i'll explain.

On the buttons.add part, the Image will be shown as the tab, then when you click it, the [ img ] tag will shown up.
On the buttons.list part, the Test List will be shown as the tab, when you click it, there will be sub-list, the Code, Bump and Image, when you click the Code, the [ code ] tag will shown up. When you click the Bump, the Bumping this topic! will shown up and so on.

Same goes to the 2nd buttos.list, the difference they have is the bbcode_list, it has the 1 and the 2, since there are 2 buttons list.



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri May 31, 2013 3:43 pm

 
mm mark .. i confuse.. i want like on your forum when click Staff Option>>Topic Solved>>

this message will automatically shown :
Code:
Since the problem is now solved i will locked this and move to archive section. [color=green][b]~Locked and Moved[/b][/color] :happy:

i want only to revise it. and change it on my own.. under the "staff option", "Approved and Information"
and when click the approved this BB codes will shown.

Code:
[table class="solved"][tr][td]Approved[/td][/tr][/table]



View user profile



 
Administrator
Administrator

Posted on Fri May 31, 2013 3:48 pm

 
Here, use this one instead:
Code:
(function(){var f={add:function(c,d,b){$(function(){if(document.getElementById("html_edit")){void 0==b&&(b="");var a=document.createElement("span");a.innerHTML='<button class="button2" style="height: 22px; margin-right: 5px;" onClick="bbfontstyle(\''+d+"', '"+b+"'); return false;\">"+c+"</button>";document.getElementById("new_buttons_area").appendChild(a)}})},list:function(c,d,b){$(function(){if(document.getElementById("text_edit")){var a=document.createElement("span");a.innerHTML='<input type="button" style="height: 22px; margin-right: 5px;" value="'+ c+'" onclick="selectWysiwyg(this, \''+b+'\');" class="button2">';document.getElementById("new_buttons_area").appendChild(a);a=document.createElement("span");a.id=b;a.className="select";a.style.visibility="hidden";for(var e in d)a.innerHTML=/,/.test(d[e])?a.innerHTML+("<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+d[e].replace(/(.*),.*/,"$1")+"', '"+d[e].replace(/.*,(.*)/,"$1")+"');selectWysiwyg(this, '"+b+"');return false;\">"+e+"</button><br>"): a.innerHTML+("<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+d[e]+"', '');selectWysiwyg(this, '"+b+"');return false;\">"+e+"</button><br>");document.getElementById("text_editor_select_controls").appendChild(a)}})},init:function(){$(function(){if(document.getElementById("html_edit")){var c=document.createElement("span");c.id="new_buttons_area";c.style.paddingTop="5px";document.getElementById("html_edit").parentNode.insertBefore(c,document.getElementById("html_edit").nextSibling)}})}}; window.buttons=f;f.init()})();

buttons.list('Staffs Option', {
'Approved': '[table class=solved][tr][td]Approved[/td][/tr][/table]',
}, 'bbcode_list_1');



Last edited by Mark on Fri May 31, 2013 4:06 pm; edited 1 time in total



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri May 31, 2013 3:52 pm

 
doesnt work.. i cant see any staff button in quick reply
i add that code in JS



View user profile



 
Administrator
Administrator

Posted on Fri May 31, 2013 3:53 pm

 
Did you check the 'In the topics?'



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri May 31, 2013 3:56 pm

 
only in the topics? in ava check all pages?



View user profile



 
Administrator
Administrator

Posted on Fri May 31, 2013 4:06 pm

 
Well if you want to display it on the quick reply, check the In the Topics, but if you want to display it also on the full text editor, just check the All Pages.

Btw, i update the codes on post #10. Replace it with the new code.



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri May 31, 2013 4:10 pm

 
Mark wrote:Well if you want to display it on the quick reply, check the In the Topics, but if you want to display it also on the full text editor, just check the All Pages.

Btw, i update the codes on post #10. Replace it with the new code.

i used the code.. still not work.. no staff option button seen



View user profile



 
Administrator
Administrator

Posted on Fri May 31, 2013 4:10 pm

 
Try it again, i've posted first before i edited the post. Lol.



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri May 31, 2013 4:21 pm

 
Code:
(function(){var f={add:function(c,d,b){$(function(){if(document.getElementById("html_edit")){void 0==b&&(b="");var a=document.createElement("span");a.innerHTML='<button class="button2" style="height: 22px; margin-right: 5px;" onClick="bbfontstyle(\''+d+"', '"+b+"'); return false;\">"+c+"</button>";document.getElementById("new_buttons_area").appendChild(a)}})},list:function(c,d,b){$(function(){if(document.getElementById("text_edit")){var a=document.createElement("span");a.innerHTML='<input type="button" style="height: 22px; margin-right: 5px;" value="'+ c+'" onclick="selectWysiwyg(this, \''+b+'\');" class="button2">';document.getElementById("new_buttons_area").appendChild(a);a=document.createElement("span");a.id=b;a.className="select";a.style.visibility="hidden";for(var e in d)a.innerHTML=/,/.test(d[e])?a.innerHTML+("<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+d[e].replace(/(.*),.*/,"$1")+"', '"+d[e].replace(/.*,(.*)/,"$1")+"');selectWysiwyg(this, '"+b+"');return false;\">"+e+"</button><br>"): a.innerHTML+("<button onmouseout=\"this.className='';\" onmouseover=\"this.className='selectHover';\" onclick=\"bbfontstyle('"+d[e]+"', '');selectWysiwyg(this, '"+b+"');return false;\">"+e+"</button><br>");document.getElementById("text_editor_select_controls").appendChild(a)}})},init:function(){$(function(){if(document.getElementById("html_edit")){var c=document.createElement("span");c.id="new_buttons_area";c.style.paddingTop="5px";document.getElementById("html_edit").parentNode.insertBefore(c,document.getElementById("html_edit").nextSibling)}})}}; window.buttons=f;f.init()})();

buttons.list('Staffs Option', {
'Approved': '[table class=solved][tr][td]Approved[/td][/tr][/table]',
}, 'bbcode_list_1');

i use this code but same problem no staff option button seen.
http://prntscr.com/17koad



View user profile



 
Administrator
Administrator

Posted on Sat Jun 01, 2013 4:04 am

 
PM me a account that has access to Admin Panel.
Since i'll just do something on the JS Management.



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Sat Jun 01, 2013 2:55 pm

 
ok pm sent



View user profile



 
Administrator
Administrator

Posted on Sat Jun 01, 2013 3:04 pm

 
The problem is one of your javascript. Go to JS Management and find the one you named 'quote', uncheck the in the topics as this one causes bugs on other javascript, so i suggest you not to use it. Happy



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Sat Jun 01, 2013 3:16 pm

 
ow thanks on that mark.. how can i add more option on "Staff Option" i want to add some



View user profile



 
Administrator
Administrator

Posted on Sat Jun 01, 2013 3:21 pm

 
After this part:
Code:
'Approved': '[table class=solved][tr][td]Approved[/td][/tr][/table]',

Add this one: (Just edit them with your own desire)
Code:
'Text here': 'Text that will be displayed',



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Sat Jun 01, 2013 3:41 pm

 
it this features all user seen? the "Staff Option" Button?



View user profile



 
Administrator
Administrator

Posted on Sat Jun 01, 2013 3:45 pm

 
Yes. But i know no one uses it since it is not useful for them and aren't worth for them to use.



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Sat Jun 01, 2013 3:50 pm

 
hahaha ok mark.. do you have a bbcodes like in FM

the denied thread..
something like this:
http://prntscr.com/17qh8l

but im talking about.. the image was "X" sign and it is color red..



View user profile


#26

Sponsored content


 

Posted Today at 11:54 am

 





Message (Page 1 of 2)

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

In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

Users browsing this forum: None