[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.215,1.216
geeklog-cvs-admin at lists.geeklog.net
geeklog-cvs-admin at lists.geeklog.net
Mon Apr 21 05:56:58 EDT 2003
- Previous message (by thread): [geeklog-cvs] geeklog-1.3/public_html/layout/Classic/pollbooth pollanswer.thtml,NONE,1.1 pollblock.thtml,NONE,1.1 pollcomments.thtml,NONE,1.1
- Next message (by thread): [geeklog-cvs] geeklog-1.3/public_html/layout/Yahoo/pollbooth pollanswer.thtml,NONE,1.1 pollblock.thtml,NONE,1.1 pollcomments.thtml,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory internal.geeklog.net:/tmp/cvs-serv30714
Modified Files:
lib-common.php
Log Message:
Moved hard-coded HTML for the poll block to template files.
Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.215
retrieving revision 1.216
diff -C2 -d -r1.215 -r1.216
*** lib-common.php 18 Apr 2003 21:08:42 -0000 1.215
--- lib-common.php 21 Apr 2003 09:56:56 -0000 1.216
***************
*** 1617,1621 ****
$id = DB_count( $_TABLES['pollvoters'], $fields, $values );
! if( empty( $HTTP_COOKIE_VARS[$qid]) && $id == 0 )
{
if( $nquestion == 1 )
--- 1617,1621 ----
$id = DB_count( $_TABLES['pollvoters'], $fields, $values );
! if( empty( $HTTP_COOKIE_VARS[$qid] ) && $id == 0 )
{
if( $nquestion == 1 )
***************
*** 1626,1653 ****
if( $nanswers > 0 )
{
! $retval .= COM_startBlock( $LANG01[5], '', COM_getBlockTemplate( 'poll_block', 'header' ))
! . '<h2>' . $Q['question'] . '</h2>' . LB
! . '<form action="' . $_CONF['site_url'] . '/pollbooth.php" name="Vote" method="POST">' . LB
! . '<input type="hidden" name="qid" value="' . $qid . '">'
! . LB;
! for( $i=1; $i<=$nanswers; $i++ )
{
! $A = DB_fetchArray($answers);
! $retval .= '<input type="radio" name="aid" value="' .$A['aid'] . '">' . $A['answer'] . '<br>' . LB;
}
- $retval .= '<input type="submit" value="' . $LANG01[56] . '">' . LB
- . '<a href="' . $_CONF['site_url'] . '/pollbooth.php?qid=' . $qid . '&aid=-1">' . $LANG01[6] . '</a>' . LB
- . '</form>'
- . '<span class="storybyline">' . $Q['voters'] . ' ' . $LANG01[8];
-
if( $Q['commentcode'] >= 0 )
{
! $retval .= ' | <a href="' . $_CONF['site_url'] . '/pollbooth.php?qid=' . $qid . '&aid=-1#comments">'
! . DB_count($_TABLES['comments'],'sid',$qid) . ' ' . $LANG01[3] . '</a>';
}
! $retval .= '</span><br>' . COM_endBlock( COM_getBlockTemplate( 'poll_block', 'footer' )) . LB;
}
}
--- 1626,1675 ----
if( $nanswers > 0 )
{
! $poll = new Template( $_CONF['path_layout'] . '/pollbooth' );
! $poll->set_file( array( 'panswer' => 'pollanswer.thtml',
! 'block' => 'pollblock.thtml',
! 'comments' => 'pollcomments.thtml' ));
! $poll->set_var( 'site_url', $_CONF['site_url'] );
! $poll->set_var( 'layout_url', $_CONF['layout_url'] );
! $poll->set_var( 'poll_question', $Q['question'] );
! $poll->set_var( 'poll_id', $qid );
! $poll->set_var( 'num_votes', $Q['voters'] );
! $poll->set_var( 'poll_vote_url', $_CONF['site_url']
! . '/pollbooth.php');
! $poll->set_var( 'poll_results_url', $_CONF['site_url']
! . '/pollbooth.php?qid=' . $qid . '&aid=-1');
!
! $poll->set_var( 'lang_vote', $LANG01[56] );
! $poll->set_var( 'lang_votes', $LANG01[8] );
! $poll->set_var( 'lang_results', $LANG01[6] );
!
! for( $i = 1; $i <= $nanswers; $i++ )
{
! $A = DB_fetchArray( $answers );
! $poll->set_var( 'answer_id', $A['aid'] );
! $poll->set_var( 'answer_text', $A['answer'] );
! $poll->parse( 'poll_answers', 'panswer', true );
}
if( $Q['commentcode'] >= 0 )
{
! $poll->set_var( 'num_comments',
! DB_count( $_TABLES['comments'], 'sid', $qid ));
! $poll->set_var( 'lang_comments', $LANG01[3] );
! $poll->parse( 'poll_comments', 'comments', true );
! $poll->set_var( 'poll_comments_url', $_CONF['site_url'] .
! '/pollbooth.php?qid=' . $qid . '&aid=-1#comments');
! }
! else
! {
! $poll->set_var( 'poll_comments', '' );
! $poll->set_var( 'poll_comments_url', '' );
}
! $retval = COM_startBlock( $LANG01[5], '',
! COM_getBlockTemplate( 'poll_block', 'header' ))
! . $poll->finish( $poll->parse( 'output', 'block' ))
! . COM_endBlock( COM_getBlockTemplate( 'poll_block', 'footer' )) . LB;
}
}
- Previous message (by thread): [geeklog-cvs] geeklog-1.3/public_html/layout/Classic/pollbooth pollanswer.thtml,NONE,1.1 pollblock.thtml,NONE,1.1 pollcomments.thtml,NONE,1.1
- Next message (by thread): [geeklog-cvs] geeklog-1.3/public_html/layout/Yahoo/pollbooth pollanswer.thtml,NONE,1.1 pollblock.thtml,NONE,1.1 pollcomments.thtml,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the geeklog-cvs
mailing list