admin Site Admin
Joined: 09 Apr 2007 Posts: 1
|
Posted: Wed May 23, 2007 12:09 pm Post subject: Adding the Quicktags button to the main panel |
|
|
Quicktags help:
For Wordpress 2.1.3
The easiest way is to replace the file
Wordpress\wp-includes\js\quicktags.js
on the one located at:
plugins\seetheface\quicktags.js
Make sure you back up your original quicktags.js file before you replace it with the one supplied by SeeTheFace.
Manually editing the quicktabs.js file
Find the following piece of code:
| Code: | edButtons[edButtons.length] =
new edButton('ed_strong'
,'b'
,'<strong>'
,'</strong>'
,'b'
); |
Insert the code bellow, right after the one shown above:
| Code: | edButtons[edButtons.length] =
new edButton('ed_seetheface'
,'video'
,''
,''
,''
,-1
); |
Locate the following piece of code:
| Code: | function edShowButton(button, i) {
if (button.id == 'ed_img') {
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertImage(edCanvas);" value="' + button.display + '" />');
}
else if (button.id == 'ed_link') {
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertLink(edCanvas, ' + i + ');" value="' + button.display + '" />');
}
else {
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertTag(edCanvas, ' + i + ');" value="' + button.display + '" />');
}
}
|
and replace it with the one bellow:
| Code: | function edShowButton(button, i) {
if (button.id == 'ed_img') {
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertImage(edCanvas);" value="' + button.display + '" />');
}
else if (button.id == 'ed_link') {
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertLink(edCanvas, ' + i + ');" value="' + button.display + '" />');
}
else if (button.id == 'ed_seetheface') {
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edSeetheface(edCanvas);" value="' + button.display + '" />');
}
else {
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertTag(edCanvas, ' + i + ');" value="' + button.display + '" />');
}
} |
And finally add this function to the end of the file:
| Code: | function edSeetheface(myField) {
popUp = open("../wp-content/plugins/seetheface/seethefacelist.php","Video list","width=780,height=430,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=yes")
} |
|
|