Advanced search  

News:

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

Pages: 1 [2] 3   Go Down

Author Topic: Album Share Codes (create BBCodes, HTML embed codes, etc. of an entire album)  (Read 56384 times)

0 Members and 1 Guest are viewing this topic.

Casper79

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25

No problem  ;)
Logged

Αndré

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

Attached version 1.1 to initial release. It's compatible with cpg1.5.10 and higher.
Logged

Casper79

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25

Hi - me again  ::)

How can I change the code, that when someone click on the thumb he will get the fullsize photo shown?

Greetings
Logged

Αndré

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

Open codebase.php, find
Code: [Select]
$url = $CONFIG['ecards_more_pic_target'].'displayimage.php?pid='.$row['pid'];and replace with
Code: [Select]
$url = $CONFIG['ecards_more_pic_target'].'displayimage.php?pid='.$row['pid'].'&fullsize=1';
Logged

Casper79

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25

Thank you!  :D
Logged

chuvag

  • Coppermine newbie
  • Offline Offline
  • Posts: 16

Thanks for plugin, it works great!

But is it possible to do some add-on (or maybe fork) which enables per-picture (plus to codes for entire album) Share Codes? It can be very handy if you have huge albums and/or want to share only new fotos added to the album.

Similar plugins for 1.4.x (tablitz and copy/paste bbcode img url) still not ported to 1.5.x...
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.

Not sure if the plugin your are using will run with this one installed at the same time, but this will give you BBCodes below each intermediate pic.  http://forum.coppermine-gallery.net/index.php/topic,57432.0.html
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

chuvag

  • Coppermine newbie
  • Offline Offline
  • Posts: 16

Not sure if the plugin your are using will run with this one installed at the same time, but this will give you BBCodes below each intermediate pic.  http://forum.coppermine-gallery.net/index.php/topic,57432.0.html
Is my English so bad?
I think you misunderstood me (and topic starter). I need plugin which enebles share codes (per-image bb-codes which you can copy-paste to post in any forum/community to share fotos). I don't need new bb-codes for commets or something.
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.

Is my English so bad?
I think you misunderstood me (and topic starter). I need plugin which enebles share codes (per-image bb-codes which you can copy-paste to post in any forum/community to share fotos). I don't need new bb-codes for commets or something.

That's what it does.  ???  It puts a BBCode below each intermediate pic.  You can copy and paste to display the images in your forum posts.  ;)  read about it here, http://forum.coppermine-gallery.net/index.php/topic,57432.0.html
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

chuvag

  • Coppermine newbie
  • Offline Offline
  • Posts: 16

Damn :) Feel myself like blind ;)
Thanks for help
Logged

cpguser1

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

Sorry for bumping an old topic. But Is it possible to get full image code using this plugin I mean I want image code for full size image hotlinking on forums. :) Like As [img]www.foo.com/foo.jpg[ /img]
Logged

Αndré

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

Open codebase.php, find
Code: [Select]
$thumb = $CONFIG['ecards_more_pic_target'].get_pic_url($row, 'thumb');and replace with
Code: [Select]
$thumb = $CONFIG['ecards_more_pic_target'].get_pic_url($row, 'fullsize');
Logged

cpguser1

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

Thanks a lot Αndré bro... This worked perfectly as per my liking. :)
Logged

cpguser1

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

Sorry for bringing up this again. Sorry for sounding like a studious student asking questions to teacher every now and then, but can you let me know whether it is possible to get both the codes, thumbnails & full size images ?  :-[  :-[ :-[
Logged

cpguser1

  • Coppermine newbie
  • Offline Offline
  • Posts: 8

Found out myself. :)

I created the content 3 rule and put thumb instead of fullsize and then called it below as you did for content 1 and content 2 rules and it worked perfectly. :) Thanks a lot for this wonderful plugin. :) Very useful for me certainly. :)
Logged

EdoFede

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

Hello.

I've made some mods on the base plugin:
- Image ordered by position field
- Additional tags with intermediate images
- Link at fullsize images instead of album view intermediate images

In addition, I've included the "gallery_admin_mode" code.

If someone is interested, here is the code:
Code: [Select]
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

if (GALLERY_ADMIN_MODE) {
$thisplugin->add_action('post_breadcrumb', 'album_share_codes_main');
}

function album_share_codes_main() {
    $superCage = Inspekt::makeSuperCage();
    if ($superCage->get->testInt('album')) {
        global $CONFIG;
        $aid = $superCage->get->getInt('album');
        $result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '$aid' ORDER BY position, pid");
        if (mysql_num_rows($result) > 0) {
            while($row = mysql_fetch_assoc($result)) {
                $url = $CONFIG['ecards_more_pic_target'].'displayimage.php?pid='.$row['pid'].'&fullsize=1';
                $thumb = $CONFIG['ecards_more_pic_target'].get_pic_url($row, 'thumb');
                $mid = $CONFIG['ecards_more_pic_target'].get_pic_url($row, 'normal');
                $content1 .= '[url='.$url.'][img]'.$thumb.'[/img][/url]'."\n\n";
                $content2 .= '[url='.$url.'][img]'.$mid.'[/img][/url]'."\n\n";
                $content3 .= '<a href="'.$url.'"><img src="'.$thumb.' /></a>'."\n\n";
                $content4 .= '<a href="'.$url.'"><img src="'.$mid.' /></a>'."\n\n";
            }
            starttable(-1, 'Share codes for <i>all files</i> in this album');
            echo <<<EOT
                <tr>
                    <td class="tableb">
                        <tt>BBcode TAG (128px)</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content1}</textarea>
                        <br />
                        <tt>BBcode TAG (400px)</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content2}</textarea>
                        <br />
                        <tt>HTML TAG (128px)</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content3}</textarea>
                        <br />
                        <tt>HTML TAG (400px)</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content4}</textarea>
                    </td>
                </tr>
EOT;
            endtable();
        }
    }
}



Bye,
Edoardo.  :)
Logged

sajeevs

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27

I want to embed an entire album i will attach a file that will tell which way it looks like when we embed it in another webpage or another website etc.. pls check the attached file
Logged

Αndré

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

What's the actual question? This plugin doesn't produce such an output.
Logged

DeathCom

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

I have one simple question, is there a way to get this to generate the BB code so that it puts all the images on the same line? It seems to put in a break after each image link. This makes it so when posted all the images just get stacked vertically in a forum. Of course users can fix this by manually deleting the breaks, but the average forum poster is lazy :)

Thanks for this plugin Αndré!

Sorry for bringing up this old topic.
Logged

Αndré

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

Open codebase.php, find
Code: [Select]
$content1 .= '[url='.$url.'][img]'.$thumb.'[/img][/url]'."\n";and replace with
Code: [Select]
$content1 .= '[url='.$url.'][img]'.$thumb.'[/img][/url]';
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.029 seconds with 20 queries.