[geeklog-cvs] geeklog-1.3/public_html article.php,1.46,1.47 lib-common.php,1.336,1.337
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Sat Jul 10 14:50:08 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv20028/public_html
Modified Files:
article.php lib-common.php
Log Message:
Use URL rewriting for the link to a story's printer-friendly version. Also added a link to the PDF version to the story options.
Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.336
retrieving revision 1.337
diff -C2 -d -r1.336 -r1.337
*** lib-common.php 8 Jul 2004 20:11:32 -0000 1.336
--- lib-common.php 10 Jul 2004 18:50:04 -0000 1.337
***************
*** 559,564 ****
else
{
! $article->set_var( 'print_icon', '<a href="' . $_CONF['site_url']
! . '/article.php?story=' . $A['sid'] . '&mode=print">'
. '<img border="0" src="' . $_CONF['layout_url']
. '/images/print.gif" alt="' . $LANG01[65] . '" title="'
--- 559,565 ----
else
{
! $printUrl = COM_buildUrl( $_CONF['site_url'] . '/article.php?story='
! . $A['sid'] . '&mode=print' );
! $article->set_var( 'print_icon', '<a href="' . $printUrl . '">'
. '<img border="0" src="' . $_CONF['layout_url']
. '/images/print.gif" alt="' . $LANG01[65] . '" title="'
Index: article.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/article.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** article.php 17 Jun 2004 19:34:32 -0000 1.46
--- article.php 10 Jul 2004 18:50:04 -0000 1.47
***************
*** 55,68 ****
// MAIN
! COM_setArgNames (array ('story'));
$story = COM_applyFilter (COM_getArgument ('story'));
- if (isset ($HTTP_POST_VARS['story'])) {
- $story = COM_applyFilter($HTTP_POST_VARS['story']);
- }
if (empty ($story)) {
echo COM_refresh ($_CONF['site_url'] . '/index.php');
exit();
}
! $order = COM_applyFilter ($order);
if ((strcasecmp ($order, 'ASC') != 0) && (strcasecmp ($order, 'DESC') != 0)) {
$order = '';
--- 55,73 ----
// MAIN
! COM_setArgNames (array ('story', 'mode'));
$story = COM_applyFilter (COM_getArgument ('story'));
if (empty ($story)) {
echo COM_refresh ($_CONF['site_url'] . '/index.php');
exit();
}
! $mode = COM_applyFilter (COM_getArgument ('mode'));
! if ($mode != 'print') {
! $mode = '';
! }
! if (!empty ($HTTP_GET_VARS['order'])) {
! $order = COM_applyFilter ($HTTP_GET_VARS['order']);
! } else {
! $order = COM_applyFilter ($HTTP_POST_VARS['order']);
! }
if ((strcasecmp ($order, 'ASC') != 0) && (strcasecmp ($order, 'DESC') != 0)) {
$order = '';
***************
*** 171,178 ****
. $LANG11[2] . '</a>';
}
if ($_CONF['hideprintericon'] == 0) {
$story_options[] = '<a href="' . $_CONF['site_url']
! . '/article.php?story=' . $story . '&mode=print'
! . '">' . $LANG11[3] . '</a>';
}
$related = COM_whatsRelated ($A['introtext'] . ' ' . $A['bodytext'],
--- 176,189 ----
. $LANG11[2] . '</a>';
}
+ $printUrl = COM_buildUrl ($_CONF['site_url']
+ . '/article.php?story=' . $story . '&mode=print');
if ($_CONF['hideprintericon'] == 0) {
+ $story_options[] = '<a href="' . $printUrl . '">' . $LANG11[3]
+ . '</a>';
+ }
+ if ($_CONF['pdf_enabled'] == 1) {
$story_options[] = '<a href="' . $_CONF['site_url']
! . '/pdfgenerator.php?pageType=2&pageData='
! . urlencode ($printUrl) . '">' . $LANG11[5] . '</a>';
}
$related = COM_whatsRelated ($A['introtext'] . ' ' . $A['bodytext'],
More information about the geeklog-cvs
mailing list