Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
2 + 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Extgallery. Force photo title and upload
by Peekay on 2016/11/24 9:48:12

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.

le="color: #000000"><?php // 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:

le="color: #000000"><?php // 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

Who's Online

95 user(s) are online (53 user(s) are browsing Support Forums)


Members: 0


Guests: 95


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits