chi: thanks for your suggestions but I am not that good at PHP so that I can make a whole plugin for myself(I can try though).
chi wrote
As far as I can see from the source code of the poll plugin the plugin doesn`t check the users permissions for the page the poll is in. So the poll vote button should be visible to everybody.
Oh no, I don't want to check users permission with the poll plugin itself. Ok, let me explain it step by step.
First, I need a section poll, so I have added the poll with the p_render in the $secedit variable in the inc/html.php file which looks something like this now:
#FIXME: $hid for heading id
$test = p_render('xhtml',p_get_instructions('<poll '.$hid.'>This is a test isn\'t it??? * Yes * No</poll>'),$info);
$secedit .= $test;
Now the first problem is if the user doesn't have Edit permission in the page then the secedit button is gone and so is the poll which I embeded in the same section edit button, but I need the poll to appear even when the section edit button is not there or the user doesn't have edit permissions. In other words I need something like the section edit button but with a different approach and a different function.
Now my second problem is with the poll plugin. Poll plugin uses the name given to the poll to determine the poll something like this:
<poll testname>
This is a test poll.
* Test 1
* Test2
</poll>
Now I need to section poll to be unique in each section(that's why I need the heading name for the name of the poll). But unfotunately I cannot figure out how to get the heading name.:(
Now, I hope you have the idea what I am trying to do.
Thanks,
Shachi.