Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3 4 5   Go Down

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

0 Members and 1 Guest are viewing this topic.

Akuma2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #20 on: October 15, 2010, 04:09:55 pm »

Wow you're fast! Thanks :)

That worked! But another small issue, when you click on the image, it opens two new windows.
1x Gallery and 1x Picture fullsized.

Can it be adjusted that it only shows the fullsized image?

(check it here by the way: http://forum.highflow.nl/f2/highflow-gallery-http-gallery-highflow-nl-8017/index2.html#post145421)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #21 on: October 15, 2010, 04:16:58 pm »

it opens two new windows.
1x Gallery and 1x Picture fullsized
That's a feature of your board application.

In codebase.php, find
Code: [Select]
$info['BBCode'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">[url='.$url.']'.$thumb.'[/url]</textarea>';and replace with
Code: [Select]
$info['BBCode'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">'.$thumb.'</textarea>';
Logged

Akuma2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #22 on: October 15, 2010, 04:30:06 pm »

Thanks!!! Now it's working correctly for us :)
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #23 on: October 19, 2010, 10:04:57 am »

In codebase.php, find
Code: [Select]
$thumb = '[img]'.$CONFIG['ecards_more_pic_target'].get_pic_url($CURRENT_PIC_DATA, 'thumb').'[/img]';and replace with
Code: [Select]
$thumb = '[img]'.$CONFIG['ecards_more_pic_target'].get_pic_url($CURRENT_PIC_DATA, 'fullsize').'[/img]';

Andre, great plugin, thanks.  ;)

I edited the code you mentioned above, and changed the embedded pic from 'thumb' to 'normal'.  When clicked it takes you to the gallery page showing the normal pic.  Is there a way to make it when clicked to take you to the full sized image?  In fact two BBcode lines would be handy, one for normal, and one for full size, (when clicked).
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #24 on: November 01, 2010, 12:35:06 pm »

When clicked it takes you to the gallery page showing the normal pic.  Is there a way to make it when clicked to take you to the full sized image?  In fact two BBcode lines would be handy, one for normal, and one for full size, (when clicked).
Open codebase.php, find
Code: [Select]
$info['BBCode'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">[url='.$url.']'.$thumb.'[/url]</textarea>';and replace with
Code: [Select]
$info['BBCode normal size'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">[url='.$url.']'.$thumb.'[/url]</textarea>';
$info['BBCode full size'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">[url='.$url.'&fullsize=1]'.$thumb.'[/url]</textarea>';

Is this what you asked for?
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #25 on: November 01, 2010, 07:07:22 pm »


Is this what you asked for?


Andre Thanks, I think so, but unfortunately it give me a error when I replace that code you just gave me.  ???  It Say's,

Quote
Parse error: syntax error, unexpected T_IF in /home/camxxxxx/public_html/gallery/plugins/bbcode_control/codebase.php on line 1
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #26 on: November 01, 2010, 08:53:10 pm »

Quote
codebase.php on line 1
Please undo your last change and try again. I assume you've done something wrong, as you don't have to edit line 1.
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #27 on: November 01, 2010, 09:47:47 pm »

Andre, you're right. Sorry it was me after all.  Not sure what I'd done wrong, but edited the file again, and it works perfectly now.

Cheers.  You're a star ;)
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #28 on: November 01, 2010, 10:16:51 pm »

Forgot to add a screengrab to my last post.  Here it is for anyone who's interested.  ;)
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

hanzon2010

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #29 on: November 25, 2010, 12:53:14 pm »

Hello, Andre,

Is it possible to add the
bb codes ?

Like this one : http://www.teamopolis.com/tools/bbcode-table-generator.aspx

Or the Table Bbcode shown in this forum while posting.

Thanks ...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #30 on: November 25, 2010, 05:58:28 pm »

Have a look at codebase.php. It's very easy to add those tags, as you simply have to replace [ with < and ] with >. I'm currently very busy, that's why I cannot release a new version.
Logged

hanzon2010

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #31 on: November 25, 2010, 11:22:20 pm »

Thank you, sir.  I managed to do it, but I can't get any columns, just rows ...

I tried to add  hoping to get it over with this bbcode, and have a more powerful way of formatting descriptions, but didn't work.  I guess I have to study this Coppermine program more.  Adding this html bbcode will surely make Coppermine a very powerful application.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #32 on: November 26, 2010, 08:00:21 am »

Please post your modifications.
Logged

hanzon2010

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #33 on: November 26, 2010, 10:18:00 am »

Oh, I was only trying out your suggestion in a quick manner, I'm no php programmer, so I was just trying to figure out.  So I added the table codes, and 'html' as well.  I don't get images of course in the Config section, but I am able to select the radio buttons and save settings (although the radio buttons are not selected when I go back to the config section later). 

Anyway, here is what I was doing ...

codebase.php
==========
Under function new_bbcodes:
:
:
// tables
    if (!in_array('table', $bbcode_tags_disabled)) {
        $text = str_replace("
", "<table>", $text);
        $text = str_replace("
", "</table>", $text);
    }

    if (!in_array('tr', $bbcode_tags_disabled)) {
        $text = str_replace("
", "<tr>", $text);
        $text = str_replace("
", "</tr>", $text);
    }

    if (!in_array('th', $bbcode_tags_disabled)) {
        $text = str_replace("[th]", "<th>", $text);
        $text = str_replace("[/th]", "</th>", $text);
    }

    if (!in_array('td', $bbcode_tags_disabled)) {
        $text = str_replace("
", "<td>", $text);
        $text = str_replace("
", "</td>", $text);
    }
   
    if (!in_array('html', $bbcode_tags_disabled)) {
        $text = str_replace("", "<html>", $text);
        $text = str_replace("", "</html>", $text);
    }
:
:

function get_bbcode_tags($which) {
    // available tags
    $bbcode_tags_available = array(
        'b', // cpg standard
        'u', // cpg standard
        'i', // cpg standard
        's', // cpg standard
        'size',
        'tt',
        'color', // cpg standard
        'hr',
        'quote',
        'url', // cpg standard
        'img', // cpg standard
        'table',
        'tr',
        'th',
        'td',
        'html',

        'youtube',
    );



english.php
========

// admin.php & codebase.php
$lang_plugin_bbcode_control['b'] = 'Bold';
$lang_plugin_bbcode_control['u'] = 'Underline';
$lang_plugin_bbcode_control['i'] = 'Italic';
$lang_plugin_bbcode_control['s'] = 'Strikethrough';
$lang_plugin_bbcode_control['img'] = 'Image';
$lang_plugin_bbcode_control['url'] = 'Link';
$lang_plugin_bbcode_control['color'] = 'Font color';
$lang_plugin_bbcode_control['size'] = 'Font size';
$lang_plugin_bbcode_control['quote'] = 'Quote';
$lang_plugin_bbcode_control['youtube'] = 'Youtube video';
$lang_plugin_bbcode_control['tt'] = 'Teletype';
$lang_plugin_bbcode_control['hr'] = 'Horizontal rule';
$lang_plugin_bbcode_control['hr'] = 'Horizontal rule';
$lang_plugin_bbcode_control['hr'] = 'Horizontal rule';
$lang_plugin_bbcode_control['hr'] = 'Horizontal rule';
$lang_plugin_bbcode_control['hr'] = 'Horizontal rule';
$lang_plugin_bbcode_control['table'] = 'table';
$lang_plugin_bbcode_control['tr'] = 'tr';
$lang_plugin_bbcode_control['td'] = 'td';
$lang_plugin_bbcode_control['th'] = 'th';
$lang_plugin_bbcode_control['html'] = 'html';



*  by the way, the Preview button for this section of posting reply does not seem to work (alt+p also).
Logged

hanzon2010

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #34 on: November 26, 2010, 01:23:41 pm »

Sorry, I just realized the items in between "[]" have not been shown, please ignore above, will post a screen capture version instead.
Logged

hanzon2010

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #35 on: November 29, 2010, 08:32:15 am »

Hi, Andre,

Here are the codes changed - codebase.php and english.php

http://www.photofilma.com/bbcode-change.txt
Logged

hanzon2010

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #36 on: December 06, 2010, 02:20:56 pm »

I finally got the bbcode for tables to work after changing the code as mentioned above.  I just uninstalled the BBCode Control plugin and reinstalled it, and now my new table BB codes have been saved into the SQL database.

Thanks, Andre, for leading the way ...

Now looking into how to get html to work ...  8)

Logged

André Müller

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 26
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #37 on: January 22, 2011, 01:18:58 pm »

Very nice plugin!
I am wondering weather it is possible to make the pre-formatted BBCodes in the file infos only visible for registered users or admins (like the link for the statistics)?

Cheers,
André

www.fotowald.de
www.above-horizon.de
Logged

cavok

  • Coppermine regular visitor
  • **
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 93
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #38 on: February 19, 2011, 08:06:35 pm »

Hello,
Would be it possible to use this plugin not only for the comments, but wherever it is possible to write.
As the title, description of images in ""Edit Files" and "Edit file informations".
E-cards.
Thank's for your help.
Logged
Coppermine 1.5.22 hosting by Free

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15428
Re: BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x
« Reply #39 on: February 23, 2011, 11:08:28 am »

That should be possible, but I think I won't implement it in the near future, as I'm too busy. Sorry.
Logged
Pages: 1 [2] 3 4 5   Go Up
 

Page created in 0.022 seconds with 21 queries.