{RESOLVED} Move poll below the topic / thread

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
JohnnyBigSpuds
Registered User
Posts: 109
Joined: Tue Apr 22, 2014 5:49 pm

{RESOLVED} Move poll below the topic / thread

Post by JohnnyBigSpuds » Sat Dec 23, 2017 10:04 pm

Greetings,

Board running 3.2.1
how do you move the poll location from the top of a thread / topic to below it?
As id rather people read the topic and got educated prior to voting.
any help apprieciated
Last edited by JohnnyBigSpuds on Tue Dec 26, 2017 7:23 am, edited 1 time in total.

User avatar
Galandas
Registered User
Posts: 731
Joined: Thu Jul 23, 2009 4:11 pm
Location: Italy
Name: Rey
Contact:

Re: Move poll below the topic / thread

Post by Galandas » Mon Dec 25, 2017 10:37 am

you should edit the file that is in the template, viewtopic_body.html, if I remember good.
English is not my native language My CDB Contributions My RC extensions

User avatar
Sniper_E
Registered User
Posts: 728
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: Move poll below the topic / thread

Post by Sniper_E » Mon Dec 25, 2017 5:45 pm

Look for this section of the codes in the viewtopic_body.html - Highlight all of it, right click and choose Cut

Code: Select all

<!-- EVENT viewtopic_body_poll_before -->

<!-- IF S_HAS_POLL -->
	<form method="post" action="{S_POLL_ACTION}" data-ajax="vote_poll" class="topic_poll">

	<div class="panel">
		<div class="inner">

		<div class="content">
			<h2 class="poll-title"><!-- EVENT viewtopic_body_poll_question_prepend -->{POLL_QUESTION}<!-- EVENT viewtopic_body_poll_question_append --></h2>
			<p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE --><span class="poll_max_votes">{L_MAX_VOTES}</span><!-- ENDIF --></p>

			<fieldset class="polls">
			<!-- BEGIN poll_option -->
				<!-- EVENT viewtopic_body_poll_option_before -->
				<dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-alt-text="{L_POLL_VOTED_OPTION}" data-poll-option-id="{poll_option.POLL_OPTION_ID}">
					<dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
					<!-- IF S_CAN_VOTE --><dd style="width: auto;" class="poll_option_select"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
					<dd class="resultbar<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT_REL};">{poll_option.POLL_OPTION_RESULT}</div></dd>
					<dd class="poll_option_percent<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd>
				</dl>
				<!-- EVENT viewtopic_body_poll_option_after -->
			<!-- END poll_option -->

				<dl class="poll_total_votes<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->">
					<dt>&nbsp;</dt>
					<dd class="resultbar">{L_TOTAL_VOTES}{L_COLON} <span class="poll_total_vote_cnt">{TOTAL_VOTES}</span></dd>
				</dl>

			<!-- IF S_CAN_VOTE -->
				<dl style="border-top: none;" class="poll_vote">
					<dt>&nbsp;</dt>
					<dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
				</dl>
			<!-- ENDIF -->

			<!-- IF not S_DISPLAY_RESULTS -->
				<dl style="border-top: none;" class="poll_view_results">
					<dt>&nbsp;</dt>
					<dd class="resultbar"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></dd>
				</dl>
			<!-- ENDIF -->
			</fieldset>
			<div class="vote-submitted hidden">{L_VOTE_SUBMITTED}</div>
		</div>

		</div>
		{S_FORM_TOKEN}
		{S_HIDDEN_FIELDS}
	</div>

	</form>
	<hr />
<!-- ENDIF -->

<!-- EVENT viewtopic_body_poll_after -->
Then Paste it back in down the page after <!-- END postrow -->
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

JohnnyBigSpuds
Registered User
Posts: 109
Joined: Tue Apr 22, 2014 5:49 pm

Re: Move poll below the topic / thread

Post by JohnnyBigSpuds » Tue Dec 26, 2017 7:22 am

Sniper_E wrote:
Mon Dec 25, 2017 5:45 pm
Look for this section of the codes in the viewtopic_body.html - Highlight all of it, right click and choose Cut

Code: Select all

<!-- EVENT viewtopic_body_poll_before -->

<!-- IF S_HAS_POLL -->
	<form method="post" action="{S_POLL_ACTION}" data-ajax="vote_poll" class="topic_poll">

	<div class="panel">
		<div class="inner">

		<div class="content">
			<h2 class="poll-title"><!-- EVENT viewtopic_body_poll_question_prepend -->{POLL_QUESTION}<!-- EVENT viewtopic_body_poll_question_append --></h2>
			<p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE --><span class="poll_max_votes">{L_MAX_VOTES}</span><!-- ENDIF --></p>

			<fieldset class="polls">
			<!-- BEGIN poll_option -->
				<!-- EVENT viewtopic_body_poll_option_before -->
				<dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-alt-text="{L_POLL_VOTED_OPTION}" data-poll-option-id="{poll_option.POLL_OPTION_ID}">
					<dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
					<!-- IF S_CAN_VOTE --><dd style="width: auto;" class="poll_option_select"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
					<dd class="resultbar<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT_REL};">{poll_option.POLL_OPTION_RESULT}</div></dd>
					<dd class="poll_option_percent<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd>
				</dl>
				<!-- EVENT viewtopic_body_poll_option_after -->
			<!-- END poll_option -->

				<dl class="poll_total_votes<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->">
					<dt>&nbsp;</dt>
					<dd class="resultbar">{L_TOTAL_VOTES}{L_COLON} <span class="poll_total_vote_cnt">{TOTAL_VOTES}</span></dd>
				</dl>

			<!-- IF S_CAN_VOTE -->
				<dl style="border-top: none;" class="poll_vote">
					<dt>&nbsp;</dt>
					<dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
				</dl>
			<!-- ENDIF -->

			<!-- IF not S_DISPLAY_RESULTS -->
				<dl style="border-top: none;" class="poll_view_results">
					<dt>&nbsp;</dt>
					<dd class="resultbar"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></dd>
				</dl>
			<!-- ENDIF -->
			</fieldset>
			<div class="vote-submitted hidden">{L_VOTE_SUBMITTED}</div>
		</div>

		</div>
		{S_FORM_TOKEN}
		{S_HIDDEN_FIELDS}
	</div>

	</form>
	<hr />
<!-- ENDIF -->

<!-- EVENT viewtopic_body_poll_after -->
Then Paste it back in down the page after <!-- END postrow -->
That is exactly what i needed and has done exactly what i needed it to do.
Many thanks for your assistance.
Have a fantastic new year

Post Reply

Return to “[3.2.x] Styles Support & Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests