• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Implement Poll Script

Blatchy

Active member
#1
I was was wondering if someone could help implement a script I want to use (poll). Yeah I know I can use the default one in the sidebar.

The script is asking me to put this in the header, at least above /head

<?php
$relative_path='';
require_once($relative_path.'includes/pollfns.php');
includeScripts();
?>

And in the body (in my case using the sidebar widget) This goes where you want the poll to show.

<?php
newPoll('pollname');
?>

I tried using a callback but I couldnt get it working using these as guidelines

Header: http://xenforo.com/community/threads/creating-a-page.5714/page-2#post-90582
Widget: http://xenforo.com/community/threads/bd-widget-framework.28014/page-47#post-507000

Any suggestions?
 

Tracy Perry

Well-known member
#3
Since it's calling a php related file - I don't think you are going to be able to simply put it in a template. You will probably have to develop an add-on for it or hack the appropriate xenforo php file... and you will lose it next time you upgrade and have to do it again.