Page 1 of 1

[SOLVED] Edit button in category view next the trash button

Posted: 22 Jul 2012, 19:33
by cryptbear
Hello to all!

I wanted to create an edit button for the image title and description in category view beside the other icons (autorize, publish, delete).

I succeded in putting some code under the // ICON Trash code in category/views/default_images.php for visualizing the icon, but I have difficulties in finding the right href-link for the button. It should be the same form as in the User Control Panel when you hit on an image...

Does anybody know which code / link or task function do I need to copy to make the title and description editing also work from the category view?

Thank you in advance!

Re: [SOLVED] Edit button in category view

Posted: 26 Jul 2012, 00:27
by cryptbear
I solved it by my own.

I had to modify some corefiles of phocagallery. I don't know if it is the best way, but it works like a charm.

1) I removed the owner check of the folder in the UserControlPanel under models/user.php, commenting out every 'where' database query that has to do with a.owner_id

2) I created a href link on my edit-icon in category view to the edit page of the user model with the task=editimg

with

JRoute::_('index.php?option=com_phocagallery&view=user&catid='.$value->catslug.'&id='.$value->slug.'&controller=user&task=editimg'.'&Itemid='. JRequest::getVar('Itemid', 0, '', 'int') ).$this->tmpl['limitstarturl']

Re: [SOLVED] Edit button in category view next the trash but

Posted: 26 Jul 2012, 13:05
by Jan
OK