PDA

View Full Version : How do I add code to other templates.


rex_b
01-10-2005, 06:06 PM
I want to add the poll block code to another template in my forum but when I do that nothing shows up. How would one do this?

<!-- Poll Block -->

<if condition="$vboptions['pollsforum'] AND $pollinfo['pollid']">
<if condition="$showresults != 1 AND $uservoted != 1">

<form action="$vboptions[bburl]/poll.php" method="post">
<input name="s" type="hidden" value="$session[dbsessionhash]" />
<input name="do" type="hidden" value="pollvote" />
<input name="pollid" type="hidden" value="$pollinfo[pollid]" />

</if>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>


<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet] $vbphrase[a_poll] <if condition="$showresults OR $uservoted">$vbphrase[a_results]</if></b></span></td>
</tr>
<tr>
<td class="alt1"><span class="smallfont">
$pollinfo[question]</span></td></tr>
<tr>
<td class="alt2">

<table width="100%">
$pollbits
</table>

</td>
</tr>
<tr>
<td align="$stylevar[left]" class="alt1">
<if condition="$showresults OR $uservoted">
<span class="smallfont"><b>$vbphrase[a_total_votes]: $pollinfo[numbervotes]</b><br /><if condition="$showresults">$vbphrase[a_this_poll_is_closed].</if><if condition="$uservoted">$vbphrase[a_you_have_already_voted_on_this_poll].</if></span>

<else />

<input class="bginput" name="button" type="submit" value="$vbphrase[vote_now]" />
</if>

</td>
</tr>

<tr>
<td class="alt2"><span class="smallfont">&raquo; <a href="$vboptions[bburl]/poll.php?$session[sessionurl]do=showresults&amp;pollid=$pollinfo[pollid]">$vbphrase[a_view_results]</a><br />

<if condition="$vboptions['showpolldiscuss']">
&raquo; <a href="$vboptions[bburl]/newreply.php?$session[sessionurl]t=$pollinfo[threadid]">$vbphrase[a_discuss_this_poll]</a><br />
&raquo; <a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$pollinfo[threadid]">$vbphrase[a_this_poll_has] $pollinfo[replycount] <if condition="$pollinfo['replycount'] == 1">$vbphrase[a_reply]<else />$vbphrase[a_replies]</if></a></if>

<if condition="$bbuserinfo['usergroupid'] == 6"><br />&raquo; <a href="$vboptions[bburl]/poll.php?$session[sessionurl]do=polledit&amp;pollid=$pollinfo[pollid]">$vbphrase[a_edit_this_poll]</a></if></span></td>
</tr>

</table>
<if condition="$showresults != 1 AND $uservoted != 1">

</form>
<else />

<br />

</if>

</if>

<!-- End Poll Block -->

Brian
01-10-2005, 06:41 PM
Why exactly are you trying to add the poll in another template?

Our Sponsors
 

rex_b
01-10-2005, 08:00 PM
Well I want to be able to add some of the blocks to my Adcolumns Hack that I have installed.

Brian
01-10-2005, 08:24 PM
You can't just copy the template. You either need to add the code from the module to your hack, or integrate the CMPS with that hack (there are instructions on how to do that in the user's manual).