Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
function plogger_get_bbcode_link() {
return '<a accesskey="b" title="'.plog_tr('Generate BB-code').'" href="#" onclick="flip(\'show_bbcode-table\'); return false;">'.plog_tr('Generate BB-code').'</a>';
}
function generate_bbcode_table($id) {
global $config;
$query = "SELECT * FROM `".PLOGGER_TABLE_PREFIX."pictures` WHERE `id`=".intval($id);
$result = run_query($query);
if (mysql_num_rows($result) > 0) {
$row = mysql_fetch_assoc($result);
foreach($row as $key => $val) if (trim($row[$key]) == '') $row[$key] = ' ';
//generate title
if ($row['caption'] != "") {
$title = $row['caption'];
}
else {
$title = "Photo";
}
// generate thumbnail link
$thumbnail_link = plogger_get_picture_thumb(THUMB_LARGE);
// generate link to the image in your gallery (comment out the next line if you use the link to the large image)
$image_link = $config['gallery_url'].'index.php?level=picture&id='.$id;
// generate link to the large image (comment out the next two lines if you use the link to the image in your gallery)
// $path = $row['path'];
// $image_link = $config['gallery_url'].'plog-content/images/'.$path;
// set "taken by" to be displayed in bb-code
$taken_by = "Your name";
$taken_by_url = "http://www.yourhomepage.com";
$table_data = "\t\t\t\t\t\t" . '<div id="show_bbcode-table">
<script type="text/javascript">flip(\'show_bbcode-table\');</script>
<table id="exif-data">
<tr>
<td colspan="2" class="">BB-Code</td>
</tr>
<tr>
<td>
<textarea name="" class="bbcode">[img]'.$thumbnail_link.'[/img]
[url='.$image_link.']'.$title.'[/url] by [url='.$taken_by_url.']'.$taken_by.'[/url]</textarea>
</td>
</tr>
</table>
' . "\n";
}
return $table_data;
}
$taken_by = "Your name";
$taken_by_url = "http://www.yourhomepage.com";
// generate link to the image in your gallery (comment out the next line if you use the link to the large image)
$image_link = $config['gallery_url'].'index.php?level=picture&id='.$id;
// generate link to the large image (comment out the next two lines if you use the link to the image in your gallery)
// $path = $row['path'];
// $image_link = $config['gallery_url'].'plog-content/images/'.$path;
// generate link to the image in your gallery (comment out the next line if you use the link to the large image)
// $image_link = $config['gallery_url'].'index.php?level=picture&id='.$id;
// generate link to the large image (comment out the next two lines if you use the link to the image in your gallery)
$path = $row['path'];
$image_link = $config['gallery_url'].'plog-content/images/'.$path;
#bb-code-toggle {
width: 100%;
text-align: center;
padding: 0;
margin: 0;
}
#bb-code-container {
width: 550px;
margin: 10px auto;
text-align: center;
padding: 10px;
}
.bbcode {
width: 100%;
height: 150px;
}
<p id="exif-toggle"><?php echo plogger_get_detail_link(); ?></p>
<div id="exif-data-container">
<?php echo generate_exif_table(plogger_get_picture_id()); ?>
</div><!-- /exif-data-container -->
<p id="exif-toggle"><?php echo plogger_get_detail_link(); ?></p>
<div id="exif-data-container">
<?php echo generate_exif_table(plogger_get_picture_id()); ?>
</div><!-- /exif-data-container -->
<p id="bb-code-toggle"><?php echo plogger_get_bbcode_link(); ?></p>
<div id="bb-code-container">
<?php echo generate_bbcode_table(plogger_get_picture_id()); ?>
</div><!-- /bb-code-container -->
1 to 10 of 10