Page 1 of 1

Poll Manager, how does the mechanism published/unpublished flag works?

Posted: Tue Sep 04, 2007 4:52 pm
by linpi
hi,
i writing my first component taking com_poll as a example. In my admin interface (like the Poll Manager), I would like to modify a flag in the same way as the published/unpublished flag. I could see in the two files admin.poll.html.php and  admin.poll.php that this mechanism uses the javascript "listItemTask" and an array called "cid". After having clicked published/unpublished, this  array cid should be in a php Variable _REQUEST["cid"] and _POST["cid"]. In my component, either there is no php variable _REQUEST["cid"] or when it is there, the array has allways the value 0 instead the row number (id). What needs to be done, that this variable cid is transfered from admin.poll.html.php to admin.poll.php?
I'm using Joomla 1.0.13.
Thank you for some help, Pierre

Re: Poll Manager, how does the mechanism published/unpublished flag works?

Posted: Tue Sep 04, 2007 4:58 pm
by matthewhayashida
MOD NOTE: Moving to Joombie Q/A

Re: Poll Manager, how does the mechanism published/unpublished flag works?

Posted: Tue Sep 04, 2007 7:42 pm
by ianmac
Take a look at:

http://dev.joomla.org/component/option, ... published/

let me know if you have further questions.

Ian

Re: Poll Manager, how does the mechanism published/unpublished flag works?

Posted: Tue Sep 04, 2007 8:02 pm
by linpi
ianmac wrote:Take a look at:

http://dev.joomla.org/component/option, ... published/

let me know if you have further questions.

Ian


Thank your for this great link!
Meanwhile I found the mistake I made. in admin.poll.html.php, the is the line
$checked = mosCommonHTML::CheckedOutProcessing( $row, $i );
and in the function CheckedOutProcessing there is $row->id. This didn't work for me because I didn't have a table field id.
thank you again, pierre

Re: Poll Manager, how does the mechanism published/unpublished flag works?

Posted: Tue Sep 04, 2007 8:13 pm
by ianmac
I gather you're writing for Joomla! 1.0 then, since you have mosCommonHTML.  The link above that I gave you is not applicable.  sorry about that.

Ian