1 webbymonster Jul 28, 2006 15:05
3 webbymonster Jul 28, 2006 15:13
Thanks your reply. My version of b2evolution is 1.8
4 totof Jul 28, 2006 15:34
You can define your acronym in the custom.css
;)
5 webbymonster Jul 28, 2006 15:55
I want tag in the admin area when i post the message. The tag acronym i want to be in the line of bbcode. I don't know the metod for add the script in the plugin "_quicktags.plugin.php".
No css but line bbcode.
Thanks!! :)
6 totof Jul 28, 2006 16:46
Sorry, but I don't know how to customize this file.
Wait for an expert...
;)
7 webbymonster Jul 28, 2006 16:56
ok... thanks for your help!! :D
8 webbymonster Jul 28, 2006 20:08
I have need help for this modification.
Thanks!! :'(
9 jibberjab Jul 29, 2006 03:11
I'm by no means an expert, and I've been away from the forums for several months now, but I figured the best way to return would be to provide something useful, so here goes...
First, make a backup copy of your /plugins/toolbars/_quicktags.toolbar.php file.
Then, scroll to the section in the file that lists the actual buttons and add the code for your shiny new button:
b2evoButtons[b2evoButtons.length] = new b2evoButton('b2evo_acronym'
,'ACR'
,'<acronym title="example_title">text</acronym>',''
,'x'
,'<?php echo T_('Acronym [ALT-X]') ?>'
);
The letter 'x' is arbitrary. You can make it whatever letter you want as long as it hasn't already been used for one of the pre-existing buttons. The 'ACR' text is what the actual button will show in the toolbar.
The safest way to add this code is to copy an existing button in the _quicktags.toolbar.php file, paste it below itself, and then manually make the changes. This ensures that the line-spacing and tabs are maintained. If they are not, the file will most likely break your admin interface (which is why you remembered to make that backup of the file before you made any changes). My example comes from a 0.92 installation, but unless something has been seriously changed with the way buttons work, it should work for you.
It's good to be back.
jj.
10 webbymonster Jul 29, 2006 12:10
Thanks for your reply. I insert the code in the plugin with this modification:
b2evoButtons[b2evoButtons.length] = new b2evoButton(
'b2evo_acronym'
,'acr'
,'<acronym title="example_title">','</acronym>'
,'y'
,'<?php echo T_('Acronym [ALT-y]') ?>'
);
else if (button.id == 'b2evo_acronym')
{
document.write('<input type="button" title="' + button.tit + '" class="quicktags" onclick="b2evoInsertAcronym(b2evoCanvas, ' + i + ');" value="' + button.display + '" />');
}
function b2evoInsertAcronym(myField) {
var myValue = prompt('<?php echo T_('title') ?>:', '');
if (myValue) {
myValue = '<acronym title="'
+ myValue
+ '" >';
b2evoInsertContent(myField, i);
}
}
My modification it's wrong. What's error?! :(
Thanks!
Hello,
which version do you use?