Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 2 3 [4] 5   Go Down

Author Topic: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x  (Read 136571 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: 15764

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: 15764

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: 15764
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: 73
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: 15764

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: 73
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: 15764
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: 15764
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: 15764

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: 15764
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

wilk

  • Translator
  • Coppermine regular visitor
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 51
  • Wilk Wilkowy
    • #QuizPL @ IRCnet
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #75 on: August 28, 2015, 10:30:01 pm »

Polish translation for 1.11 (this is my private translation I've used on my gallery - now updated to 1.11, not updated doppler's one, it differs a bit).

I've also attached a patch for bug when index.php is redirected to /:

Code: [Select]
-echo "<form action=\"index.php?file=bbcode_control/admin\" method=\"post\">";
+echo '<form action="'.$superCage->server->getEscaped('REQUEST_URI').'" method="post">';
Logged
PM me for Polish translations (new/update)

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #76 on: August 31, 2015, 04:11:02 pm »

Updated and fixed in SVN revision 8807.
Logged

twoclones

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #77 on: May 12, 2016, 09:23:14 pm »

This plugin looks as if it could be 'enhanced' to allow using PayPal buttons in the description area.  I tried adding support for 'form' and 'input' to codebase.php but failed because the PayPal button code required type, name, value and the URL in the tags. 

I'd think someone more skilled than myself could make the plugin use the contents of the form and input tags.
Below is an example of a PayPal button in case someone would like to help. :)

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="43DNKJHUDBB8G">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
Logged

Αndré

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

If the button has always the same code, there's probably a better way to add that functionality than modifying this plugin. Please post more details.
Logged

twoclones

  • Coppermine newbie
  • Offline Offline
  • Posts: 15
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #79 on: May 13, 2016, 02:55:34 am »

IF I always select the same options (which is fine for me), the only change to the button code is one of the input tags.  It's value changes with every new item and all of my items are unique.

This is the line that must have a different value every time.
Code: [Select]
<input type="hidden" name="hosted_button_id" value="VQBCE2PMJQPLL">
Logged
Pages: 1 2 3 [4] 5   Go Up
 

Page created in 0.027 seconds with 20 queries.