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

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
User avatar
linpi
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Sep 23, 2006 6:35 am
Location: Berlin
Contact:

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

Post by linpi » Tue Sep 04, 2007 4:52 pm

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
Last edited by linpi on Tue Sep 04, 2007 5:16 pm, edited 1 time in total.

User avatar
matthewhayashida
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Sat Feb 10, 2007 8:26 pm
Location: Abbotsford, BC
Contact:

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

Post by matthewhayashida » Tue Sep 04, 2007 4:58 pm

MOD NOTE: Moving to Joombie Q/A
-Matt Hayashida

User avatar
ianmac
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 237
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

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

Post by ianmac » Tue Sep 04, 2007 7:42 pm

Take a look at:

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

let me know if you have further questions.

Ian
Help test my Component XML Generator Tool!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!

User avatar
linpi
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Sep 23, 2006 6:35 am
Location: Berlin
Contact:

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

Post by linpi » Tue Sep 04, 2007 8:02 pm

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

User avatar
ianmac
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 237
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

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

Post by ianmac » Tue Sep 04, 2007 8:13 pm

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
Help test my Component XML Generator Tool!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!


Post Reply