Page 1 of 1

Center Poll Question

Posted: 18. July 2008 17:08
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.

Re: Center Poll Question

Posted: 18. July 2008 18:22
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?

Re: Center Poll Question

Posted: 18. July 2008 18:31
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

Re: Center Poll Question

Posted: 19. July 2008 01:59
by Sharky
Thanks for the help, I didn't think to look in the template :oops: I'm using SS2.

Re: Center Poll Question

Posted: 21. July 2008 10:43
by Sharky
Is there a fix for this;

Fine in Firefox;
Image

Not so good in IE7;
Image

Any ideas :?:

Re: Center Poll Question

Posted: 21. July 2008 16:10
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