DB values for Album

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
JeremyBASS

DB values for Album

Post by JeremyBASS »

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
Last edited by JeremyBASS on Mon Nov 10, 2008 4:40 am, edited 1 time in total.
JeremyBASS

Re: DB values for Album

Post by JeremyBASS »

>>>>does the function 'changeActiveLink' exist in the $picture object?
yeah the link shows up....

>>>>What do you mean it's not reading the DB?

I was try to have a statement that said if in the db the photo has active 1 the use this buttom else if in the db  the photo has active 0 the use this button...

but I can't seem to get that to go... not sure on why thou... and just so I said it the rows are in the db already

>>>>Can you explain more what you're trying to do?

basicly I'm rwwrite in a bounch of new thing for the Ablum mod... things like a print picture to go with the "diplay" img and thumb that is in there already, along with active state of the photos and ablums... I have done already the gui for all of this... now it's just hooking functions up to make it all work...

:) fun stuff ...

thanks for the help

Jeremy
Post Reply

Return to “Developers Discussion”