1
Peekay
Extgallery. Force photo title and upload
  • 2016/11/24 9:48

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I have been doing some work with Extgallery recently and found that the module will automatically use the filename if no photo title is entered. This is useful, but if you want to force users to enter a title you can change the following.

In public_upload.php at about line 68, simply change FALSE at the end of the line to TRUE (as shown) and the Xoops form feature will make the field required.

// pk make photo title a required field (set TRUE)
$form->addElement(new XoopsFormText(_MD_EXTGALLERY_PHOTO_TITLE'photo_title''50''150'),true);


It's a good idea to make uploading a photo a requirement, so you can make the change again just below at around line 74:

// pk make uploading a photo a requirement
$form->addElement(new XoopsFormFile(_MD_EXTGALLERY_PHOTO'photo_file'$xoopsModuleConfig['max_photosize']),true);


The second change might be a better default IMHO.

PK

Login

Who's Online

280 user(s) are online (170 user(s) are browsing Support Forums)


Members: 0


Guests: 280


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits