Pagina 1 van 2

EZ portal poll veranderen?

Geplaatst: 27 feb 2005, 22:45
door Eefjuh

Code: Selecteer alles

		  <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
		   <tr>
			<td class="catHead" height="25"><span class="genmed"><b>Poll van de maand</b></span></td>
		   </tr>
		   <tr>
			<td class="row1" align="left"><span class="gensmall">
				<form method="post" action="{S_POLL_ACTION}">
				<center><b>Wat vinden jullie van de nieuwe look?</b></center><br />
				<!-- BEGIN poll_option_row -->
				<input type="radio" name="vote_id" value="{poll_option_row.OPTION_ID}">{poll_option_row.OPTION_TEXT}&nbsp;[{poll_option_row.VOTE_RESULT}]<br />
				<!-- END poll_option_row -->
				<br />
				<!-- BEGIN switch_user_logged_out -->
				<center>{L_LOGIN_TO_VOTE}</center>
				<!-- END switch_user_logged_out -->
				<!-- BEGIN switch_user_logged_in -->
				<center><input type="submit" class="mainoption" name="submit" value="{L_VOTE_BUTTON}" {DISABLED}></center>
				<input type="hidden" name="topic_id" value="{S_TOPIC_ID}">
				<input type="hidden" name="mode" value="vote">
				<!-- END switch_user_logged_in -->
				</form><br />
			</span></td>
		   </tr>
		  </table>
Den naam en vraag heb ik verandert, maar hoe voeg ik keuzes toe?

Geplaatst: 27 feb 2005, 22:49
door Bee
De poll wordt geregeld via een topic met een poll, niet vanuit de portal_body.tpl code ;)

Geplaatst: 27 feb 2005, 23:48
door Eefjuh
o.. :oops:

En hoe doe je dat dan?

Geplaatst: 28 feb 2005, 08:46
door Bee
instellen vanuit welk forum de polls worden gehaald, en daarna in dat forum een topic met een poll openen ;)

Geplaatst: 28 feb 2005, 11:11
door Eefjuh
okeej :D

maaruh... waar stel je dat in? :oops: K heb namelijk geen controlpanel voor de EZ

Geplaatst: 28 feb 2005, 11:18
door Willem-Jan
Hoi,

ACP -> Portal -> Poll forums

Een poll kan worden aangemaakt bij het maken van een nieuw topic.

Succes.... Willem

Geplaatst: 28 feb 2005, 11:20
door Cheeta
ez portal werkt tog even net iets anders hoor :wink: heeft geen acp link zover ik weet

de poll blok kiest de nieuwste poll uit de opgegeven forum

Code: Selecteer alles

// Number of news on portal
$CFG['number_of_news'] = '5';

// Length of news
$CFG['news_length'] = '200';

// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'
$CFG['news_forum'] = '1';

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
$CFG['poll_forum'] = '1';
standaard selecteert die het alleen uit forumid 1

als je naar een forum gaat krijg je aan het einde te staan viewforum.php?f=

dat getal er8er staat voor het forum id

Geplaatst: 28 feb 2005, 11:25
door Bee
Willem-Jan schreef:Hoi,

ACP -> Portal -> Poll forums

Een poll kan worden aangemaakt bij het maken van een nieuw topic.

Succes.... Willem
Je zit met een andere portal, bij ezPortal werkt dit alleen na installatie van de ezAdmin mod.

Geplaatst: 28 feb 2005, 11:29
door Willem-Jan
Sorry... ik wil Eefjuh niet van de regen in de drup helpen. :oops:

Geplaatst: 28 feb 2005, 12:06
door XP-Rene
bee schreef:
Willem-Jan schreef:Hoi,

ACP -> Portal -> Poll forums

Een poll kan worden aangemaakt bij het maken van een nieuw topic.

Succes.... Willem
Je zit met een andere portal, bij ezPortal werkt dit alleen na installatie van de ezAdmin mod.
En waar is deze Mod te vinden? Heb al gezocht op de site van Smartor, phpbb.com, phpbbhacks.com en MODS.DB9.DK maar helaas niet gevonden, of anders, in welk bestand moet dit gewijzigd worden?

Geplaatst: 28 feb 2005, 12:11
door Cheeta

Geplaatst: 28 feb 2005, 12:11
door Bee

Geplaatst: 28 feb 2005, 12:12
door Cheeta
je loopt 8er en die link is dood :P

Geplaatst: 28 feb 2005, 12:13
door Paul
Cheeta schreef:je loopt 8er en die link is dood :P
Nu leeft hij weer 8)

Geplaatst: 28 feb 2005, 12:14
door Cheeta
nee de download link is dood...

Geplaatst: 28 feb 2005, 12:23
door Willem-Jan
Smartor-is-root is back alive!!!!

Geplaatst: 28 feb 2005, 12:47
door Bee
Willem-Jan schreef:Smartor-is-root is back alive!!!!
Ja, duh! Maar de downloadlink in dat topic is dood ;) Hopelijk einde discussie over het doodzijn, ik wil weten of de TS al doorheeft hoe het werkt.

Geplaatst: 28 feb 2005, 12:52
door XP-Rene
Hier is ie wel te downloaden: http://www.boreallis.ca/download.php?id=1

Geplaatst: 28 feb 2005, 12:54
door Bee
bee schreef:
Willem-Jan schreef:Smartor-is-root is back alive!!!!
Ja, duh! Maar de downloadlink in dat topic is dood ;) Hopelijk einde discussie over het doodzijn, ik wil weten of de TS al doorheeft hoe het werkt.

Geplaatst: 28 feb 2005, 13:26
door XP-Rene
Ik heb dit:

Code: Selecteer alles

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14' 
$CFG['poll_forum'] = '1';
verandert in dit:

Code: Selecteer alles

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
//$CFG['poll_forum'] = '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,21,23,24,27,29,30,31,32,,33,32';
Geen foutmeldingen, maar het werkt nog niet, hij laat nog steeds geen polls zien.
Hier is mijn portal.php:

Code: Selecteer alles

<?php
/***************************************************************************
 *                                portal.php
 *                            -------------------
 *   begin                : Tuesday, August 13, 2002
 *   copyright            : (C) 2002 Smartor
 *   email                : smartor_xp@hotmail.com
 *
 *   $Id: portal.php,v 2.1.7 2003/01/30, 17:05:58 Smartor Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   Some code in this file I borrowed from the original index.php, Welcome
 *   Avatar MOD and others...
 *
 ***************************************************************************/

//
// Set configuration for ezPortal
//

// Welcome Text: note that we are in PHP file, so use \' instead of ' and use \\ instead of \ (HTML enabled)
$CFG['welcome_text'] = 'Welcome to <b>My Community</b><br /><br />Thanks for using ezPortal,<br /><br />Have a good time! ^_^';

// Number of news on portal
//$CFG['number_of_news'] = '5';

// Length of news
//$CFG['news_length'] = '200';

// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'
//$CFG['news_forum'] = '1';

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
//$CFG['poll_forum'] = '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,21,23,24,27,29,30,31,32,,33,32';

//
// END configuration
// --------------------------------------------------------

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'fetchposts.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
	$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
	$l_total_post_s = $lang['Posted_article_total'];
}
else
{
	$l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
	$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
	$l_total_user_s = $lang['Registered_user_total'];
}
else
{
	$l_total_user_s = $lang['Registered_users_total'];
}
// Read Portal Configuration from DB
define('PORTAL_TABLE', $table_prefix.'portal');

$CFG = array();
$sql = "SELECT * FROM " . PORTAL_TABLE;

if( !($result = $db->sql_query($sql)) )
{
	message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
	$CFG[$row['portal_name']] = $row['portal_value'];
} 
if( $userdata['session_logged_in'] )
{
	$sql = "SELECT COUNT(post_id) as total
			FROM " . POSTS_TABLE . "
			WHERE post_time >= " . $userdata['user_lastvisit'];
	$result = $db->sql_query($sql);
	if( $result )
	{
		$row = $db->sql_fetchrow($result);
		$lang['Search_new'] = $lang['Search_new'] . "&nbsp;(" . $row['total'] . ")";
	}
}

//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Home'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
	'body' => 'portal_body.tpl')
);

// Newest Nickpages Mod
$sql = "SELECT a.user_id, a.username, b.name, b.created FROM ".USERS_TABLE." a, ".NICKPAGE_TABLE." b WHERE b.uid=a.user_id ORDER BY b.created DESC LIMIT 6";

if (!$result = $db->sql_query($sql))
    {
        message_die(GENERAL_ERROR, 'Could not query Nickpage information', '', __LINE__, __FILE__, $sql);
    }
    
$nickpage_list = $db->sql_fetchrowset($result);
for($i = 0; $i < count($nickpage_list); $i++)
{
	$username = $nickpage_list[$i]['username'];
	$userdate = $nickpage_list[$i]['created'];
	
		
	if(strlen($username) > 17) { // Limit title length to avoid wrap
            $username = strip_tags($username, '<a><i><b><ul><li>');
            $username = substr($username,0,15);
            $username .= "...";
             }
	
		
	$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
	$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
	
	$template->assign_block_vars('nickpagemod', array(
			"ROW_COLOR" => "#" . $row_color,
			"ROW_CLASS" => $row_class,
			'NAME' => '<a href="' . append_sid("nickpage.php?user=$username") . '">' . $username . '</a>',
			'LSEEN_TIME'     => date("m.d.y", $nickpage_list[$i]['created']),
			)
			);
		}
//
// Avatar On Index MOD
//
$avatar_img = '';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
	switch( $userdata['user_avatar_type'] )
	{
		case USER_AVATAR_UPLOAD:
			$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_REMOTE:
			$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_GALLERY:
			$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
	}
}
// Check For Anonymous User
if ($userdata['user_id'] != '-1')
{
	$name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile&" . $userdata['user_id']) . '">' . $userdata['username'] . '</a>';
}
else
{
	$name_link = $lang['Guest'];
}
//
// END: Avatar On Index MOD
//


$template->assign_vars(array(
	'WELCOME_TEXT' => $CFG['welcome_text'],
	'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
	'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
	'TOTAL_TOPICS' => sprintf($lang['total_topics'], $total_topics),
	'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
	'L_FORUM' => $lang['Forum'],
	'L_BOARD_NAVIGATION' => $lang['Board_navigation'],
	'L_STATISTICS' => $lang['Statistics'],	
	'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
	'L_POSTED' => $lang['Posted'],
	'L_COMMENTS' => $lang['Comments'],
	'L_VIEW_COMMENTS' => $lang['View_comments'],
	'L_POST_COMMENT' => $lang['Post_your_comment'],
	'L_SEND_PASSWORD' => $lang['Forgotten_password'],
	'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
	'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid("profile.$phpEx?mode=register") . '">', '</a>'),
	'L_REMEMBER_ME' => $lang['Remember_me'],
	'L_VIEW_COMPLETE_LIST' => $lang['View_complete_list'],
	'L_POLL' => $lang['Poll'],
	'L_VOTE_BUTTON' => $lang['Vote'],
	'L_WHOSBIRTHDAY_WEEK' => ($board_config['birthday_check_day']>1) ? sprintf((($birthday_week_list) ? $lang['Birthday_week'].$birthday_week_list : $lang['Nobirthday_week']), $board_config['birthday_check_day']) : '',
	'L_WHOSBIRTHDAY_TODAY' => ($board_config['birthday_check_day']) ? ($birthday_today_list) ? $lang['Birthday_today'].$birthday_today_list : $lang['Nobirthday_today'] : '',
	'L_NEWEST_NICKPAGES' => $lang['Newest_Nickpages'],
	
	// Welcome Avatar
	'L_NAME_WELCOME' => $lang['Welcome'],
	'U_NAME_LINK' => $name_link,
	'AVATAR_IMG' => $avatar_img)
);

//
// Fetch Posts from Announcements Forum
//
if(!isset($HTTP_GET_VARS['article']))
{
	$template->assign_block_vars('welcome_text', array());

	$fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], $CFG['news_length']);

	for ($i = 0; $i < count($fetchposts); $i++)
	{
		if( $fetchposts[$i]['striped'] == 1 )
		{
			$open_bracket = '[ ';
			$close_bracket = ' ]';
			$read_full = $lang['Read_Full'];
		}
		else
		{
			$open_bracket = '';
			$close_bracket = '';
			$read_full = '';
		}

		$template->assign_block_vars('fetchpost_row', array(
			'TITLE' => $fetchposts[$i]['topic_title'],
			'POSTER' => $fetchposts[$i]['username'],
			'TIME' => $fetchposts[$i]['topic_time'],
			'TEXT' => $fetchposts[$i]['post_text'],
			'REPLIES' => $fetchposts[$i]['topic_replies'],
			'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
			'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id']),
			'U_READ_FULL' => append_sid('portal.' . $phpEx . '?article=' . $i),
			'L_READ_FULL' => $read_full,
			'OPEN' => $open_bracket,
			'CLOSE' => $close_bracket)
		);
	}
}
else
{
	$fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], 0);

	$i = intval($HTTP_GET_VARS['article']);

	$template->assign_block_vars('fetchpost_row', array(
		'TITLE' => $fetchposts[$i]['topic_title'],
		'POSTER' => $fetchposts[$i]['username'],
		'TIME' => $fetchposts[$i]['topic_time'],
		'TEXT' => $fetchposts[$i]['post_text'],
		'REPLIES' => $fetchposts[$i]['topic_replies'],
		'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
		'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id'])
		)
	);
}
//
// END: Fetch Announcements
//

//
// Fetch Poll
//
$fetchpoll = phpbb_fetch_poll($CFG['poll_forum']);

if (!empty($fetchpoll))
{
	$template->assign_vars(array(		
		'S_POLL_QUESTION' => $fetchpoll['vote_text'],
		'S_POLL_ACTION' => append_sid('posting.'.$phpEx.'?'.POST_TOPIC_URL.'='.$fetchpoll['topic_id']),
		'S_TOPIC_ID' => $fetchpoll['topic_id'],
		'L_SUBMIT_VOTE' => $lang['Submit_vote'],
		'L_LOGIN_TO_VOTE' => $lang['Login_to_vote']		
		)
	);

	for ($i = 0; $i < count($fetchpoll['options']); $i++)
	{
		$template->assign_block_vars('poll_option_row', array(
			'OPTION_ID' => $fetchpoll['options'][$i]['vote_option_id'],
			'OPTION_TEXT' => $fetchpoll['options'][$i]['vote_option_text'],
			'VOTE_RESULT' => $fetchpoll['options'][$i]['vote_result'],
			)
		);
	}	
}
else
{
	$template->assign_vars(array(		
		'S_POLL_QUESTION' => $lang['No_poll'],
		'DISABLED' => 'disabled="disabled"'
		)
	);
}

//
// Generate the page
//
include($phpbb_root_path . 'mods/netclectic/mini_cal/mini_cal.'.$phpEx);
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Mis ik weer eens ergens iets of....????