JHTML::_('grid.published',....)

Your code modifications and patches you want to share with others.
Locked
welcome
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Nov 24, 2008 3:54 am

JHTML::_('grid.published',....)

Post by welcome » Tue Feb 17, 2009 1:13 am

Hi, everyone.

I am customizing Letterman component for J1.5. I don't know whether confirmed icon in subscriber list works in J1.0 version letterman component, but in J1.5 it doesn't work.
I hope the confirmed status of subscriber list would change when I click on one, but it is not changing at all.

So I decided to change the source code a bit.

Here is what I have added.

Code: Select all

foreach( $rows as $row )
{
$i++
...
$row->published = $row->confirmed;
$published		= JHTML::_('grid.published', $row, $i );
echo $published;
...
}
I thought it would work, but the problem is even though the confirm icon varies depending on confirm status, but still doesn't have any effect when clicking on confirm icon.

So now I am wondering, when I write JHTML::_('grid.published',...);, should I write some other code?

Hope you understand me.

Regards, John.

hridayz
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Thu Mar 25, 2010 9:12 am
Location: Kathmandu
Contact:

Re: JHTML::_('grid.published',....)

Post by hridayz » Mon Mar 29, 2010 5:19 am

jimport('joomla.filter.output');
$k = 0;
for ($i=0, $n=count( $rows ); $i < $n; $i++)
{
$published = JHTML::_('grid.published', $row, $i );
$published;
}
I used this sort of scripts, for displaying the published items, though it displayed the status of the contents but that doesnot work for the changing the status of the from published to unpublished and unpublished to published.
anybody could help me??
thx in advance.
Hridayz'

hridayz
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Thu Mar 25, 2010 9:12 am
Location: Kathmandu
Contact:

Re: JHTML::_('grid.published',....)

Post by hridayz » Fri Apr 09, 2010 6:53 am

its been solved.. no worry dudes.. cheers !!!
Hridayz'

hridayz
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Thu Mar 25, 2010 9:12 am
Location: Kathmandu
Contact:

Re: JHTML::_('grid.published',....)

Post by hridayz » Fri Apr 09, 2010 6:55 am

Hi @welcome i forgot to make the function to be used with it..
may you to have the same problems. where i used this code..
============================================
function publish()
{
global $option;

$cid = JRequest::getVar( 'cid', array(), '', 'array' );

if( $this->_task == 'publish')
{
$publish = 1;
}
else
{
$publish = 0;
}

$reviewTable =& JTable::getInstance('reservation', 'Table');
$reviewTable->publish($cid, $publish);
$this->setRedirect( 'index.php?option=' . $option);
}
==========================================
Hridayz'


Locked

Return to “Core Hacks and Patches”