Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 20, 2009, 11:00:44 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: cpg1.5.2 beta released
The brand new cpg1.5.x series that comes with a lot of new features finally has reached the release stage: a first public beta release cpg1.5.2 has been released that is mainly aimed at translators, testers and community members that have contributed in the past. The beta release is not meant to be used in a production environment, but only on testbeds and for evaluation purposes. There is currently no support for cpg1.5.x yet!
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Add quicktags  (Read 6042 times)
0 Members and 1 Guest are viewing this topic.
dwo Topic starter
Coppermine frequent poster
***
Switzerland Switzerland

Posts: 138


« on: July 01, 2008, 10:13:04 pm »

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

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

Code:
<!-- 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 Wink

Only formatting the buttons with css didnt work...

regards, Dietmar

Logged
dwo Topic starter
Coppermine frequent poster
***
Switzerland Switzerland

Posts: 138


« Reply #1 on: July 02, 2008, 08:31:12 am »

Of course, you additionally have to call the script in template.html with <script ... command.
Logged
dwo Topic starter
Coppermine frequent poster
***
Switzerland Switzerland

Posts: 138


« Reply #2 on: July 02, 2008, 08:54:00 am »

Just found out:

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

Code:
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;
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.031 seconds with 15 queries.