Add quicktags Add quicktags
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Add quicktags

Started by dwo, July 01, 2008, 11:13:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dwo

Hello.

I searched a way to add quicktags to the comment field.

I found http://alexking.org/projects/js-quicktags

Download, tweak the .js file to your needs, upload it to root and edti theme.php function

// HTML template for the form to add comments
if (!isset($template_add_your_comment)) { //{THEMES}

...

<!-- BEGIN input_box_no_smilies -->
                                <td class="tableb_compact">
                                <textarea class="textinput" id="message" name="msg_body" style="width: 550px;" rows="6"></textarea>
  <script class="comment_button" type="text/javascript">edToolbar('message');</script>
<!-- END input_box_no_smilies -->


This adds quicktags.

I think adding them anywhere, eg description is as easy.

Do not forget to pay at least the one dollar 35 ;)

Only formatting the buttons with css didnt work...

regards, Dietmar


dwo

Of course, you additionally have to call the script in template.html with <script ... command.

dwo

Just found out:

To format the button, you have to insert code into the .js file.

default:
document.write('<input class="comment_button" type="button" id="' + button.id + '_' + which + '" ' + accesskey + ' class="ed_button" onclick="edInsertTag(\'' + which + '\', ' + i + ');" value="' + button.display + '"  />');
break;