You need to modify Mambo core files to accomplish this. Here's how to do it.
Step 1
Open up the file index.php and find this line (at line 110 in Mambo 4.5.1a):
| Code: |
<body class="contentpane">
|
REPLACE it with this:
| Code: |
<body class="contentpane" <?php
if ( mosGetParam( $_REQUEST, 'print', '' ) ) {
print 'onload="javascript:window.print();"';
} ?>>
|
Step 2
Open the file components/com_content/content.html.php and find this line, at line 455 in Mambo 4.5.1a:
| Code: |
$print_link = $mosConfig_live_site
. '/index2.php?option=com_content&amp;task=view&amp;id='
. $row->id .'&amp;Itemid='. $Itemid
.'&amp;pop=1&amp;page='. @$page;
|
REPLACE it with this:
| Code: |
$print_link = $mosConfig_live_site
. '/index2.php?option=com_content&amp;task=view&amp;id='
. $row->id .'&amp;Itemid='. $Itemid
.'&amp;pop=1&amp;print=1&amp;page='. @$page;
|
The only change is that "&amp;print=1" is added to the link.
Both of these are just one line, I've split them up into several lines to make them easier to read here on the forum.
Save and upload both files, and the print popup should now automatically start the print dialog.<br><br>Post edited by: admin, at: 2005/02/24 15:43