Forum

Questions and discussions

bbcodes

Discuss template's customization

bbcodes

Postby Devil » Sun Jun 07, 2015 10:13 am

Hi Anton,

I would like to add this feature in item_photo.tpl. Which file should I edit?

Thanks for your help
Greetings from Berlin, Olaf

Image


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? :oops:
Devil
 
Posts: 32
Joined: Sat Oct 18, 2014 7:45 pm

Return to Design & Templates

Who is online

Users browsing this forum: No registered users and 2 guests

cron
  Photo Store Script

Professional php photo stock script and WordPress plug-in for photographers and video producers.

  Support
  CMSaccount Inc.