Adjusting Prosilver Poll to look like Subsilver Poll

Styles, Theme, Cosmetic and Appearance related tips, tricks, tweaks, and Graphics

Moderator: STG Styles Team

Forum rules
NOTE: Post full styles only in the Styles Forum

Adjusting Prosilver Poll to look like Subsilver Poll

Postby CityState » 12 Mar 2010, 08:12

Hi guys!

This is my first submitted MOD. So be kind. :grin:

If you have a cleaner code or a better suggestion on how to rewrite this, I would be most willing to incorporate it.

This is to make Prosilver Poll look like the poll used by STG... Almost though... :)

Mod takes 5mins to complete.

* Make sure you have a back up of your original file before performing the mod.
1. Go to Prosilver/template/viewtopic_body.html
2. Find this code:
<div class="clear"></div>

<!-- IF S_HAS_POLL -->

3. Having
    <!-- IF S_HAS_POLL -->
as your starting point,

Rewrite / Overlap the whole code underneath it like this:
<!-- IF S_HAS_POLL -->
<form method="post" action="{S_POLL_ACTION}">

<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>

<center><div class="content">
<FONT SIZE=2><strong><center><h2>{POLL_QUESTION}</h2></center></strong></FONT>
<fieldset class="polls">

<!-- BEGIN poll_option -->
<!-- Adjusts the whole poll block -->
<dl style="width: 500px;">

<!-- Adjusts the space margin before the poll option -->
<dt style="text-align: center; width: 25px;" class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF -->></dt>

<!-- Adjusts the poll option space -->
<dt style="text-align: left; width: 265px;"><!-- 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>

<!-- Adjusts the checkbox space -->
<!-- IF S_CAN_VOTE --><dd style="width: 15px;"><!-- 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 -->

<!-- Adjusts the resultbar space -->
<!-- IF S_DISPLAY_RESULTS --><dd style="text-align: left; width: 115px;" class="resultbar"><div style="min-width: 5px;" 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};">{poll_option.POLL_OPTION_RESULT}</div></dd>

<!-- Adjusts the percentage space -->
<dd style="text-align: right; width: 50px;"><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd><!-- ENDIF -->
<!-- END poll_option -->

<br /><br />
<!-- Adjusts the permission vote button and total votes -->
<div style="text-align: center;">
<strong><div class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE -->{L_MAX_VOTES}<!-- ENDIF --></div></strong><br />
<!-- IF S_CAN_VOTE --><div style="border-top: none;" class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></div><!-- ENDIF -->
<br />
<FONT SIZE=2><strong>
<!-- IF S_DISPLAY_RESULTS --><div class="resultbar">{L_TOTAL_VOTES} : {TOTAL_VOTES}</div><!-- ENDIF -->
<!-- IF not S_DISPLAY_RESULTS --><div class="resultbar"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></div><!-- ENDIF -->

<span class="corners-bottom"><span></span></span></div>

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

Then upload your viewtopic_body.html file.

Note: You can edit bar and letter colors in the colour.css file.


I just need to learn how to use images instead of the color bar. Will post here one I have updates.
This is what it should look like.
Lt. Jr Grade
Lt. Jr Grade
Posts: 125
Joined: 11 Aug 2007, 11:48
Gender: Male

Return to Styles Tweaks, Tips and Graphics

Who is online

Users browsing this forum: No registered users and 1 guest