Tweaks to fix socialengine gifts (Hire-Experts) with MaxCDN

Everybody likes getting gifts. People often give and receive gifts at special occasions or as an expression of love, gratitude or friendship. As a social community user, it would be great if user can send/receive gifts from their friends and relatives. We have been building many social networking sites and always felt that this feature to be a part of every community.

Recently Hire-Experts comes up with the virtual gifts plugin for the socialengine and its amazing plugin to send photo,audio and video gifts. The empower the community users to connect well with their friends.

“You can create as many Virtual Gifts as you would like and link them to any holiday. It can be not only a photo, but also a video or even a music. It automatically suggests members to send a gift on their friends birthday or on holidays – it is simple and fun.”

We also tried this plugin on one of our client’s community and it works fine with basic functionality. As soon we tried to test every feature of the plugin, we encountered issue while uploading a virtual photo gift. We were not able to upload the photo and progress bar for upload remains standstill on 0% event after few minutes.

We tried to upload the audio or video gifts to make sure that the issue is with only with photo gift but these features were also not working.  We tried features based on fancyupload in socialengine and concluded that there is definitely some issue with the plugin as other features on socialnegine works fine. So we decided to fix the issue our self as our client insisted us to launch this plugin as soon as possible.

We looked at the code and found that the template file from HE plugin doesn’t seem to set the cross-domain policy in the javascript function.  We removed the MAX-CDN reference from the socialengine and tried to test the upload.  The functionality worked this time and this verified that the plugin have cross-domain policy issues. We add following lines in the file ‘_FancyUploadPhoto.tpl’ while initializing FancyUpload for the upload:

 // set cross-domain policy file
 policyFile : '',

After the above changes, we were able to upload photo gifts. We applied the same changes in the audio and video templates and they worked as well.

We hope HE guys would incorporate this change in their plugin and come up with a patch to support uploading for cross domain. Feel free to give us your feedback and contact us if you wanted to build your own social community based on socialengine.


Leave a Comment

Scroll to Top