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]   Go Down

Author Topic: Titel vom Bild übergeben  (Read 4037 times)

0 Members and 1 Guest are viewing this topic.

T.Gauck

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Titel vom Bild übergeben
« on: September 13, 2008, 01:00:53 pm »

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!

Code: [Select]
<?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;
    }
}

?>




Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Titel vom Bild übergeben
« Reply #1 on: September 13, 2008, 01:09:51 pm »

Im Array $CURRENT_PIC_DATA ist so alles das Bild betreffende gespeichert.
Gib doch testweise das gesamte Array aus und dann kannst Du Dir die notwendigen Infos raussuchen...

also nach den globals
Code: [Select]
print_r ($CURRENT_PIC_DATA);

PS: Das gute an diesen Plugins ist, daß sie nur ein Grundgerüst bieten. Die finale Optik und Form des BBCodes kannst Du Dir selbst erstellen.

T.Gauck

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: Titel vom Bild übergeben
« Reply #2 on: September 14, 2008, 01:51:35 am »

Habe es unter "Looking for Freelancers / Paid help" eingestellt, da ich es leider nicht hinne bekomme den Bildtitel in die richtige Zeile zu schiffen. Würde mich freuen, wenn das jemand für mich Programmieren könnte.



Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.