The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
5 posters

    How can change the Poll Widget Code like this?

    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved How can change the Poll Widget Code like this?

    Post by Van-Helsing Wed 10 Sep - 7:26

    Hello,
    How can I change the Poll widget like this http://prntscr.com/4lf50p ?


    Last edited by Black-Shadow on Sat 11 Oct - 11:33; edited 3 times in total
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    Solved Re: How can change the Poll Widget Code like this?

    Post by SLGray Wed 10 Sep - 7:31

    Do a search for poll codes for widgets and create a customized widget.



    How can change the Poll Widget Code like this? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Wed 10 Sep - 7:51

    Hi SLGray,
    I have search for it but I didn't find something similar, I have a similar code in templates for the poll posts but and I have try to adapt it on widget but its not working correctly. I must modify the portal templates poll_ballot and poll_result but I don't know how can I do this.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: How can change the Poll Widget Code like this?

    Post by Ange Tuteur Wed 10 Sep - 15:44

    I don't know about that widget, but I know you can show the results by the title attribute. Some CSS for phpbb3 :
    Code:
    .module td[title*="%"]:after { content:attr(title) }
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Wed 10 Sep - 23:38

    Hello Ange,
    I need to modify the portal templates for the widget to be the same with poll posts. My forum version is PunBB.
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sat 13 Sep - 22:22

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sun 14 Sep - 22:23

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Mon 15 Sep - 22:36

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Tue 16 Sep - 22:40

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Thu 18 Sep - 8:37

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Fri 19 Sep - 15:33

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sun 21 Sep - 9:43

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sat 27 Sep - 21:09

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sun 28 Sep - 22:41

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Mon 29 Sep - 23:46

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Thu 2 Oct - 22:00

    Bump
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Fri 3 Oct - 22:13

    Bump
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can change the Poll Widget Code like this?

    Post by _Twisted_Mods_ Sat 4 Oct - 6:51

    ok so after seeing a 1000 bumps "lol" i figured i would give this a try

    and this is what i came up with only prob is you cant make the options to long or it will mess up

    How can change the Poll Widget Code like this? Poleresults_zps5ed47e20

    just replace everything in the

    Admin panel- Display - Templates - general - viewtopic_poll_result

    with
    Code:
    <!----Created by: TheTwistedKilla---->

    <table style="width: 30%;" align="center" border="1" cellpadding="1" cellspacing="1">
     Â     
     <tbody>
     <tr>
     Â         <td>
    <div class="mainhead clearfix">
     Â  <p class="options">{CLOSE_POLL}</p>
     Â 
     Â <p class="h2"><img src="http://i884.photobucket.com/albums/ac50/TwistedKilla/Stuff/bargraph_zps7e3a1416.png" alt="Smiley face" height="42" width="42"> <strong>{POLL_QUESTION}</strong></p>
     Â        <p class="total"  align="right"><strong>Votes : {TOTAL_VOTES}</strong>
    </div>
     Â         </td></tr><td>

     
    <table>
     <tr>
     Â       <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
     Â  <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
     Â        <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
     Â 
     Â </tr>
     Â <tr>

     Â <td>{poll_option.POLL_OPTION_CAPTION}</td>
     Â   <td>{poll_option.POLL_OPTION_PERCENT}</td>
     Â   <td>[ {poll_option.POLL_OPTION_RESULT} ]</td>

     Â   </tr>
    </table>
     
     <dl>
     <dt>&nbsp;</dt>
     <dd>{L_POLL_HIDE_RESULT}</dd>
     </dl>
     
     
     <div class="frm-buttons">
     
     <!-- BEGIN cancel_vote -->
     <em><a href="{U_CANCEL_VOTE}">{L_CANCEL_VOTE}</a></em><br /><br />
     <!-- END cancel_vote -->
     </div>

     Â         </td>              
     Â 
    </tbody>
    </table>
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sat 4 Oct - 6:59

    Hello,
    Is this code for poll widget? I am asking that because you are modifing the template viewtopic_poll result. If this code is for the poll topics I have it, furthermore it has changes on the template viewtopic_poll_ballot. I need to adapt this code for the widget too.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can change the Poll Widget Code like this?

    Post by _Twisted_Mods_ Sat 4 Oct - 7:08

    do you have code for a vote widget so i can modify it
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sat 4 Oct - 17:26

    Hello,
    Here are the codes of templates:

    Template: viewtopic_poll_ballot

    Spoiler:

    Template: viewtopic_poll_result

    Spoiler:

    I think the modifications must be done in portal templates poll_ballot, mod_poll and poll_result.


    Last edited by Black-Shadow on Sun 5 Oct - 11:18; edited 1 time in total
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can change the Poll Widget Code like this?

    Post by _Twisted_Mods_ Sun 5 Oct - 1:11

    where are you planning on putting the poll ?? need know about what size its gonna be
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sun 5 Oct - 7:45

    Hello,
    I am planning to change the the format of the poll widget http://prntscr.com/4t74pk and make it the same like the poll posts like this http://prntscr.com/4t7523
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can change the Poll Widget Code like this?

    Post by _Twisted_Mods_ Sun 5 Oct - 12:35

    i know that but are you gonna put it on side of the forum  or in middle of portal or what
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can change the Poll Widget Code like this?

    Post by _Twisted_Mods_ Sun 5 Oct - 14:20

    ok man this is about as close as i can get hope works for you

    just replace everything in "poll_result" template


    with


    Code:
    <style type="text/css">
    <!--
    td { vertical-align: top; }
    .leftcolumn { max-width: 20%;}
    .centercolumn { width: 50px; }
    .rightcolumn { min-width:30%;}
    .leftcolumnb { width: 40%;}
    .centercolumnb { min-width:70px;}
    .rightcolumnb { min-width:30%;}
    .tabletoo { width:74%;}
    -->
    </style>

    <div class="mainheadclearfix">
     
     Â <p class="h2"><img src="http://i884.photobucket.com/albums/ac50/TwistedKilla/Stuff/bargraph_zps7e3a1416.png" width="40" height="40"> <strong>{POLL_QUESTION}</strong></p>
     Â   
    </div>
     Â <table class="tabletoo">
     Â   <td class="tabletoo"><p class="total"  align="right">[<strong>{TOTAL_VOTES} Vote</strong>]</p></td>
     Â         </table>
    <div class="maincontent frm">
     <fieldset class="frmset">
     <!-- BEGIN poll_option -->
     <dl>

     Â   
     <table>
    <tr>
    <th class="leftcolumnb"> </th>
    <th class="centercolumnb"> <th>
    <th class="rightcolumnb"> <th>
     Â   </tr>
     Â <tr>

     Â   <td class="leftcolumn">{poll_option.POLL_OPTION_CAPTION}</td>
     Â   <td class="centercolumn"><p align="right">{poll_option.POLL_OPTION_PERCENT}</p></td>
     Â   <td class="rightcolumn"><p align="right">[{poll_option.POLL_OPTION_RESULT}]</p></td>

     Â   </tr>
    </table>

     </dl>
     <!-- END poll_option -->
     <!-- BEGIN switch_hide_result -->
     <dl>
     <dt>&nbsp;</dt>
     <dd>{L_POLL_HIDE_RESULT}</dd>
     </dl>
     <!-- END switch_hide_result -->
     </fieldset>
     <div class="frm-buttons">
     
     <!-- BEGIN cancel_vote -->
     <em><a href="{U_CANCEL_VOTE}">{L_CANCEL_VOTE}</a></em><br /><br />
     <!-- END cancel_vote -->
     </div>
    </div>
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sun 5 Oct - 18:09

    Hello,
    What other changes must be done in the mod_poll and and poll_ballot templates?
    Its too close to the request poll widget but the buttons etc "Cancel Vote" is missing and there is a strange line in the widget http://prntscr.com/4tc6ul .
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can change the Poll Widget Code like this?

    Post by _Twisted_Mods_ Sun 5 Oct - 18:31

    the img isnt working for me but ill prob end up needing a test acct for your site to login to to mod it for ur theme
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sun 5 Oct - 18:45

    Ok I will pm you the testing account details.
    Furthermore the poll choice displayed with the old style of voting not with the black bullets http://prntscr.com/4tdltc . I am thinking and the other templates need modification.

    Here are the templates if they can help you.

    mod_poll template:
    Spoiler:

    poll_ballot template:
    Spoiler:

    poll_result template:
    Spoiler:
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: How can change the Poll Widget Code like this?

    Post by Van-Helsing Sat 11 Oct - 11:24

    Hello,
    I have been adapt the codes and made the widget.
    The problem is solved.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Solved Re: How can change the Poll Widget Code like this?

    Post by _Twisted_Mods_ Sat 11 Oct - 11:44

    sorry shadow i got caught up in stuff and forgot about helping you with the other half... glad you got it all figured out tho

      Current date/time is Wed 13 Nov - 17:44