I've made a little solution, it works very simple.
It creates a link to an php page with the information.
This post includes all the modifications below Open includes/
functions.phpFind:
else {
$user_name = $lang['userlevel_guest'];
$user_name_link = $user_name;
}
Add
below:
if ($detailed_view) {
$site_template->register_vars(array(
"media_thumbnail" => $image_row['image_thumb_file'],
"media_url" => $image_row['image_media_file'],
));
}
Create a new file:
postit.phpwith this code:
<?php
$site_url= "http://www.yourpage.com"
?>
<html>
<head>
<title>Post-it</title>
<style type="text/css">
/* A code block - maybe even PHP ;). */
.code
{
color: #000000;
background-color: #FFFFFF;
border: 1px solid #000000;
padding: 3px;
padding-bottom: 20px;
font-family: "courier new", helvetica, "times new roman", serif;
/* font-family: Courier, 'Courier New', sans-serif, helvetica, "times new roman", serif;*/
font-size: x-small;
width: 98%;
max-height: 24em;
margin: 1px auto 1px auto;
/*margin-top: 4px;*/
white-space: nowrap;
overflow: auto;
line-height: 1.3em;
}
.codeheader
{
color: #000000;
text-decoration: none;
font-style: normal;
font-weight: bold;
font-size: small;
}
</style>
</head>
<?php
$cat_id = $_GET["cat_id"];
$thumb = $_GET["thumb"];
$image = "data/thumbnails/$cat_id/$thumb";
$size = getimagesize("$image");
$thumb_height = $size[1];
$thumb_width = $size[0];
$thumb_width_height = (!empty($size[3])) ? " ".$size[3] : "";
$thumb_height = $size[1];
$thumb_width = $size[0];
?>
<body>
<div class="codeheader">Thumbnail linked to the corresponding page:</div>
<div class="code"><a href="<?php echo $_GET["url"]; ?>"><br />
<img src="<?php echo $site_url; ?>/data/thumbnails/<?php echo $_GET["cat_id"]; ?>/<?php echo $_GET["thumb"]; ?>" <?php echo $thumb_width_height; ?> border="0" alt="<?php echo $_GET["name"]; ?>" title="<?php echo $_GET["name"]; ?>" /></a></div><br />
<div class="codeheader">Large version linked to the corresponding page:</div>
<div class="code"><a href="<?php echo $_GET["url"]; ?>"><br />
<img src="<?php echo $site_url; ?>/data/media/<?php echo $_GET["cat_id"]; ?>/<?php echo $_GET["media_url"]; ?>" width="<?php echo $_GET["width"]; ?>" height="<?php echo $_GET["height"]; ?>" border="0" alt="<?php echo $_GET["name"]; ?>" title="<?php echo $_GET["name"]; ?>" /></a></div><br /><br />
<div class="codeheader">Large version linked to the corresponding page behind lj-cut:</div>
<div class="code"><lj-cut text="<?php echo $_GET["name"]; ?> - <?php echo $_GET["width"]; ?> x <?php echo $_GET["height"]; ?> - <?php echo $_GET["size"]; ?>"><br /><a href="<?php echo $_GET["url"]; ?>"><br />
<img src="<?php echo $site_url; ?>/data/media/<?php echo $_GET["cat_id"]; ?>/<?php echo $_GET["media_url"]; ?>" width="<?php echo $_GET["width"]; ?>" height="<?php echo $_GET["height"]; ?>" border="0" alt="<?php echo $_GET["name"]; ?>" title="<?php echo $_GET["name"]; ?>" /></a></div><br /><br />
<div class="codeheader">Thumbnail before lj-cut; large version linked to the corresponding page behind lj-cut:</div>
<div class="code"><img src="<?php echo $site_url; ?>/data/thumbnails/<?php echo $_GET["cat_id"]; ?>/<?php echo $_GET["thumb"]; ?>" <?php echo $thumb_width_height; ?> border="0" alt="<?php echo $_GET["name"]; ?>" title="<?php echo $_GET["name"]; ?>" /><br />
<lj-cut text="<?php echo $_GET["name"]; ?> - <?php echo $_GET["width"]; ?> x <?php echo $_GET["height"]; ?> - <?php echo $_GET["size"]; ?>"><br />
<a href="<?php echo $_GET["url"]; ?>"><br />
<img src="<?php echo $site_url; ?>/data/media/<?php echo $_GET["cat_id"]; ?>/<?php echo $_GET["media_url"]; ?>" width="<?php echo $_GET["width"]; ?>" height="<?php echo $_GET["height"]; ?>" border="0" alt="<?php echo $_GET["name"]; ?>" title="<?php echo $_GET["name"]; ?>" /></a><br />
</lj-cut></div>
</body>
</html>
And
change: $site_url= "
http://www.yourpage.com"
If you want to add BBCODE for the images add this in
postit.php:
<div class="codeheader">BBcode Thumbnail linked to the corresponding page (1):</div>
<div class="code">[URL=<?php echo $_GET["url"]; ?>][IMG]<?php echo $site_url; ?>/data/thumbnails/<?php echo $_GET["cat_id"]; ?>/<?php echo $_GET["thumb"]; ?>[/IMG][/URL]</div><br /><br />
<div class="codeheader">BBcode Thumbnail linked to the corresponding page (2):</div>
<div class="code">[url=<?php echo $_GET["url"]; ?>][img=<?php echo $site_url; ?>/data/thumbnails/<?php echo $_GET["cat_id"]; ?>/<?php echo $_GET["thumb"]; ?>[/url][/img]</div><br /><br />
Open templates/{your_template}/
details.phpAdd this where you want to show the button:
<script language="Javascript1.2" type="text/javascript">
document.write('<a href="/postit.php?url='+window.location.href+'&name={image_name}&cat_id={cat_id}&media_url={media_url}&thumb={media_thumbnail}&height={height}&width={width}&size={image_file_size}" title="Post it!">Post It!</a>');
</script>
The postit page has no design, but you can edit that
And the button isn't a popup, but with some javascript editing you can fix that also