Kunena 6.2.6 released

The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Loved WYSIWYG BBCode editor

More
10 years 10 months ago - 10 years 10 months ago #1 by guerilla
i modified wysiBB WYSIWYG BBCode editor for kunena. it uses bbcode for rich text so it is compatible with kunena and safe.



installation:
add line 26 of com_kunena\template\blue_eagle initialize.php to this:
Code:
<script src="components/com_kunena/lib/wysibb/jquery.wysibb.js"></script> <link rel="stylesheet" href="components/com_kunena/lib/wysibb/theme/default/wbbtheme.css" />

go to com_kunena\template\blue_eagle\html\topic folder
open edit_editor.php and find this:
Code:
// Kunena bbcode editor ?>

and add this code below:
Code:
<script> var $j = jQuery.noConflict(); $j(document).ready(function() { $j("#message").wysibb() }) </script>

in edit_editor find and delete this codes:
Code:
<tr id="kpost-toolbar" class="krow<?php echo 1 + $this->k^=1;?>"> <td class="kcol-first kcol-editor-label"> <strong><?php echo JText::_('COM_KUNENA_BOARDCODE');?></strong></td> <td class="kcol-last kcol-editor-field"> <table class="kpostbuttonset"> <tr> <td class="kpostbuttons"> <ul id="kbbcode-toolbar"> <li> <script type="text/javascript">document.write('<?php echo JText::_('COM_KUNENA_BBCODE_EDITOR_JAVASCRIPT_LOADING', true) ?>')</script> <noscript><?php echo JText::_('COM_KUNENA_BBCODE_EDITOR_JAVASCRIPT_DISABLED') ?></noscript> </li> </ul> </td> </tr> <!-- Start extendable secondary toolbar --> <tr> <td class="kpostbuttons"> <div id="kbbcode-size-options" style="display: none;"> <span class="kmsgtext-xs" title='[size=1]' onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_FONTSIZE_XS', true);?>')">&nbsp;<?php echo JText::_('COM_KUNENA_EDITOR_SIZE_SAMPLETEXT'); ?>&nbsp;</span> <span class="kmsgtext-s" title='[size=2]' onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_FONTSIZE_S', true);?>')">&nbsp;<?php echo JText::_('COM_KUNENA_EDITOR_SIZE_SAMPLETEXT'); ?>&nbsp;</span> <span class="kmsgtext-m" title='[size=3]' onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_FONTSIZE_M', true);?>')">&nbsp;<?php echo JText::_('COM_KUNENA_EDITOR_SIZE_SAMPLETEXT'); ?>&nbsp;</span> <span class="kmsgtext-l" title='[size=4]' onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_FONTSIZE_L', true);?>')">&nbsp;<?php echo JText::_('COM_KUNENA_EDITOR_SIZE_SAMPLETEXT'); ?>&nbsp;</span> <span class="kmsgtext-xl" title='[size=5]' onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_FONTSIZE_XL', true);?>')">&nbsp;<?php echo JText::_('COM_KUNENA_EDITOR_SIZE_SAMPLETEXT'); ?>&nbsp;</span> <span class="kmsgtext-xxl" title='[size=6]' onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_FONTSIZE_XXL', true);?>')">&nbsp;<?php echo JText::_('COM_KUNENA_EDITOR_SIZE_SAMPLETEXT'); ?>&nbsp;</span> </div> <div id="kbbcode-color-options" style="display: none;"> <script type="text/javascript">kGenerateColorPalette('4%', '15px');</script> </div> <div id="kbbcode-link-options" style="display: none;"> <?php echo JText::_('COM_KUNENA_EDITOR_LINK_URL'); ?>&nbsp; <input id="kbbcode-link_url" name="url" type="text" size="40" value="http://" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_LINKURL', true); ?>')" /> <?php echo JText::_('COM_KUNENA_EDITOR_LINK_TEXT'); ?>&nbsp; <input name="text2" id="kbbcode-link_text" type="text" size="30" maxlength="150" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_LINKTEXT', true); ?>')" /> <input type="button" name="insterLink" value="<?php echo JText::_('COM_KUNENA_EDITOR_INSERT'); ?>" onclick="kbbcode.focus().replaceSelection('[url=' + document.id('kbbcode-link_url').get('value') + ']' + document.id('kbbcode-link_text').get('value') + '[/url]', false); kToggleOrSwap('kbbcode-link-options');" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_LINKAPPLY', true); ?>')" /> </div> <div id="kbbcode-image-options" style="display: none;"> <?php echo JText::_('COM_KUNENA_EDITOR_IMAGELINK_SIZE'); ?>&nbsp; <input id="kbbcode-image_size" name="size" type="text" size="10" maxlength="10" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_IMAGELINKSIZE', true); ?>')" /> <?php echo JText::_('COM_KUNENA_EDITOR_IMAGELINK_URL'); ?>&nbsp; <input name="url2" id="kbbcode-image_url" type="text" size="40" value="http://" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_IMAGELINKURL', true); ?>')" />&nbsp; <input type="button" name="Link" value="<?php echo JText::_('COM_KUNENA_EDITOR_INSERT'); ?>" onclick="kInsertImageLink()" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_IMAGELINKAPPLY', true); ?>')" /> </div> <?php if (!$this->message->parent && isset($this->poll)) : ?> <div id="kbbcode-poll-options" style="display: none;"> <?php JHtml::_('behavior.calendar'); ?> <label class="kpoll-title-lbl" for="kpoll-title"><?php echo JText::_('COM_KUNENA_POLL_TITLE'); ?></label> <input type="text" class="inputbox" name="poll_title" id="kpoll-title" maxlength="100" size="40" value="<?php echo $this->escape( $this->poll->title ) ?>" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_POLLTITLE', true); ?>')" /> <img id="kbutton-poll-add" src="<?php echo $this->ktemplate->getImagePath('icons/poll_add_options.png') ?>" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_ADDPOLLOPTION', true); ?>')" alt="<?php echo JText::_('COM_KUNENA_POLL_ADD_POLL_OPTION'); ?>" /> <img id="kbutton-poll-rem" src="<?php echo $this->ktemplate->getImagePath('icons/poll_rem_options.png' ) ?>" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_REMPOLLOPTION', true); ?>')" alt="<?php echo JText::_('COM_KUNENA_POLL_REMOVE_POLL_OPTION'); ?>" /> <label class="kpoll-term-lbl" for="kpoll-time-to-live"><?php echo JText::_('COM_KUNENA_POLL_TIME_TO_LIVE'); ?></label> <?php echo JHtml::_('calendar', isset($this->poll->polltimetolive) ? $this->escape($this->poll->polltimetolive) : '0000-00-00', 'poll_time_to_live', 'kpoll-time-to-live', '%Y-%m-%d',array('onmouseover'=>'javascript:document.id(\'helpbox\').set(\'value\', \''.JText::_('COM_KUNENA_EDITOR_HELPLINE_POLLLIFESPAN', true).'\')')); ?> <?php if($this->poll->exists()) { $x = 1; foreach ($this->poll->getOptions() as $poll_option) { echo '<div class="polloption">Option '.$x.' <input type="text" maxlength = "25" id="field_option'.$x.'" name="polloptionsID['.$poll_option->id.']" value="'.$poll_option->text.'" onmouseover="javascript:document.id(\'helpbox\').set(\'value\', \''.JText::_('COM_KUNENA_EDITOR_HELPLINE_OPTION', true).'\')" /></div>'; $x++; } } ?> <input type="hidden" name="nb_options_allowed" id="nb_options_allowed" value="<?php echo $this->config->pollnboptions; ?>" /> <input type="hidden" name="number_total_options" id="numbertotal" value="<?php echo ! empty ( $this->polloptionstotal ) ? $this->escape($this->polloptionstotal) : '' ?>" /> </div> <?php endif; ?> <?php if ($this->config->highlightcode) { $path = JPATH_ROOT.'/plugins/content/geshi/geshi/geshi'; if ( file_exists($path) ) { $files = JFolder::files($path, ".php"); ?> <div id="kbbcode-code-options" style="display: none;"> <?php echo JText::_('COM_KUNENA_EDITOR_CODE_TYPE'); ?> <select id="kcodetype" name="kcode_type" class="kbutton" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_CODETYPE', true); ?>')"> <?php echo '<option value = ""></option>'; foreach ($files as $file) echo '<option value = "'.substr($file,0,-4).'">'.substr($file,0,-4).'</option>'; ?> </select> <input id="kbutton_addcode" type="button" name="Code" onclick="kInsertCode()" value="<?php echo JText::_('COM_KUNENA_EDITOR_CODE_INSERT'); ?>" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_CODEAPPLY', true); ?>')" /> </div> <?php } } if ($this->config->showvideotag) { ?> <div id="kbbcode-video-options" style="display: none;"><?php echo JText::_('COM_KUNENA_EDITOR_VIDEO_SIZE'); ?><input id="kvideosize" name="videosize" type="text" size="5" maxlength="5" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_VIDEOSIZE', true); ?>')" /> <?php echo JText::_('COM_KUNENA_EDITOR_VIDEO_WIDTH'); ?><input id="kvideowidth" name="videowidth" type="text" size="5" maxlength="5" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_VIDEOWIDTH', true); ?>')" /> <?php echo JText::_('COM_KUNENA_EDITOR_VIDEO_HEIGHT'); ?><input id="kvideoheight" name="videoheight" type="text" size="5" maxlength="5" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_VIDEOHEIGHT', true); ?>')" /> <br /> <?php echo JText::_('COM_KUNENA_EDITOR_VIDEO_PROVIDER'); ?> <select id="kvideoprovider" name="provider" class="kbutton" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_VIDEOPROVIDER', true); ?>')"> <?php $vid_provider = array ('', 'Bofunk', 'Break', 'Clipfish', 'Dailymotion', 'DivX,divx]http://', 'Flash,flash]http://', 'FlashVars,flashvars param=]http://', 'MediaPlayer,mediaplayer]http://', 'Metacafe', 'MySpace', 'QuickTime,quicktime]http://', 'RealPlayer,realplayer]http://', 'RuTube', 'Sapo', 'Streetfire', 'Veoh', 'Videojug', 'Vimeo', 'Wideo.fr', 'YouTube', 'Youku' ); foreach ( $vid_provider as $vid_type ) { $vid_type = explode ( ',', $vid_type ); echo '<option value = "' . (! empty ( $vid_type [1] ) ? $this->escape($vid_type [1]) : JString::strtolower ( $this->escape($vid_type [0]) ) . '') . '">' . $this->escape($vid_type [0]) . '</option>'; } ?> </select> <?php echo JText::_('COM_KUNENA_EDITOR_VIDEO_ID'); ?><input id="kvideoid" name="videoid" type="text" size="11" maxlength="30" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_VIDEOID', true); ?>')" /> <input id="kbutton_addvideo1" type="button" name="Video" accesskey="p" onclick="kInsertVideo1()" value="<?php echo JText::_('COM_KUNENA_EDITOR_VIDEO_INSERT'); ?>" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_VIDEOAPPLY1', true); ?>')" /><br /> <?php echo JText::_('COM_KUNENA_EDITOR_VIDEO_URL'); ?><input id="kvideourl" name="videourl" type="text" size="30" maxlength="250" value="http://" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_VIDEOURL', true); ?>')" /> <input id="kbutton_addvideo2" type="button" name="Video" accesskey="p" onclick="kInsertVideo2()" value="<?php echo JText::_('COM_KUNENA_EDITOR_VIDEO_INSERT'); ?>" onmouseover="javascript:document.id('helpbox').set('value', '<?php echo JText::_('COM_KUNENA_EDITOR_HELPLINE_VIDEOAPPLY2', true); ?>')" /> </div> </td> </tr> <?php } if (!$this->config->disemoticons) : ?> <tr> <td class="kpostbuttons"> <div id="smilie"><?php $emoticons = KunenaHtmlParser::getEmoticons(0, 1); foreach ( $emoticons as $emo_code=>$emo_url ) { echo '<img class="btnImage" src="' . $emo_url . '" border="0" alt="' . $emo_code . ' " title="' . $emo_code . ' " onclick="kbbcode.focus().insert(\' '. $emo_code .' \', \'after\', false);" style="cursor:pointer"/> '; } ?> </div> </td> </tr> <?php endif; ?> <!-- end of extendable secondary toolbar --> <tr> <td class="kposthint"><input type="text" name="helpbox" id="helpbox" size="45" class="kinputbox" disabled="disabled" maxlength="100" value="<?php echo (JText::_('COM_KUNENA_EDITOR_HELPLINE_HINT')); ?>" /></td> </tr> </table> </td> </tr>

finally copy com_kunena\lib\wysibb folder to your kunena com_kunena\lib\wysibb folder. thats all.
do not forget back up your files before installation.

known issues:
-wysibb editor only supports youtube videos
-preview doesnt work

thanks for wysiBB coders for this beautiful editor.
Last edit: 10 years 10 months ago by guerilla.
The following user(s) said Thank You: dirkovision

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #2 by xillibit
Replied by xillibit on topic WYSIWYG BBCode editor
Hello,

Can-i see the code that you have made ?

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #3 by guerilla
Replied by guerilla on topic WYSIWYG BBCode editor
sure.

i added initialize.php to this code:
Code:
<script src="components/com_kunena/lib/wysibb/jquery.wysibb.js"></script> <link rel="stylesheet" href="components/com_kunena/lib/wysibb/theme/default/wbbtheme.css" />

edit_editor to this:
Code:
<script> var $j = jQuery.noConflict(); $j(document).ready(function() { $j("#message").wysibb() }) </script>

ofcourse deleted kunena's self bbcode tools.

and made a few bbcode modifications at jquery.wysibb.js to work more compatible with kunena.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #4 by xillibit
Replied by xillibit on topic WYSIWYG BBCode editor
Thanks, but what changes do you have made on jquery.wysibb.js ?

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #5 by guerilla
Replied by guerilla on topic WYSIWYG BBCode editor
not so much changes. i tell as i remembered.

i changed default language russian to english. i dont know why but some reason wysibb css wasnt work with kunena properly, the buttons wasnt seen etc., so i changed css classes. youtube bbcode wasnt working with kunena, i changed wysibb's youtube code to kunena.

and a question for you. i modified wysibb to quickreply, but i couldnt find where get('quickreply') code gets quick reply button options. i guess it gets from and array but which while contains this array. i mean which file creates quick reply buttons. while i wasnt using kunena, the forum structure has changed a lot.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #6 by xillibit
Replied by xillibit on topic WYSIWYG BBCode editor
Quick reply is just in template code, there is javascript to open the quick reply box and close it, there is nothing more

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago - 10 years 10 months ago #7 by guerilla
Replied by guerilla on topic WYSIWYG BBCode editor
i couldnt explain what i wanna say, i guess. i modified wysibb to quickreply. but the thing is, in kunena every message has a quickreply box in bottom. but i wanna change this to one quickreply at bottom of page to all messages like here:

www.kunena.org/forum/133-K-15-Common-Que...ect-auto-quick-reply

in old kunena it wasnt a problem. but in new kunena i couldnt understan forum structure yet.


i mean this code. look the code below:
Code:
<a id="kreply145132" class="kicon-button kbuttoncomm kqreply btn-left" href="/forum/114-User-written-hacks/127855-hack-wysiwyg-bbcode-editor-for-kunena/reply/145132" rel="nofollow" title="Quick reply this message."> <span class="reply"><span>Quick Reply</span></span> </a>

i moved qucikreply box to end of the page. but i must change all quickreply buttons click action to open this one box. i wondering in which file this code created.

thanks...
Last edit: 10 years 10 months ago by guerilla.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #8 by xillibit
Replied by xillibit on topic WYSIWYG BBCode editor
Form Kunena 2.0 there aren't majors changes on this part, what you can if put a specific CSS class on quick reply button like and add a javascript code to detect click on quick reply button and open quick reply box

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #9 by guerilla
Replied by guerilla on topic WYSIWYG BBCode editor

xillibit wrote: Form Kunena 2.0 there aren't majors changes on this part, what you can if put a specific CSS class on quick reply button like and add a javascript code to detect click on quick reply button and open quick reply box


last version i used was kunena 1.5, i think.


you can use sceditor for an alternative WYSIWYG BBCode editor solution. it is simple and good too, but i cant solve jquery conflict on sceditor with kunena.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #10 by ChaosHead
Replied by ChaosHead on topic WYSIWYG BBCode editor
Look at Xenforo. There's incredible text editor. The only question is whether there is a desire for Kunena developers to add new features?

Please Log in or Create an account to join the conversation.

Time to create page: 0.471 seconds