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!
[SOLVED] Edit button in category view next the trash button
-
cryptbear
- Phoca Newbie

- Posts: 8
- Joined: 25 Apr 2012, 19:18
[SOLVED] Edit button in category view next the trash button
Last edited by cryptbear on 26 Jul 2012, 00:40, edited 1 time in total.
-
cryptbear
- Phoca Newbie

- Posts: 8
- Joined: 25 Apr 2012, 19:18
Re: [SOLVED] Edit button in category view
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']
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']
- Jan
- Phoca Hero

- Posts: 49150
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [SOLVED] Edit button in category view next the trash but
OK
If you find Phoca extensions useful, please support the project