Advanced search  

News:

cpg1.5.36 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.34 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 3 [4]   Go Down

Author Topic: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x  (Read 53836 times)

0 Members and 1 Guest are viewing this topic.

doppler

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21

Open codebase.php, find
Code: [Select]
return $text;and add your custom codes right above that line.
working - very thank you again :)
one question more:
is the possibility tu show this in config list ? (I put my bbcodes in the list of "available tags" little below - and also add tag in language file - my bbcode was shown on the list - but bbcodes didn't work)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 14316

I assume you need to uninstall/install the plugin again after you applied your changes to insert required rows to the database.
Logged

doppler

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #62 on: May 02, 2012, 02:55:48 PM »

works!

In thank I add polish language translation
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 14316

Added Polish language file in SVN revision 8388. Thank you for your contribution.
Logged

hamgah

  • Translator
  • Coppermine newbie
  • **
  • Country: ir
  • Offline Offline
  • Posts: 3
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #64 on: April 08, 2013, 08:02:30 AM »

And here is the Persian lang file.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 14316
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #65 on: April 09, 2013, 11:45:37 AM »

Added Persian language file in SVN revision 8547. Thank you for your contribution.
Logged

Aziz108

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Uncaught exception
« Reply #66 on: April 21, 2014, 05:13:28 PM »

Hello! I don't know should I post this here or at forum plugin thread. I've installed forum plugin and bbcode control plugin. But bbcodes do not work with forum whenever I click their buttons - and I get this error in Opera and Chrome console:

Opera:
Quote
Uncaught exception: ReferenceError: Undefined variable: insert_bbcode_tag
Chrome:
Quote
Uncaught ReferenceError: insert_bbcode_tag is not defined

Every other instances of bbcode (photo comments, etc) work fine, only forum is affected. Seems as some JavaScripts are not included. Where should I include them and which one?

I have latest  cpg1.5.28. Please help.
Logged

Tankertom

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 69
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #67 on: May 03, 2015, 07:48:52 PM »

hi,
there is the possibility to implement mp3?
phpbbandbbcodes.com/viewtopic.php?f=14&t=433#.VUZcSkHc34Y

VG TT
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 14316

Should be quite easy, but I'd suggest to use the HTML5 "audio" tag instead of a Flash based solution: http://www.w3schools.com/html/html5_audio.asp
Logged

Tankertom

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 69
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #69 on: June 02, 2015, 10:52:58 AM »

and how??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 14316
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #70 on: June 02, 2015, 09:04:30 PM »

You need to add the tag at least to the available BBCode tags list and add a replacement code. You should also add a new language string to the plugin's language file(s) and you also add a new icon mp3.png. Here (and attached) is a patch proposal:
Code: [Select]
Index: codebase.php
===================================================================
--- codebase.php (revision 8783)
+++ codebase.php (working copy)
@@ -188,6 +188,10 @@
         $text = preg_replace("/\[youtube\].*(youtube\.com\/watch\?v=|youtu\.be\/)(.*)\[\/youtube\]/Usi", $youtube_embed_code_replacement, $text);
     }
 
+    if (!in_array('mp3', $bbcode_tags_disabled)) {
+        $text = preg_replace("/\[mp3](.*)\[\/mp3\]/Usi", "<audio controls><source src=\"\\1\" type=\"audio/mpeg\">Your browser does not support the audio element.</audio>", $text);
+    }
+
     // insert quote
     if (!in_array('quote', $bbcode_tags_disabled)) {
         $style = "style=\"background-image:url(plugins/bbcode_control/images/quote_show.png); background-repeat:no-repeat; background-position:top right; padding-right:40px;\"";
@@ -244,6 +248,7 @@
         'url', // cpg standard
         'img', // cpg standard
         'youtube',
+        'mp3',
         'pid', // cpg special for internal referencing
         'aid', // cpg special for internal referencing
         'cid', // cpg special for internal referencing
Index: lang/english.php
===================================================================
--- lang/english.php (revision 8783)
+++ lang/english.php (working copy)
@@ -44,6 +44,7 @@
 $lang_plugin_bbcode_control['size'] = 'Font size';
 $lang_plugin_bbcode_control['quote'] = 'Quote';
 $lang_plugin_bbcode_control['youtube'] = 'Youtube video';
+$lang_plugin_bbcode_control['mp3'] = 'MP3 audio file';
 $lang_plugin_bbcode_control['tt'] = 'Teletype';
 $lang_plugin_bbcode_control['hr'] = 'Horizontal rule';
 $lang_plugin_bbcode_control['pid'] = 'Picture in this gallery';


Maybe I'll add this to the next plugin version. If so, the tag's name will probably be "audio" and will support all supported HTML5 audio file types (mp3, ogg, wav).
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 14316
Re: Uncaught exception
« Reply #71 on: June 02, 2015, 09:47:32 PM »

Hello! I don't know should I post this here or at forum plugin thread. I've installed forum plugin and bbcode control plugin. But bbcodes do not work with forum whenever I click their buttons - and I get this error in Opera and Chrome console:

Opera:Chrome:
Every other instances of bbcode (photo comments, etc) work fine, only forum is affected. Seems as some JavaScripts are not included. Where should I include them and which one?

I have latest  cpg1.5.28. Please help.

Works as expected for me (cpg1.5.36, BBCode control 1.10, Forum 2.1), regardless which plugin comes first in the plugin list. Have you installed any other plugins or mods to your gallery? Sorry for the late reply.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 14316

Maybe I'll add this to the next plugin version. If so, the tag's name will probably be "audio" and will support all supported HTML5 audio file types (mp3, ogg, wav).

Added in version 1.11 (attached to initial post).
Logged

pjhsGeorge

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #73 on: June 06, 2015, 06:34:38 PM »

The BBCode does not show for editing Pictures Coppermine Gallery??  The plugin shows installed and I have the admin capability.  What did I miss?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 14316
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #74 on: June 09, 2015, 10:20:41 PM »

The plugin has been created to display the buttons while adding/editing comments:
Code: [Select]
// bbcode buttons
$thisplugin->add_filter('theme_add_comment', 'buttons_add_comment');
$thisplugin->add_filter('theme_edit_comment', 'buttons_edit_comment');

If you want to display it elsewhere, the plugin needs to be modified accordingly.
Logged
Pages: 1 2 3 [4]   Go Up
 

Page created in 0.075 seconds with 20 queries.