new text field

Phoca Gallery - image gallery extension
singlanhn
Phoca Member
Phoca Member
Posts: 11
Joined: 11 May 2012, 22:50

new text field

Post by singlanhn »

I want to add new text field in which user can enter the resolution of the image and it shuld be displayed in the category view.
Please guide
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: new text field

Post by Jan »

HI, for now I didn't do such option, so no exact advice, you need to set this as database column in database and then add the form field in place of uploading (frontend or backend) ... but really no specific advice :-(
If you find Phoca extensions useful, please support the project
singlanhn
Phoca Member
Phoca Member
Posts: 11
Joined: 11 May 2012, 22:50

Re: new text field

Post by singlanhn »

Hey Jan,
Could you tell me which files needs to be edited so that i can atleast give it a try, I have no idea which files are used in this.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: new text field

Post by Jan »

Hi,

1) you need to add it to database - e.g. create new column for image table
2) edit the view where user will add it - e.g. components/com_phocagallery/views/category/tmpl/ ... for category view
3) in controller of the view: components/com_phocagallery/controllers/category.php you need to get the post data
4) in model you need to work with this data - to save them to database components/com_phocagallery/models/category.php

The same for administration part in case, it should be managed from backend.

Jan
If you find Phoca extensions useful, please support the project
Post Reply