I am having a major issue with photo uploads. You should not have to input a description as mandatory and it should be optional. I've looked everywhere and also had others help but nothing has worked. Why would this be something that is mandatory as people uploading images arent thinking about adding a description to every image. This should be changed in future revisions. |
Just sent you the answer on this; and updated my topic. Note that you still have to make the change in BxDolFilesUploader and set required to false; that way you won't have the red asterisk.
One more piece to this puzzle is to remove the autofill on the description box; have you done that yet?
Geeks, making the world a better place |
Answers would come more quickly if more of the experts would help out. I am no expert; I am not even a beginner. For the most part, you see the same five or six or seven (I don't know the exact number) people answering questions Geeks, making the world a better place |
Should put something here as well for future searches.
in the photo module js directory, edit upload.js and find the following BxPhotoUpload.prototype.doValidateFileInfo and make the changes.
BxPhotoUpload.prototype.doValidateFileInfo = function(oButtonDom, iFileID) { var bRes = true; if ($('#send_file_info_' + iFileID + ' input[name=title]').val()=='') { $('#send_file_info_' + iFileID + ' input[name=title]').parent().parent().children('.warn').show().attr('float_info', _t('_bx_photos_val_title_err')); bRes = false; } else $('#send_file_info_' + iFileID + ' input[name=title]').parent().parent().children('.warn').hide(); return bRes; //can submit }
Geeks, making the world a better place |
By the way, in the photo view page, the edit pop-up still has description mandatory; so that will eventually need to be fixed as well. Geeks, making the world a better place |
yeah only a handfull of helpers one these forums for the most part unless they have the same issue or if its their module that is having the issue you will not get a quick response. Not sure if boonex even has a person in the forums. I will submit this as a bug I guess and wait because it makes no sense fixing it for one part when there is more that needs to be done. Thank you for all the help on this geek girl. |
It is not a bug and we do have half the answer, Yes, there are Boonex people that come here; you will see AlexT quite often answering questions and Alex has help me numerous times. Geeks, making the world a better place |
What is this solution for? And what are the open issues? I'll try to help.
Should put something here as well for future searches.
in the photo module js directory, edit upload.js and find the following BxPhotoUpload.prototype.doValidateFileInfo and make the changes.
BxPhotoUpload.prototype.doValidateFileInfo = function(oButtonDom, iFileID) { var bRes = true; if ($('#send_file_info_' + iFileID + ' input[name=title]').val()=='') { $('#send_file_info_' + iFileID + ' input[name=title]').parent().parent().children('.warn').show().attr('float_info', _t('_bx_photos_val_title_err')); bRes = false; } else $('#send_file_info_' + iFileID + ' input[name=title]').parent().parent().children('.warn').hide(); return bRes; //can submit }
|
The issue is that the description for photos are hard coded to be mandatory. Furthermore, the bozo checker is hard coded to report an error that the description can not be blank even if you set the description field as "required false" in BxDolFilesUploader.php. The code I posted is the change to the bozo checker so it won't get upset if description is blank. So at upload time we have this issue solved; well, almost solved, I need to remove the autofill bit as well; no idea why Boonex felt the need to autofill it with the title.
The second part of the puzzle is when one goes to the photo view page and click on the edit button. The pop-up dialogue box also needs to be changed. If someone knows where that code is; is it a part of the function javascript, then we can change that and the final piece is in place where members are not required to enter a description for a photo.
Geeks, making the world a better place |
OK, so in order to make the "Description" field to not be mandatory when editing a photo, you should do this:
go to inc/classes/BxDolFilesModule.php, in line 432 you have the 'required' => true setting, which you have to change to "false". You will also probably need to change the checker function in the next line, to accept length of 0 ('params' => array(0, 65536)).
I would love to get the info on where to set the "required" state for uploading of files, or just a link to the solution if you have it in another post. That's something I have in my oh-so-very-long Todo list.
|
OK, so in order to make the "Description" field to not be mandatory when editing a photo, you should do this:
go to inc/classes/BxDolFilesModule.php, in line 432 you have the 'required' => true setting, which you have to change to "false". You will also probably need to change the checker function in the next line, to accept length of 0 ('params' => array(0, 65536)).
I would love to get the info on where to set the "required" state for uploading of files, or just a link to the solution if you have it in another post. That's something I have in my oh-so-very-long Todo list.
Yes, I already knew about this. You also need to edit the bozo checker which is hard coded as well, that is in the /modules/boonex/photos/js/upload.js. It is hard coded for the description field to be filled as well.
Now, we need to fix the edit button on photos as well; that is the pop-up editor.
Geeks, making the world a better place |
Rules → http://www.boonex.com/terms |
thanks for adding to roadmap this was really needed. Actually it will be good to have this as a option in admin area so turn mandatory for media on/off |
wow thanks Alext for checking this out and making this a ticket! I guess I will wait for this fix to come out and til then people will just put in whatever to get their image uploaded. I just think something like this should be optional because if I upload a photo of a cat with a piece of cheese on his head that says it all and I should'nt have to enter more information as I think the image speaks for itself. Geek_girl thank you for checking up on this and following it along for me, that is much appreciated. It makes no sense changing the code at the present time when its only half fixed. Thanks again. |
yes, true. The pop-up editor means going into the javascript code and I am a bit weak there with the more expanded javascript used with Dolphin; I know basics of javascript. I might still look at this when I have time. Geeks, making the world a better place |