BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x - Page 3 BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x - Page 3
 

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

Main Menu

BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x

Started by Αndré, January 05, 2009, 02:14:00 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Mimer

Danish languagefile for BBCode Control plugin.

Mimer  8)

Αndré

Thank you for your contribution. Danish language file added in svn revision 8188.

phill104

Some thoughts on enhancements that I would love to see.

Actual buttons directly under the intermediate images with copy to clipboard for image link to intermediate or thumb and a button to embed the intermediate or thumb with link in a forum

Those buttons should be selectable in the admin panel so the user can select whether the links should be to intermediate or thumb or even fullsize image.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

Thank you for your suggestion. I want to remove that feature from this plugin and create a new one with much more embedding options since some months, but haven't done yet because of little time and too little personal needs, but I'll add your suggestion to the new plugin if I'll create it sometime in the future :)

phill104

Yep, I think it would be a good idea to have separate plugins for the bbcode buttons and this. We had a mod Stramm (iirc) made for 1.4.x and it was quite popular for the bbcode buttons but it took fiddling with code to choose the sizes of images. Made as a plugin with options in the back end would work really well.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré


profili

I have a question: how can I add the BBCode fild under the photo. I find that under file information area it is too hidden and most of the users wont notice it.

GeoffTheBeard

Quote from: Αndré on January 05, 2009, 02:14:00 PM
What it does:

  • Get control over the bbcodes. You can enable/disable the processing of each bbcode.
  • Add new bbcode tags to your gallery (size, tt, hr, quote, youtube).
  • Add some buttons in the comment area for easy use of bbcodes. You can set who will see these buttons (nobody, admin only, everybody).
  • Show pre-built bbcode in file info. You can copy & paste the bbcode wherever you want.
  • Set maximum width/height of images via [img] tag.

A new button appears in the admin menu. There you can set everything related to bbcodes.

Download: http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/cpg1.5.x_plugin_bbcode_control_v1.9.zip/download

Thank you very much for this code. I don't know what to do with it. I've been using Coppermine for years (on someone else's server which is now dead) so have now installed it to my own website. My principal reason for installing it is as an "uploader" to post images on other forum sites. I thus want to be able to access BBCode for the individual (full size) images. I've searched extensively, and this seems to be the best option for me to enable that.

I was a programmer for many years, so can understand technical terms, but I've never been taught php or css, so don't know their particular attributes. I may be posting in the wrong place. If so, can you give me a link to the right one?

Hoping you can help me,

Geoff the Beard

Αndré

Quote from: GeoffTheBeard on September 15, 2011, 10:05:54 PM
I may be posting in the wrong place
Yes ;)
Quote from: GeoffTheBeard on September 15, 2011, 10:05:54 PM
understand technical terms
BBCode is always processed on the target page, so for your purpose you don't need this plugin, as it won't change anything on the target pages. Actually this plugin adds a prepared BBCode to the gallery which you can easily copy to other pages. It's still a bonus feature of this plugin, but I plan to outsource it to an extra plugin (with some options). But that's already some months on my to-do list, so you shouldn't wait for that dedicated plugin 8)

phill104

Another option would be to use the Enlargit plugin as that has a bbcode button to generate code for pasting images and links. Unfortunately it currently has some minor problems with IE9 but I believe Timo is working on that.
It is a mistake to think you can solve any major problems just with potatoes.

altenae

I have one issue with this plugin.

Some uploaded pictures don't have a intermediate size other have.

I have :

Thumbnail and the 1024px width picture
Thumbnail and the 1024px width picture and full size 1600px


When using this code (sse below) the normal returns an empty png file.
This is because there is a normal_ image when uploaded with 1600 width, but there is no normal_ image when uploaded with 1024 width, because in this case this is the full size one.


How can I solve this

$url = $CONFIG['ecards_more_pic_target'].'displayimage.php?pid='.$CURRENT_PIC_DATA['pid'];

$thumb = '(http://'.$CONFIG['ecards_more_pic_target'%5D.get_pic_url($CURRENT_PIC_DATA,%20'thumb').')';
$normal = '(http://'.$CONFIG['ecards_more_pic_target'%5D.get_pic_url($CURRENT_PIC_DATA,%20'normal').')';



$info['BBCode full size'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">'.$full.'</textarea>';

$info['BBCode thumb size'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">'.$normal.'</textarea>';

Αndré

Quote from: altenae on October 30, 2011, 04:04:22 PM
I have one issue with this plugin.

Some uploaded pictures don't have a intermediate size other have.

I have :

Thumbnail and the 1024px width picture
Thumbnail and the 1024px width picture and full size 1600px


When using this code (sse below) the normal returns an empty png file.
This is because there is a normal_ image when uploaded with 1600 width, but there is no normal_ image when uploaded with 1024 width, because in this case this is the full size one.


How can I solve this

$url = $CONFIG['ecards_more_pic_target'].'displayimage.php?pid='.$CURRENT_PIC_DATA['pid'];

$thumb = '(http://'.$CONFIG['ecards_more_pic_target'%5D.get_pic_url($CURRENT_PIC_DATA,%20'thumb').')';
$normal = '(http://'.$CONFIG['ecards_more_pic_target'%5D.get_pic_url($CURRENT_PIC_DATA,%20'normal').')';



$info['BBCode full size'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">'.$full.'</textarea>';

$info['BBCode thumb size'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">'.$normal.'</textarea>';

Double post >:(

As this is no core functionality of this plugin, it won't be further discussed in this thread, but on the other one.

Αndré

Version 1.10 attached to initial post.

Changelog:

  • The "Show pre-built bbcode in file info" feature has been outsourced to the Embed Code plugin.

brad4edat

Quote from: brad4edat on December 07, 2011, 02:48:32 AM
Hello all.

I want to use bbcode plugin from gallery to display 3D videos from youtube in the comments in my gallery.

bbcode plugin works very well, but only with the ordinary normal videos! 3D videos fail to run in 3D view.

Must change the code itself bbcode plugin.
// insert youtube video
    if (!in_array('youtube', $bbcode_tags_disabled)) {
        $youtube_embed_code_replacement  = "<object type=\"application/x-shockwave-flash\" width=\"640\" height=\"385\" data=\"http://www.youtube.com/v/\\2&hl=de&fs=1\">";
        $youtube_embed_code_replacement .= "<param name=\"movie\" value=\"http://www.youtube-nocookie.com/v/\\2&hl=de&fs=1\" />";
        $youtube_embed_code_replacement .= "<param name=\"allowfullscreen\" value=\"true\" />";
        $youtube_embed_code_replacement .= "</object>";
        $text = preg_replace("/\[youtube\].*(youtube\.com\/watch\?v=|youtu\.be\/)(.*)\[\/youtube\]/Usi", $youtube_embed_code_replacement, $text);
    }



The forum (phpp2) on my site also has bbcode plugin and everything is fine with the 3D view clips from youtube.
  Regularly with bbcode in the forum look like this:
<object width="420" height="315"><param name="movie" value="http://{TEXT1}youtube.com/v/{TEXT2}?version=3&amp;hl=bg_BG&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://{TEXT1}youtube.com/v/{TEXT2}?version=3&amp;hl=bg_BG&amp;rel=0" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>


Can anyone tell me how to modify rows bbcode plugin, to work and 3D videos from youtube.
I think I have a very small correction, but do not understand programming languages ​​and I can not rewrite its own code.

Here's how it looks wrong when a 3D video in the comment to my gallery-
http://3d-universe.net/Gallery/displayimage.php?pid=1280&message_id=ee6da879373adf0f7fb22d4720c131de&message_icon=info#im=0

And here is how must to looks with right bbcode -
http://3d-universe.net/3d-forum/viewtopic.php?f=67&t=497

Afonso

Portuguese translation to BBcode_control plugin
In my site works good
Afonso de Bragança - RJ
PhotoAves

Αndré

Thank you for your contribution. Portuguese language file added in SVN revision 8352.

Afonso

Is possible insert the buttons of the BBCode plugin, in the area of description of the image ?[/font]
Image example
Afonso de Bragança - RJ
PhotoAves

Αndré

You can use the new BBCodes everywhere where you're able to use the stock BBCodes.

doppler

plugin is super! thank you

Is there possibility for add my own BBCode to the plugin? I have few which f.e. simply add link to another place of my page. I place a code in funciotns.php - but Andree sugested to use plugin instead of it.

f.e.

$text = str_replace("[mapa_nr]", '<a href=http://my_page/mapa/lista.php?numer=', $text);
$text = str_replace("[/mapa_nr]", ' >zlokalizuj na mapie</a>', $text);

Αndré

Open codebase.php, find
return $text;
and add your custom codes right above that line.