I would like to add this feature in item_photo.tpl. Which file should I edit?
Thanks for your help
Greetings from Berlin, Olaf
I have inserted into the file content.php following code:
- Code: Select all
//Show Shares
function shares_show(value)
{
var req = new JsHttpRequest();
// Code automatically called on load finishing.
req.onreadystatechange = function()
{
if (req.readyState == 4)
{
if(document.getElementById('sharescontent'))
{
document.getElementById('sharescontent').innerHTML =req.responseText;
document.getElementById('sharescontent').style.display='none';
$("#sharesscontent").slideDown("slow");
}
if(document.getElementById('shares_content'))
{
document.getElementById('shares_content').innerHTML =req.responseText;
}
}
}
req.open(null, '<?=site_root?>/members/shares.php', true);
req.send( { id: value } );
}
I have inserted into the file item_photo.tpl following code:
- Code: Select all
<ul class="nav nav-tabs">
<li class="active"><a href="#details" data-toggle="tab">{lang.Description}</a></li>
<li> <a href="#exif_content" data-toggle="tab" onclick="exif_show({ID});">EXIF</a></li>
<li> <a href="#comments_content" data-toggle="tab" onclick="reviews_show({ID});">{lang.Comments}</a></li>
<li> <a href="#tell_content" data-toggle="tab" onclick="tell_show({ID});">{lang.Tell a friend}</a></li>
<li> <a href="#reviewscontent" data-toggle="tab" onclick="map_show({GOOGLE_X},{GOOGLE_Y});">{lang.Google map}</a></li>
<li> <a href="#sharescontent" data-toggle="tab" onclick="shares_show({ID});">{lang.Shares}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="details">{DESCRIPTION}</div>
<div class="tab-pane" id="exif_content"></div>
<div class="tab-pane" id="comments_content"></div>
<div class="tab-pane" id="tell_content"></div>
<div class="tab-pane" id="reviewscontent"></div>
<div class="tab-pane" id="sharescontent"></div>
</div>
Shares.php created file:
- Code: Select all
<?include("../admin/function/db.php");?>
<?include("JsHttpRequest.php");?>
<?
$JsHttpRequest =new JsHttpRequest($mtg);
$id=@$_REQUEST['id'];
$file_storage=false;
$file_name="";
?>
<p ><textarea name="bbcode" style="min-width: 500px" >[url=http://www.photostore24.de/stock-photo/zimtstangen-9041.html][img]http://www.photostore24.de/content/9041/thumb2.jpg[/img][/url]</textarea></p>
<h2>HTML</h2>
<p><textarea name="html" style="min-width: 500px" "><a href="http://www.photostore24.de/stock-photo/zimtstangen-9041.html" title="sdaf" alt="sdaf"><img src="http://www.photostore24.de/content/9041/thumb2.jpg" title="" alt="sdaf" border="0"></a></textarea></p>
<h2>Link</h2>
<p><input type="textbox" name="linkto" value="http://www.photostore24.de/stock-photo/zimtstangen-9041.html" style="min-width: 500px" class="form-control"></p>
<?$db->close();
?>
It does not work! What I have done wrong?