Album Share Codes (create BBCodes, HTML embed codes, etc. of an entire album) - Page 3 Album Share Codes (create BBCodes, HTML embed codes, etc. of an entire album) - 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

Album Share Codes (create BBCodes, HTML embed codes, etc. of an entire album)

Started by Αndré, June 29, 2010, 03:49:03 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Camiii

Is it possible to add the sharing codes after the album, instead of after the breadcrumbs? I tried finding a way of doing it, but I wasn't sure what function to call.  :-\

Αndré

Open codebase.php and replace everthing with this:
<?php
/**************************************************
  Coppermine 1.5.x Plugin - album_share_codes
  *************************************************
  Copyright (c) 2010 eenemeenemuu
  *************************************************
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL: https://svn.code.sf.net/p/coppermine/code/branches/cpg1.5.x/plugins/album_share_codes/codebase.php $
  $Revision: 8065 $
  $LastChangedBy: eenemeenemuu $
  $Date: 2010-11-22 14:13:47 +0100 (Mo, 22. Nov 2010) $
  **************************************************/

if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

$thisplugin->add_filter('theme_thumbnails_footer''album_share_codes_main');

function 
album_share_codes_main($footer) {
    
$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'");
        if (
mysql_num_rows($result) > 0) {
            while(
$row mysql_fetch_assoc($result)) {
                
$url $CONFIG['ecards_more_pic_target'].'displayimage.php?pid='.$row['pid'];
                
$thumb $CONFIG['ecards_more_pic_target'].get_pic_url($row'thumb');
                
$content1 .= '[url='.$url.'][img]'.$thumb.'[/img][/url]'."\n";
                
$content2 .= '<a href="'.$url.'"><img src="'.$thumb.' /></a>'."\n";
            }
            
starttable(-1'Share codes for <i>all files</i> in this album');
            
$text = <<<EOT
                <tr>
                    <td class="tableb">
                        <tt>[url][img][/url]</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>&lt;a&gt;&lt;img&gt;&lt;/a&gt;</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">
{$content2}</textarea>
                    </td>
                </tr>
EOT;
            
endtable();
        }
    }
    return 
$footer.$text;
}

?>

Angel_Eyez