#1 (permalink)  
Old 02-29-2008, 08:28 PM
Registered User
 
Join Date: Feb 2008
Location: Winnipeg Canada
Posts: 23
fxdir is on a distinguished road
Lightbulb Print page feature

Hi
With Indexu you can add print feature to every page you want
Here is the very simple way to do that
First of all you have to put this code in template "header.html" before </head> tag

<script language="JavaScript">
var gAutoPrint = true; // Tells whether to automatically call the print function

function printSpecial()
{
if (document.getElementById != null)
{
var html = '<HTML>\n<HEAD>\n';

if (document.getElementsByTagName != null)
{
var headTags = document.getElementsByTagName("head");
if (headTags.length > 0)
html += headTags[0].innerHTML;
}

html += '\n</HE>\n<BODY>\n';

var printReadyElem = document.getElementById("printReady");

if (printReadyElem != null)
{
html += printReadyElem.innerHTML;
}
else
{
alert("Could not find the printReady function");
return;
}

html += '\n</BO>\n</HT>';

var printWin = window.open("","printSpecial");
printWin.document.open();
printWin.document.write(html);
printWin.document.close();
if (gAutoPrint)
printWin.print();
}
else
{
alert("The print ready feature is only available if you are using an browser.
Please update your browswer.");
}
}
</script>

Then , put this code into the template where you want the Print feature will be available (as for me better to detail_link.html, at the top of template)

<div id="printReady">

At the end of template place </div>

Then, add (we have for example detail_link.html template) code to put some link or image for printing option

<img src="http://www.your_domain.com/path_to_image" alt="print details of website" /> <a href="javascript:void(printSpecial())">Print this Page</a>

that's all

If you have any suggestions or questions - don't hesitate to ask, everything is possible with Indexu
Reply With Quote
  #2 (permalink)  
Old 04-03-2008, 01:10 AM
Registered User
 
Join Date: Sep 2007
Posts: 73
user_not_found is on a distinguished road
Default

WOW I am impressed very good job I will try to implemented asap
__________________
mydir.gr - Greek Index Catalog
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print link details ? Frank71 Tutorials, Hints & Tips 3 02-16-2006 06:42 PM
cannot feature listings ?? ideavirus v5.x 4 05-15-2005 04:32 AM
Is the "review" feature an essential feature for INDEXU at you website? esm v5.x 7 04-28-2004 09:21 AM
Please add this feature!!!!!! craven v5.x 0 07-07-2002 04:57 PM
Print a link armadinina v3.2 0 08-30-2001 05:57 PM

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

All times are GMT -5. The time now is 03:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
SSL Certificate