I am using th Mod_PHP module to embedd a print button for inbox messages. I need to pass the message ID variable for a message opened in the browser fro printing. Assuming that placeholder '$id' calls the correct message ID of a message opened in the web browser, in the code below, what variable should I be using to place the message id at the end of the link:
[code:1]
$link = sefRelToAbs ( 'index2.php option='.$option.'&popup=1&task=show&Itemid=0&messageid='.$id );
[/code:1]
Full code:
[code:1]
<?php
global $option;
global $hide_js;
// if joomla is called with ?hide_js=1 in the URL, PrintIcon won't work
// if you want to ignore this setting, use the following line instead:
// $hide_js = 1;
$popup = intval( mosGetParam( $_REQUEST, 'popup', 0 ) );
$row = new stdClass; // I don't think $row is used at all.
$params = new mosParameters( '' );
// if set to 0, there won't be a print icon at all
$params->set( 'print', '1' );
// set to 0 to use text instead of icon.
$params->set( 'icons', '1' );
// if set to 1, this will invoke the browser's print function.
$params->set( 'popup', $popup );
// lookup sefRelToAbs in the forum if you don't know what it does.
$link = sefRelToAbs ( 'index2.php option='.$option.'&popup=1&task=show&Itemid=0&messageid='.$id );
// if you set status to NULL, or omit it completely,
//these default settings for the print window will be used.
$status = 'status=yes,toolbar=yes,scrollbars=yes,titlebar=yes,menubar=yes,'
.'resizable=yes,width=640,height=480,directories=yes,location=yes';
mosHTML::«»PrintIcon( $row, $params, $hide_js, $link, $status );
?>
[/code:1]