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