DB values for Album
Posted: Sun Nov 09, 2008 9:10 pm
Hello... I have to add a bunch of features to the Album mod that I was going to share since ?? no one seems to be manning that anymore?? anyways all has been going well but this part here.... I added active state to the albums and to pictures... so...
based on this which was in the code..
$picture->name = $dbpicture->name;
$picture->changecommentlink = $this->CreateLink($id, 'changecomment', $returnid, $this->DisplayImage('blank.gif',$this->lang('changecomment'),$this->lang('changecomment'),'systemicon'), array('pictureid' => $dbpicture->id));
I figured that it was calling the value from the db so I'd mimic it... and i did this
$picture->state = $dbpicture->active;
if ($picture->state = '0')
$picture->changeActiveLink = $this->CreateLink($id, 'changeactive', $returnid, $themeObject->DisplayImage('blank.gif', $this->Lang('changeactive'),'','','NOTac'), array('pictureid' => $dbpicture->id, 'active'=>'1'));
if ($picture->state = '1')
$picture->changeActiveLink = $this->CreateLink($id, 'changeactive', $returnid, $themeObject->DisplayImage('blank.gif', $this->Lang('changeactive'),'','','ac'), array('pictureid' => $dbpicture->id, 'active'=>'0'));
but no luck... the links show up.... and all is good that way but it's not reading the db so it's well not working lol... anyone know why....?
thanks for the help...
cheers
jeremyBass
based on this which was in the code..
$picture->name = $dbpicture->name;
$picture->changecommentlink = $this->CreateLink($id, 'changecomment', $returnid, $this->DisplayImage('blank.gif',$this->lang('changecomment'),$this->lang('changecomment'),'systemicon'), array('pictureid' => $dbpicture->id));
I figured that it was calling the value from the db so I'd mimic it... and i did this
$picture->state = $dbpicture->active;
if ($picture->state = '0')
$picture->changeActiveLink = $this->CreateLink($id, 'changeactive', $returnid, $themeObject->DisplayImage('blank.gif', $this->Lang('changeactive'),'','','NOTac'), array('pictureid' => $dbpicture->id, 'active'=>'1'));
if ($picture->state = '1')
$picture->changeActiveLink = $this->CreateLink($id, 'changeactive', $returnid, $themeObject->DisplayImage('blank.gif', $this->Lang('changeactive'),'','','ac'), array('pictureid' => $dbpicture->id, 'active'=>'0'));
but no luck... the links show up.... and all is good that way but it's not reading the db so it's well not working lol... anyone know why....?
thanks for the help...
cheers
jeremyBass