Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

Rekomendowane odpowiedzi

Opublikowano

Jak dodaję ankietę/sondę/głosowanie to po dodaniu widać pasek i postęp głosowania (1 głosów [33.33%]) Czy jest możliwość ukrycia tego dla wszystkich oprócz Adminów ?

Brak sygnatury

  • Manager
Opublikowano

Edycja skina.

Widok tematu :a: pollDisplay

Znajdź:

									<if test="viewVoters:|:$poll['poll_view_voters'] AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
									<a href='#' class='votes' id='l_voters_{$questionID}_{$choiceID}' title='{$this->lang->words['poll_view_voters']}'>({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%] - <strong>{$this->lang->words['poll_view']}</strong>)</a>
								<else />
									<span class='votes'> ({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%])</span>
								</if>

Zamień na:

									<if test="$this->memberData['g_access_cp']">
									<if test="viewVoters:|:$poll['poll_view_voters'] AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
										<a href='#' class='votes' id='l_voters_{$questionID}_{$choiceID}' title='{$this->lang->words['poll_view_voters']}'>({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%] - <strong>{$this->lang->words['poll_view']}</strong>)</a>
									<else />
										<span class='votes'> ({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%])</span>
									</if>
								</if>

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano

Zamieniłem ale dalej widać (9 głosów [75.00%]) a chciałbym aby tego , oraz paska postępu użytkownicy nie widzieli ..

Brak sygnatury

  • Manager
Opublikowano

E no nie gadaj, bo testowałem ten kod i działa znakomicie.

I jeśli testowałeś na swoim koncie to niezły lol - admini mogą widzieć wyniki - tak chciałeś. Najlepiej zrób screen i napisz co i dla kogo ma być ukryte.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano

ma być widoczne tylko dla Adminów reszta ukryte..

Kod co zmieniłem

<script type='text/javascript'>
//<![CDATA[
ipb.templates['poll_voters'] = new Template("<h3 class='bar'>{$this->lang->words['poll_voted_for']} #{title}</h3><div class='general_box'>#{content}</div>");
//]]>
</script>
<div class='general_box alt poll' id='poll_{$poll['pid']}'>
<form action="{parse url="app=forums&module=extras&section=vote&t={$topicData['tid']}&st={$this->request['st']}&do=add&secure_key={$this->member->form_hash}" base="public"}" name='pollForm' method="post">
	<h3>{$this->lang->words['poll']} {$poll['poll_question']}<if test="showPollResults:|:$showResults"> <span class='desc'>({$poll['_totalVotes']} {$this->lang->words['poll_vote_casted']})</span></if></h3>
	<if test="publicPollNotice:|:$this->settings['poll_allow_public'] AND $poll['poll_view_voters'] AND ! $showResults">
		<div class='message unspecified'>{$this->lang->words['poll_public_notice']}</div>
	</if>
	<foreach loop="poll_questions:$pollData as $questionID => $questionData">
		<div class='poll_question<if test="votedClass:|:$showResults"> voted</if>'>
			<h4 class='rounded'>{$pollData[ $questionID ]['question']}</h4>
			<if test="noGuestVote:|:! $this->settings['allow_result_view'] AND ! $this->memberData['member_id']">
				{$this->lang->words['poll_noview_guest']}
			<else />
				<ol>
					<foreach loop="poll_choices:$pollData[ $questionID ]['choices'] as $choiceID => $choiceData">
						<if test="showingResults:|:$showResults">
							<li>
								<span class='answer'><if test="hasVoters:|:is_array( $choiceData['voters'] ) AND in_array( $this->memberData['member_id'], array_keys( $choiceData['voters'] ) )"> {parse replacement="your_vote"} </if>{$choiceData['choice']}</span>
								<if test="$this->memberData['g_access_cp']">
                                                                               <if test="viewVoters:|:$poll['poll_view_voters'] AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
                                                                                       <a href='#' class='votes' id='l_voters_{$questionID}_{$choiceID}' title='{$this->lang->words['poll_view_voters']}'>({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%] - <strong>{$this->lang->words['poll_view']}</strong>)</a>
                                                                               <else />
                                                                                       <span class='votes'> ({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%])</span>
                                                                               </if>
                                                                       </if>
								<if test="votersJs:|:$poll['poll_view_voters'] AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
									<script type='text/javascript'>
										$('l_voters_{$questionID}_{$choiceID}').observe('click', ipb.topic.showVoters.bindAsEventListener( this, {$questionID}, {$choiceID} ) );
										if( Object.isUndefined( ipb.topic.poll[ $questionID ] ) ){
											ipb.topic.poll[ $questionID ] = [];
										}

										var users = "";

										<foreach loop="poll_voters:$choiceData['voters'] as $id => $member">
											users += "<a href='{parse url="showuser={$member['member_id']}" base="public" seotitle="{$member['members_seo_name']}" template="showuser"}'>{$member['members_colored_name']}</a> {parse template="user_popup" group="global" params="$member['member_id'],$member['members_seo_name']"}<if test="lastVoter:|:$member['_last'] == 0">, </if>";
										</foreach>
										ipb.topic.poll[ $questionID ][ $choiceID ] = { name: "{$choiceData['choice']}", users: users};
									</script>
								</if>
								<p class='progress_bar topic_poll' title='{$this->lang->words['poll_percent_of_vote']} {$choiceData['percent']}%'>
									<span style='width: {$choiceData['percent']}%'><span>{$this->lang->words['poll_percent_of_vote']} {$choiceData['percent']}%</span></span>
								</p>
							</li>
						<else />
							<if test="multiVote:|:$choiceData['type'] == 'multi'">
								<li><input type='checkbox' id='choice_{$questionID}_{$choiceID}' name='choice_{$questionID}_{$choiceID}' value='1' class='input_check' /> <label for='choice_{$questionID}_{$choiceID}'>{$choiceData['choice']}</label></li>
							<else />
								<li><input type='radio' name='choice[{$questionID}]' id='choice_{$questionID}_{$choiceID}' class='input_radio' value='{$choiceID}' /> <label for='choice_{$questionID}_{$choiceID}'>{$choiceData['choice']}</label></li>
							</if>
						</if>
					</foreach>
				</ol>
			</if>
		</div>
		<script type='text/javascript'>
			Debug.dir( ipb.topic.poll );
		</script>
	</foreach>
	<fieldset class='submit'>
		<legend>{$this->lang->words['poll_vote']}</legend>
		<if test="voteButton:|:$topicData['state'] != 'closed' AND $forumData['status']">
			<if test="voteButtonMid:|:$this->memberData['member_id']">
				<if test="voteButtonVoted:|:$poll['_memberVoted']">
					<if test="deleteVote:|:$this->settings['poll_allow_vdelete'] OR $this->memberData['g_is_supmod']">
						<a href='{parse url="app=forums&module=extras&section=vote&t={$topicData['tid']}&st={$this->request['st']}&do=delete&secure_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['poll_delete_vote']}' id='poll_deletevote' class='input_submit alt'>{$this->lang->words['poll_delete_vote']}</a>
					<else />
						{$this->lang->words['poll_you_voted']}
					</if>
				<else />
					<if test="youCreatedPoll:|$poll['starter_id'] == $this->memberData['member_id']) and ($this->settings['allow_creator_vote'] != 1)">
						{$this->lang->words['poll_you_created']}
					<else />
						<!-- VOTE Button -->
						<if test="cast:|:$this->request['mode'] != 'show'">
							<input class='input_submit' type="submit" name="submit" value="{$this->lang->words['poll_add_vote']}" title="{$this->lang->words['tt_poll_vote']}" />
						</if>
						<!-- SHOW Button -->
						<if test="displayVotes:|:$this->settings['allow_result_view'] == 1">
							<if test="alreadyDisplayVotes:|:$this->request['mode'] == 'show'">
								<if test="viewVotersLink:|:! $poll_view_voters">
									<a href='{parse url="showtopic={$topicData['tid']}&st={$this->request['st']}" base="public" seotitle="{$topicData['title_seo']}" template="showtopic"}' title='{$this->lang->words['tt_poll_svote']}' id='poll_nullvote' class='input_submit alt'>{$this->lang->words['pl_show_vote']}</a>
								</if>
							<else />
								<a href='{parse url="showtopic={$topicData['tid']}&mode=show&st={$this->request['st']}" base="public" seotitle="{$topicData['title_seo']}" template="showtopic"}' title='{$this->lang->words['tt_poll_show']}' id='poll_showresults' class='input_submit alt'>{$this->lang->words['pl_show_results']}</a>
							</if>
						<else />
							<input class='input_submit' type="submit" name="nullvote" value="{$this->lang->words['poll_null_vote']}" title="{$this->lang->words['tt_poll_null']}" />
						</if>
					</if>
				</if>
			<else />
				{$this->lang->words['poll_no_guests']}
			</if>
		</if>
		<if test="editPoll:|:$editPoll">
			<a href='{parse url="app=forums&module=post&section=post&do=edit_post&f={$poll['forum_id']}&t={$poll['tid']}&p={$topicData['topic_firstpost']}" base="publicWithApp"}' title='{$this->lang->words['poll_edit']}' class='input_submit alt' >{parse replacement="edit_post_icon"} {$this->lang->words['poll_edit']}</a>
		</if>
	</fieldset>
</form>
</div>

screen

pre_1304884493__12121212.jpg

Brak sygnatury

Opublikowano

Nie zaznaczam

Ankieta publiczna (W przypadku zaznaczenia głosy będą publiczne. Po zagłosowaniu tej zmiany nie będzie można cofnąć!)

Brak sygnatury

  • Manager
Opublikowano

Weź za tym:

<span class='answer'><if test="hasVoters:|:is_array( $choiceData['voters'] ) AND in_array( $this->memberData['member_id'], array_keys( $choiceData['voters'] ) )"> {parse replacement="your_vote"} </if>{$choiceData['choice']}</span>

Wpisz:

test

I sprawdź czyt i gdzie się na forum pokazuje (w widoku ankiety). I pokaż screen.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano (edytowane)

Zadziałało jak wyłączyłem (SOS31) View Poll Voters v1.0.0

Jest coś takiego jak się odda głosy na 2 pytania Czyli i tak mniej więcej pokazuje ilosć głosów A czy da się żeby nie pokazywało pasków lub jednakowo ?No i pokazuje (11 użytkowników oddało głos)

pre_1304956683__909090.jpg

Edytowane przez groverr

Brak sygnatury

  • Manager
Opublikowano

W którym miejscu wcześniej napisałeś, że właśnie tak chcesz to zrobić? Wykonałem to zgodnie z tym, jak chciałeś, a teraz kombinujesz i zmieniasz.. :wacko:

Nowy bit:

<script type='text/javascript'>
//<![CDATA[
ipb.templates['poll_voters'] = new Template("<h3 class='bar'>{$this->lang->words['poll_voted_for']} #{title}</h3><div class='general_box'>#{content}</div>");
//]]>
</script>
<div class='general_box alt poll' id='poll_{$poll['pid']}'>
<form action="{parse url="app=forums&module=extras&section=vote&t={$topicData['tid']}&st={$this->request['st']}&do=add&secure_key={$this->member->form_hash}" base="public"}" name='pollForm' method="post">
	<h3>{$this->lang->words['poll']} {$poll['poll_question']} <if test="$this->memberData['g_access_cp']"><if test="showPollResults:|:$showResults"> <span class='desc'>({$poll['_totalVotes']} {$this->lang->words['poll_vote_casted']})</span></if></if></h3>
	<if test="publicPollNotice:|:$this->settings['poll_allow_public'] AND $poll['poll_view_voters'] AND ! $showResults">
		<div class='message unspecified'>{$this->lang->words['poll_public_notice']}</div>
	</if>
	<foreach loop="poll_questions:$pollData as $questionID => $questionData">
		<div class='poll_question<if test="votedClass:|:$showResults"> voted</if>'>
			<h4 class='rounded'>{$pollData[ $questionID ]['question']}</h4>
			<if test="noGuestVote:|:! $this->settings['allow_result_view'] AND ! $this->memberData['member_id']">
				{$this->lang->words['poll_noview_guest']}
			<else />
				<ol>
					<foreach loop="poll_choices:$pollData[ $questionID ]['choices'] as $choiceID => $choiceData">
						<if test="showingResults:|:$showResults">
							<li>
								<span class='answer'><if test="hasVoters:|:is_array( $choiceData['voters'] ) AND in_array( $this->memberData['member_id'], array_keys( $choiceData['voters'] ) )"> {parse replacement="your_vote"} </if>{$choiceData['choice']}</span>
								 <if test="$this->memberData['g_access_cp']">
								<if test="viewVoters:|:$poll['poll_view_voters'] AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
									<a href='#' class='votes' id='l_voters_{$questionID}_{$choiceID}' title='{$this->lang->words['poll_view_voters']}'>({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%] - <strong>{$this->lang->words['poll_view']}</strong>)</a>
								<else />
									<span class='votes'> ({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%])</span>
								</if>

								<if test="votersJs:|:$poll['poll_view_voters'] AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
									<script type='text/javascript'>
										$('l_voters_{$questionID}_{$choiceID}').observe('click', ipb.topic.showVoters.bindAsEventListener( this, {$questionID}, {$choiceID} ) );
										if( Object.isUndefined( ipb.topic.poll[ $questionID ] ) ){
											ipb.topic.poll[ $questionID ] = [];
										}

										var users = "";

										<foreach loop="poll_voters:$choiceData['voters'] as $id => $member">
											users += "<a href='{parse url="showuser={$member['member_id']}" base="public" seotitle="{$member['members_seo_name']}" template="showuser"}'>{$member['members_colored_name']}</a> {parse template="user_popup" group="global" params="$member['member_id'],$member['members_seo_name']"}<if test="lastVoter:|:$member['_last'] == 0">, </if>";
										</foreach>
										ipb.topic.poll[ $questionID ][ $choiceID ] = { name: "{$choiceData['choice']}", users: users};
									</script>
								</if>
								<p class='progress_bar topic_poll' title='{$this->lang->words['poll_percent_of_vote']} {$choiceData['percent']}%'>
									<span style='width: {$choiceData['percent']}%'><span>{$this->lang->words['poll_percent_of_vote']} {$choiceData['percent']}%</span></span>
								</p>
								</if> 
							</li>
						<else />
							<if test="multiVote:|:$choiceData['type'] == 'multi'">
								<li><input type='checkbox' id='choice_{$questionID}_{$choiceID}' name='choice_{$questionID}_{$choiceID}' value='1' class='input_check' /> <label for='choice_{$questionID}_{$choiceID}'>{$choiceData['choice']}</label></li>
							<else />
								<li><input type='radio' name='choice[{$questionID}]' id='choice_{$questionID}_{$choiceID}' class='input_radio' value='{$choiceID}' /> <label for='choice_{$questionID}_{$choiceID}'>{$choiceData['choice']}</label></li>
							</if>
						</if>
					</foreach>
				</ol>
			</if>
		</div>
		<script type='text/javascript'>
			Debug.dir( ipb.topic.poll );
		</script>
	</foreach>
	<fieldset class='submit'>
		<legend>{$this->lang->words['poll_vote']}</legend>
		<if test="voteButton:|:$topicData['state'] != 'closed' AND $forumData['status']">
			<if test="voteButtonMid:|:$this->memberData['member_id']">
				<if test="voteButtonVoted:|:$poll['_memberVoted']">
					<if test="deleteVote:|:$this->settings['poll_allow_vdelete'] OR $this->memberData['g_is_supmod']">
						<a href='{parse url="app=forums&module=extras&section=vote&t={$topicData['tid']}&st={$this->request['st']}&do=delete&secure_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['poll_delete_vote']}' id='poll_deletevote' class='input_submit alt'>{$this->lang->words['poll_delete_vote']}</a>
					<else />
						{$this->lang->words['poll_you_voted']}
					</if>
				<else />
					<if test="youCreatedPoll:|$poll['starter_id'] == $this->memberData['member_id']) and ($this->settings['allow_creator_vote'] != 1)">
						{$this->lang->words['poll_you_created']}
					<else />
						<!-- VOTE Button -->
						<if test="cast:|:$this->request['mode'] != 'show'">
							<input class='input_submit' type="submit" name="submit" value="{$this->lang->words['poll_add_vote']}" title="{$this->lang->words['tt_poll_vote']}" />
						</if>
						<!-- SHOW Button -->
						<if test="displayVotes:|:$this->settings['allow_result_view'] == 1">
							<if test="alreadyDisplayVotes:|:$this->request['mode'] == 'show'">
								<if test="viewVotersLink:|:! $poll_view_voters">
									<a href='{parse url="showtopic={$topicData['tid']}&st={$this->request['st']}" base="public" seotitle="{$topicData['title_seo']}" template="showtopic"}' title='{$this->lang->words['tt_poll_svote']}' id='poll_nullvote' class='input_submit alt'>{$this->lang->words['pl_show_vote']}</a>
								</if>
							<else />
								<a href='{parse url="showtopic={$topicData['tid']}&mode=show&st={$this->request['st']}" base="public" seotitle="{$topicData['title_seo']}" template="showtopic"}' title='{$this->lang->words['tt_poll_show']}' id='poll_showresults' class='input_submit alt'>{$this->lang->words['pl_show_results']}</a>
							</if>
						<else />
							<input class='input_submit' type="submit" name="nullvote" value="{$this->lang->words['poll_null_vote']}" title="{$this->lang->words['tt_poll_null']}" />
						</if>
					</if>
				</if>
			<else />
				{$this->lang->words['poll_no_guests']}
			</if>
		</if>
		<if test="editPoll:|:$editPoll">
			<a href='{parse url="app=forums&module=post&section=post&do=edit_post&f={$poll['forum_id']}&t={$poll['tid']}&p={$topicData['topic_firstpost']}" base="publicWithApp"}' title='{$this->lang->words['poll_edit']}' class='input_submit alt' >{parse replacement="edit_post_icon"} {$this->lang->words['poll_edit']}</a>
		</if>
	</fieldset>
</form>
</div>

Efekt:

pre_1304957319__2011-05-09_18-08-05.png

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano

Super DawPi Działa świetnie A czy jest możliwość jak włączę (SOS31) View Poll Voters v1.0.0 żeby działało Bo jak go włączę to pokazuje wyniki...

Brak sygnatury

Opublikowano

Pomożesz ?bo mi coś nie idzie

<script type='text/javascript'>
//<![CDATA[
ipb.templates['poll_voters'] = new Template("<h3 class='bar'>{$this->lang->words['poll_voted_for']} #{title}</h3><div class='general_box'>#{content}</div>");
//]]>
</script>
<div class='general_box alt poll' id='poll_{$poll['pid']}'>
<form action="{parse url="app=forums&module=extras&section=vote&t={$topicData['tid']}&st={$this->request['st']}&do=add&secure_key={$this->member->form_hash}" base="public"}" name='pollForm' method="post">
	<h3>{$this->lang->words['poll']} {$poll['poll_question']}<if test="showPollResults:|:$showResults"> <span class='desc'>({$poll['_totalVotes']} {$this->lang->words['poll_vote_casted']})</span></if><span class='right'>Visualizar Votos</span></h3>
	<if test="publicPollNotice:|:$this->settings['poll_allow_public'] AND $poll['poll_view_voters'] AND ! $showResults">
		<div class='message unspecified'>{$this->lang->words['poll_public_notice']}</div>
	</if>
	<foreach loop="poll_questions:$pollData as $questionID => $questionData">
		<div class='poll_question<if test="votedClass:|:$showResults"> voted</if>'>
			<h4 class='rounded'>{$pollData[ $questionID ]['question']}</h4>
			<if test="noGuestVote:|:! $this->settings['allow_result_view'] AND ! $this->memberData['member_id']">
				{$this->lang->words['poll_noview_guest']}
			<else />
				<ol>
					<foreach loop="poll_choices:$pollData[ $questionID ]['choices'] as $choiceID => $choiceData">
						<if test="showingResults:|:$showResults">
							<li>
								<span class='answer'><if test="hasVoters:|:is_array( $choiceData['voters'] ) AND in_array( $this->memberData['member_id'], array_keys( $choiceData['voters'] ) )"> {parse replacement="your_vote"} </if>{$choiceData['choice']}</span>
								<if test="viewVoters:|:in_array( $this->memberData['member_group_id'], explode( ',', $this->settings['sos31_viewpollvoters_grupos'] ) ) AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
									<a href='#' class='votes' id='l_voters_{$questionID}_{$choiceID}' title='{$this->lang->words['poll_view_voters']}'>({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%] - <strong>{$this->lang->words['poll_view']}</strong>)</a>
								<else />
									<span class='votes'> ({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%])</span>
								</if>
								<if test="votersJs:|:in_array( $this->memberData['member_group_id'], explode( ',', $this->settings['sos31_viewpollvoters_grupos'] ) ) AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
									<script type='text/javascript'>
										$('l_voters_{$questionID}_{$choiceID}').observe('click', ipb.topic.showVoters.bindAsEventListener( this, {$questionID}, {$choiceID} ) );
										if( Object.isUndefined( ipb.topic.poll[ $questionID ] ) ){
											ipb.topic.poll[ $questionID ] = [];
										}

										var users = "";

										<foreach loop="poll_voters:$choiceData['voters'] as $id => $member">
											users += "<a href='{parse url="showuser={$member['member_id']}" base="public" seotitle="{$member['members_seo_name']}" template="showuser"}'>{$member['members_colored_name']}</a> {parse template="user_popup" group="global" params="$member['member_id'],$member['members_seo_name']"}<if test="lastVoter:|:$member['_last'] == 0">, </if>";
										</foreach>
										ipb.topic.poll[ $questionID ][ $choiceID ] = { name: "{$choiceData['choice']}", users: users};
									</script>
								</if>
								<p class='progress_bar topic_poll' title='{$this->lang->words['poll_percent_of_vote']} {$choiceData['percent']}%'>
									<span style='width: {$choiceData['percent']}%'><span>{$this->lang->words['poll_percent_of_vote']} {$choiceData['percent']}%</span></span>
								</p>
							</li>
						<else />
							<if test="multiVote:|:$choiceData['type'] == 'multi'">
								<li><input type='checkbox' id='choice_{$questionID}_{$choiceID}' name='choice_{$questionID}_{$choiceID}' value='1' class='input_check' /> <label for='choice_{$questionID}_{$choiceID}'>{$choiceData['choice']}</label></li>
							<else />
								<li><input type='radio' name='choice[{$questionID}]' id='choice_{$questionID}_{$choiceID}' class='input_radio' value='{$choiceID}' /> <label for='choice_{$questionID}_{$choiceID}'>{$choiceData['choice']}</label></li>
							</if>
						</if>
					</foreach>
				</ol>
			</if>
		</div>
		<script type='text/javascript'>
			Debug.dir( ipb.topic.poll );
		</script>
	</foreach>
	<fieldset class='submit'>
		<legend>{$this->lang->words['poll_vote']}</legend>
		<if test="voteButton:|:$topicData['state'] != 'closed' AND $forumData['status']">
			<if test="voteButtonMid:|:$this->memberData['member_id']">
				<if test="voteButtonVoted:|:$poll['_memberVoted']">
					<if test="deleteVote:|:$this->settings['poll_allow_vdelete'] OR $this->memberData['g_is_supmod']">
						<a href='{parse url="app=forums&module=extras&section=vote&t={$topicData['tid']}&st={$this->request['st']}&do=delete&secure_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['poll_delete_vote']}' id='poll_deletevote' class='input_submit alt'>{$this->lang->words['poll_delete_vote']}</a>
					<else />
						{$this->lang->words['poll_you_voted']}
					</if>
				<else />
					<if test="youCreatedPoll:|$poll['starter_id'] == $this->memberData['member_id']) and ($this->settings['allow_creator_vote'] != 1)">
						{$this->lang->words['poll_you_created']}
					<else />
						<!-- VOTE Button -->
						<if test="cast:|:$this->request['mode'] != 'show'">
							<input class='input_submit' type="submit" name="submit" value="{$this->lang->words['poll_add_vote']}" title="{$this->lang->words['tt_poll_vote']}" />
						</if>
						<!-- SHOW Button -->
						<if test="displayVotes:|:$this->settings['allow_result_view'] == 1">
							<if test="alreadyDisplayVotes:|:$this->request['mode'] == 'show'">
								<if test="viewVotersLink:|:! $poll_view_voters">
									<a href='{parse url="showtopic={$topicData['tid']}&st={$this->request['st']}" base="public" seotitle="{$topicData['title_seo']}" template="showtopic"}' title='{$this->lang->words['tt_poll_svote']}' id='poll_nullvote' class='input_submit alt'>{$this->lang->words['pl_show_vote']}</a>
								</if>
							<else />
								<a href='{parse url="showtopic={$topicData['tid']}&mode=show&st={$this->request['st']}" base="public" seotitle="{$topicData['title_seo']}" template="showtopic"}' title='{$this->lang->words['tt_poll_show']}' id='poll_showresults' class='input_submit alt'>{$this->lang->words['pl_show_results']}</a>
							</if>
						<else />
							<input class='input_submit' type="submit" name="nullvote" value="{$this->lang->words['poll_null_vote']}" title="{$this->lang->words['tt_poll_null']}" />
						</if>
					</if>
				</if>
			<else />
				{$this->lang->words['poll_no_guests']}
			</if>
		</if>
		<if test="editPoll:|:$editPoll">
			<a href='{parse url="app=forums&module=post&section=post&do=edit_post&f={$poll['forum_id']}&t={$poll['tid']}&p={$topicData['topic_firstpost']}" base="publicWithApp"}' title='{$this->lang->words['poll_edit']}' class='input_submit alt' >{parse replacement="edit_post_icon"} {$this->lang->words['poll_edit']}</a>
		</if>
	</fieldset>
</form>
</div>

Brak sygnatury

Opublikowano

WinMerge bo wiem że nie dam rady dlatego proszę o pomoc zaawansowanego , bo mi troszkę na czasie zależy A później sam będę się uczył ...

Brak sygnatury

  • Manager
Opublikowano

A ja tego czasu nie mam już od samego rana! :) Nie wydziwiaj, czekałeś od wczoraj, to poczekasz te 20 minut max. Tutaj nie ma magii - pomyśleć, porównać kod. Tyle. Nic nie wymyślać, nic nie edytować! Tylko posklejać!

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Opublikowano (edytowane)

Jakoś sobie nie radzę bo niby dla userów nie pokazuje nic Czyli tak jak ma być A jak dla Adminów pokazuje (3 głosów [100.00%])ale nie pokazuje (pokaż)obok [100.00%] Oto bit co edytowałem może pomoże ktoś ,

<script type='text/javascript'>
//<![CDATA[
       ipb.templates['poll_voters'] = new Template("<h3 class='bar'>{$this->lang->words['poll_voted_for']} #{title}</h3><div class='general_box'>#{content}</div>");
//]]>
</script>
<div class='general_box alt poll' id='poll_{$poll['pid']}'>
       <form action="{parse url="app=forums&module=extras&section=vote&t={$topicData['tid']}&st={$this->request['st']}&do=add&secure_key={$this->member->form_hash}" base="public"}" name='pollForm' method="post">
               <h3>{$this->lang->words['poll']} {$poll['poll_question']} <if test="$this->memberData['g_access_cp']"><if test="showPollResults:|:$showResults"> <span class='desc'>({$poll['_totalVotes']} {$this->lang->words['poll_vote_casted']})</span></if></if></h3>
               <if test="publicPollNotice:|:$this->settings['poll_allow_public'] AND $poll['poll_view_voters'] AND ! $showResults">
                       <div class='message unspecified'>{$this->lang->words['poll_public_notice']}</div>
               </if>
               <foreach loop="poll_questions:$pollData as $questionID => $questionData">
                       <div class='poll_question<if test="votedClass:|:$showResults"> voted</if>'>
                               <h4 class='rounded'>{$pollData[ $questionID ]['question']}</h4>
                               <if test="noGuestVote:|:! $this->settings['allow_result_view'] AND ! $this->memberData['member_id']">
                                       {$this->lang->words['poll_noview_guest']}
                               <else />
                                       <ol>
                                               <foreach loop="poll_choices:$pollData[ $questionID ]['choices'] as $choiceID => $choiceData">
                                                       <if test="showingResults:|:$showResults">
                                                               <li>
                                                                       <span class='answer'><if test="hasVoters:|:is_array( $choiceData['voters'] ) AND in_array( $this->memberData['member_id'], array_keys( $choiceData['voters'] ) )"> {parse replacement="your_vote"} </if>{$choiceData['choice']}</span>
                                                                        <if test="$this->memberData['g_access_cp']">
                                                                       <if test="viewVoters:|:$poll['poll_view_voters'] AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
                                                                               <a href='#' class='votes' id='l_voters_{$questionID}_{$choiceID}' title='{$this->lang->words['poll_view_voters']}'>({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%] - <strong>{$this->lang->words['poll_view']}</strong>)</a>
                                                                       <else />
                                                                               <span class='votes'> ({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%])</span>
                                                                       </if>

                                                                       <if test="votersJs:|:$poll['poll_view_voters'] AND is_array( $choiceData['voters'] ) AND $this->settings['poll_allow_public'] AND $choiceData['votes']">
                                                                               <script type='text/javascript'>
                                                                                       $('l_voters_{$questionID}_{$choiceID}').observe('click', ipb.topic.showVoters.bindAsEventListener( this, {$questionID}, {$choiceID} ) );
                                                                                       if( Object.isUndefined( ipb.topic.poll[ $questionID ] ) ){
                                                                                               ipb.topic.poll[ $questionID ] = [];
                                                                                       }

                                                                                       var users = "";

                                                                                       <foreach loop="poll_voters:$choiceData['voters'] as $id => $member">
                                                                                               users += "<a href='{parse url="showuser={$member['member_id']}" base="public" seotitle="{$member['members_seo_name']}" template="showuser"}'>{$member['members_colored_name']}</a> {parse template="user_popup" group="global" params="$member['member_id'],$member['members_seo_name']"}<if test="lastVoter:|:$member['_last'] == 0">, </if>";
                                                                                       </foreach>
                                                                                       ipb.topic.poll[ $questionID ][ $choiceID ] = { name: "{$choiceData['choice']}", users: users};
                                                                               </script>
                                                                       </if>
                                                                       <p class='progress_bar topic_poll' title='{$this->lang->words['poll_percent_of_vote']} {$choiceData['percent']}%'>
                                                                               <span style='width: {$choiceData['percent']}%'><span>{$this->lang->words['poll_percent_of_vote']} {$choiceData['percent']}%</span></span>
                                                                       </p>
                                                                       </if> 
                                                               </li>
                                                       <else />
                                                               <if test="multiVote:|:$choiceData['type'] == 'multi'">
                                                                       <li><input type='checkbox' id='choice_{$questionID}_{$choiceID}' name='choice_{$questionID}_{$choiceID}' value='1' class='input_check' /> <label for='choice_{$questionID}_{$choiceID}'>{$choiceData['choice']}</label></li>
                                                               <else />
                                                                       <li><input type='radio' name='choice[{$questionID}]' id='choice_{$questionID}_{$choiceID}' class='input_radio' value='{$choiceID}' /> <label for='choice_{$questionID}_{$choiceID}'>{$choiceData['choice']}</label></li>
                                                               </if>
                                                       </if>
                                               </foreach>
                                       </ol>
                               </if>
                       </div>
                       <script type='text/javascript'>
                               Debug.dir( ipb.topic.poll );
                       </script>
               </foreach>
               <fieldset class='submit'>
                       <legend>{$this->lang->words['poll_vote']}</legend>
                       <if test="voteButton:|:$topicData['state'] != 'closed' AND $forumData['status']">
                               <if test="voteButtonMid:|:$this->memberData['member_id']">
                                       <if test="voteButtonVoted:|:$poll['_memberVoted']">
                                               <if test="deleteVote:|:$this->settings['poll_allow_vdelete'] OR $this->memberData['g_is_supmod']">
                                                       <a href='{parse url="app=forums&module=extras&section=vote&t={$topicData['tid']}&st={$this->request['st']}&do=delete&secure_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['poll_delete_vote']}' id='poll_deletevote' class='input_submit alt'>{$this->lang->words['poll_delete_vote']}</a>
                                               <else />
                                                       {$this->lang->words['poll_you_voted']}
                                               </if>
                                       <else />
                                               <if test="youCreatedPoll:|$poll['starter_id'] == $this->memberData['member_id']) and ($this->settings['allow_creator_vote'] != 1)">
                                                       {$this->lang->words['poll_you_created']}
                                               <else />
                                                       <!-- VOTE Button -->
                                                       <if test="cast:|:$this->request['mode'] != 'show'">
                                                               <input class='input_submit' type="submit" name="submit" value="{$this->lang->words['poll_add_vote']}" title="{$this->lang->words['tt_poll_vote']}" />
                                                       </if>
                                                       <!-- SHOW Button -->
                                                       <if test="displayVotes:|:$this->settings['allow_result_view'] == 1">
                                                               <if test="alreadyDisplayVotes:|:$this->request['mode'] == 'show'">
                                                                       <if test="viewVotersLink:|:! $poll_view_voters">
                                                                               <a href='{parse url="showtopic={$topicData['tid']}&st={$this->request['st']}" base="public" seotitle="{$topicData['title_seo']}" template="showtopic"}' title='{$this->lang->words['tt_poll_svote']}' id='poll_nullvote' class='input_submit alt'>{$this->lang->words['pl_show_vote']}</a>
                                                                       </if>
                                                               <else />
                                                                       <a href='{parse url="showtopic={$topicData['tid']}&mode=show&st={$this->request['st']}" base="public" seotitle="{$topicData['title_seo']}" template="showtopic"}' title='{$this->lang->words['tt_poll_show']}' id='poll_showresults' class='input_submit alt'>{$this->lang->words['pl_show_results']}</a>
                                                               </if>
                                                       <else />
                                                               <input class='input_submit' type="submit" name="nullvote" value="{$this->lang->words['poll_null_vote']}" title="{$this->lang->words['tt_poll_null']}" />
                                                       </if>
                                               </if>
                                       </if>
                               <else />
                                       {$this->lang->words['poll_no_guests']}
                               </if>
                       </if>
                       <if test="editPoll:|:$editPoll">
                               <a href='{parse url="app=forums&module=post&section=post&do=edit_post&f={$poll['forum_id']}&t={$poll['tid']}&p={$topicData['topic_firstpost']}" base="publicWithApp"}' title='{$this->lang->words['poll_edit']}' class='input_submit alt' >{parse replacement="edit_post_icon"} {$this->lang->words['poll_edit']}</a>
                       </if>
               </fieldset>
       </form>
</div>

Edytowane przez groverr

Brak sygnatury

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.