Hallo,
nun habe ich doch noch ein Anliegen wegen dem Plugin vom vorherigen Beitrag und hoffe mir kann jemand helfen.
Stramms ähnliches Plugin BBCode liefert mir nicht den richtigen BBCode für mein SMF Forum und das nachfolgende hier Gepostete gefällt mir auch optisch ein bisschen besser. Ist aber Geschmackssache und hängt vom genutzten Theme ab.
Nun würde ich gern den Titel vom Bild, wie bei Stramms Plugin auch in meinem Plugin im “BBCode“ übergeben wollen. Die Globale “$CONFIG;“ ist in dem anderen Plugin ja auch verfügbar, aber ich bekomme das da nicht rein gefummelt.
Oder funktioniert das nur mit dem Titel, wenn das Plugin direkt im Bild rumwurschtelt?
Kann mir da jemand helfen?
Danke!
<?php
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
//Places a text box in the file information list that allows you to embed an image on another site.
$thisplugin->add_filter('file_info','html_embed');
function html_embed($info)
{
global $information;
global $CONFIG;
global $CURRENT_PIC_DATA;
$info['Embed URL'] = '<table cellpadding="0" cellspacing="1" border="0">';
$info['Embed URL'] .= '<tr><td>HTML:</td><td><textarea name="htmlcode" class="textinput" rows="1" cols="60" wrap="off" style="overflow:hidden;height:15px;" onfocus="this.select();" onclick="this.select();"><a href="' . $CONFIG["ecards_more_pic_target"] . get_pic_url($CURRENT_PIC_DATA, 'fullsize') . '" target="_blank"><img src="' . $CONFIG["ecards_more_pic_target"] . get_pic_url($CURRENT_PIC_DATA, 'normal') . '" border="0"></a></textarea></td></tr>';
$info['Embed URL'] .= '<tr><td>BBCode:</td><td><textarea name="bbcode" class="textinput" rows="1" cols="60" wrap="off" style="overflow:hidden;height:15px;" onfocus="this.select();" onclick="this.select();">[url=' . $CONFIG["ecards_more_pic_target"] . get_pic_url($CURRENT_PIC_DATA, 'fullsize') . '][img]' . $CONFIG["ecards_more_pic_target"] . get_pic_url($CURRENT_PIC_DATA, 'normal') . '[/img][/url]</textarea></td></tr>';
$info['Embed URL'] .= '</table>';
return $info;
}
// Add an install action
$thisplugin->add_action('plugin_install','html_embed_install');
// Install function
function html_embed_install() {
// Install
if ($_POST['test']=='true')
{
return true;
// Loop again
} else {
return true;
}
}
?>