Author Topic: print button in image page.  (Read 3131 times)

0 Members and 1 Guest are viewing this topic.

Offline Ersen

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
print button in image page.
« on: January 28, 2013, 05:33:54 PM »
i want to add print button in details.php just like e-card or download. How can i do.

Hello i searched but i found only this thread. http://www.4homepages.de/forum/index.php?topic=5833.0 has no answer.

Thanks.

Rembrandt

  • Guest
Re: print button in image page.
« Reply #1 on: January 28, 2013, 06:40:25 PM »
simple way, add this in your details.html:
so:
Code: [Select]
<a href="{image_url}" onclick="javascript:document.body.innerHTML='<img src=\'{media_src}\'>';print();" >Print Image</a>
search in details.php:

$site_template
->register_vars(array(
  
"next_image_id" => $next_image_id,

and replace:

$site_template
->register_vars(array(
  
"image_url" => $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id']),
  
"next_image_id" => $next_image_id,


mfg Andi
« Last Edit: January 28, 2013, 07:04:39 PM by Rembrandt »