Center Poll Question

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked

Topic author
Sharky
Active Member
Posts: 25
Joined: 16. July 2008 06:43

Center Poll Question

Post by Sharky »

On my portal, the question for the poll is aligned left & not centered as I would like. I had a quick look through block/poll.php but couldn't make it out.
Any change that can be made to center the poll question?

Thanks.
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Center Poll Question

Post by Kevin »

poll.php is the wrong file - that would be changed in the \template\portal\block\poll.html.

First of all: what Style? Prosilver or subsilver2?
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Heinrich-XIV
Tester
Posts: 233
Joined: 16. May 2008 18:39
phpBB.de User: Heinze 1906
phpBB.com User: Heinrich-XIV
Location: 52353 Düren

Re: Center Poll Question

Post by Heinrich-XIV »

Hello

Open your Style/template/portal/blocks/poll.html

For subsilver based Styles:

Find:

Code: Select all

<span class="gen"><b>{poll.POLL_QUESTION}</b></span><br />
Replace with:

Code: Select all

<center><span class="gen"><b>{poll.POLL_QUESTION}</b></span></center><br />


For prosilver based Styles:

Find:

Code: Select all

<h2>{poll.POLL_QUESTION}</h2>
replace with:

Code: Select all

<h2 align="center">{poll.POLL_QUESTION}</h2>

MfG

Heinrich
No more Heroes -=- The Stranglers

Beat the Bastards -=- The Exploited
[/size]

Topic author
Sharky
Active Member
Posts: 25
Joined: 16. July 2008 06:43

Re: Center Poll Question

Post by Sharky »

Thanks for the help, I didn't think to look in the template :oops: I'm using SS2.

Topic author
Sharky
Active Member
Posts: 25
Joined: 16. July 2008 06:43

Re: Center Poll Question

Post by Sharky »

Is there a fix for this;

Fine in Firefox;
Image

Not so good in IE7;
Image

Any ideas :?:
User avatar

Heinrich-XIV
Tester
Posts: 233
Joined: 16. May 2008 18:39
phpBB.de User: Heinze 1906
phpBB.com User: Heinrich-XIV
Location: 52353 Düren

Re: Center Poll Question

Post by Heinrich-XIV »

Hello Its me again. :mrgreen:

Its this , what you want?:

Image


The Block Code:

Code: Select all

<!--version $Id: poll.html 216 2008-04-29 07:23:22Z kevin74 $ //-->
<table class="tablebg" cellspacing="1" width="100%">
	<tr>
		<th>{L_LATEST_POLLS}</th>
	</tr>
	<tr class="row1" align="left">
		<td>
		<!-- IF S_HAS_POLL -->
		<!-- BEGIN poll -->
			<!-- IF poll.S_CAN_VOTE --><form method="post" action="{poll.S_POLL_ACTION}"><!-- ENDIF -->

			<table class="tablebg" cellspacing="1" cellpadding="10" border="0" align="center" width="100%">
				<tr>
					<td class="cat">
						<center><span class="gen"><b>{poll.POLL_QUESTION}</b></span><br /><span class="gensmall">{poll.L_POLL_LENGTH}</span></center>
					</td>
				</tr>
				<!-- IF poll.S_POLL_HAS_OPTIONS -->
				<tr>	
					<td class="row1" align="left">
						<table cellspacing="0" cellpadding="10" border="0">
						<!-- BEGIN poll_option -->
							<tr>
							<!-- IF poll.S_CAN_VOTE -->
								<td>
									<!-- IF poll.S_IS_MULTI_CHOICE -->
										<input type="checkbox" class="radio" name="vote_id[]" value="{poll.poll_option.POLL_OPTION_ID}"&nbsp;<!-- IF poll.poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
									<!-- ELSE -->
										<input type="radio" class="radio" name="vote_id[]" value="{poll.poll_option.POLL_OPTION_ID}"&nbsp;<!-- IF poll.poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> />
									<!-- ENDIF -->
								</td>
							<!-- ENDIF -->
								<td><span class="gen" align="left">{poll.poll_option.POLL_OPTION_CAPTION}</span></td>
								<!-- IF poll.S_DISPLAY_RESULTS -->
									<td dir="ltr">{POLL_LEFT_CAP_IMG}{poll.poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG}</td>
									<td class="gen" align="{S_CONTENT_FLOW_END}"><b>&nbsp;{poll.poll_option.POLL_OPTION_PERCENT}&nbsp;</b></td>
									<td class="gen" align="left">[ {poll.poll_option.POLL_OPTION_RESULT} ]</td>
									<!-- IF poll.poll_option.POLL_OPTION_VOTED -->
										<td class="gensmall" valign="top"><b title="{L_POLL_VOTED_OPTION}">x</b></td>
									<!-- ENDIF -->
								<!-- ENDIF -->
							</tr>
						<!-- END poll_option -->
						</table>
					</td>
				</tr>
				<!-- ELSE -->
				<tr>
					<td class="row1" align="center">
						{L_NO_OPTIONS}
					</td>
				</tr>
				<!-- ENDIF -->
			<!-- IF poll.S_CAN_VOTE -->
				<tr>
					<td class="row1" align="center"><span class="gensmall">{poll.L_MAX_VOTES}</span><br /><br /><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="btnlite" /></td>
				</tr>
			<!-- ENDIF -->
			<!-- IF poll.S_DISPLAY_RESULTS -->
				<tr>
					<td class="row1" colspan="4" align="center"><span class="gensmall"><b>{L_TOTAL_VOTES} : {poll.TOTAL_VOTES}</b> <b><a href="{poll.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a></b></span></td>
				</tr>
			<!-- ELSE -->
				<tr>
					<td class="row1" align="center"><span class="gensmall"><b><a href="{poll.U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></b> <b><a href="{poll.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a></b></span></td>
				</tr>
			<!-- ENDIF -->
				</table>
				<!-- IF poll.S_CAN_VOTE -->{S_HIDDEN_FIELDS}
				
				</form><!-- ENDIF -->
		<!-- END poll -->
		<!-- ELSE -->
			<table class="tablebg" cellspacing="1" width="100%">
				<tr>
					<td class="row1">
						<strong>{L_NO_POLL}</strong>
					</td>
				</tr>
			</table>
		<!-- ENDIF -->
		</td>
	</tr>
</table>
<br />
Please purge the Cache after editing is complete.

Well, when I must read again, this will not work, I take the next Rocket to Russia. :P


MfG

Heinrich
No more Heroes -=- The Stranglers

Beat the Bastards -=- The Exploited
[/size]
Locked

Return to “board3 Portal 1.0.x - English Support”