• Saurabh Jain

    (@saurabhj91)


    Hi There,

    i am creating custom form to upload the images in gallery, could you please let me know how could i upload it so it can show under the gallery page. I checked the files but was unable to find from where the user_meta is updating and giving custom names to images uploaded using your plugin. Is it updating from GwpmGalleryController::update() function?

    https://wordpress.org/plugins/genie-wp-matrimony/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Prakash Mohankumar

    (@prakashm88)

    Hi

    If you just need the code that does the work for you, you should check this file.

    For profile pic update:

    https://plugins.svn.wordpress.org/genie-wp-matrimony/trunk/application/models/GwpmProfileModel.php

    For Gallery update:

    https://plugins.svn.wordpress.org/genie-wp-matrimony/trunk/application/models/GwpmGalleryModel.php

    The above codes uses the API in thia file:

    https://plugins.svn.wordpress.org/genie-wp-matrimony/trunk/library/gwpm_shared.php

    Please rate the plugin if you like it !!

    Thread Starter Saurabh Jain

    (@saurabhj91)

    Hi Prakash,

    I tried the stuff but did not worked, if possible could you please explain how could i get the file uploaded using my custom form and upload it into gwpm_gallery folder. I tried below code

    function upload_func($user_id,$my_files) {
    
    		 $galleryObj = new GwpmGalleryVO() ;
    		 $galleryObj->gwpm_gallery_img = $this->rearrange($my_files) ;
    		 $galleryObj->deletedImages = explode(",", $_POST["deletedRows"] ) ;
    		 $galleryObj->userId = $user_id;
    		 $this->_model->updateGallery($galleryObj);
    		 $this->set('success_message', 'Images uploaded successfully!!');
    
    	}

    and for now i have added this code into GwmpGalleryController.php and when the user clicks on register button i called this function using

    $my_new_gall = new GwpmGalleryController;
    			$my_new_gall->upload_func($user_id,$uploadedfile);

    but, it shows me error when i am trying to upload the file.

    Any help will be appreciated.

    Thanks

    Plugin Author Prakash Mohankumar

    (@prakashm88)

    @saurabhj91

    Sorry for delay in response,

    Could you please enable the Developer mode options to true as in below

    define(‘DEVELOPMENT_ENVIRONMENT’, true);
    define(‘GWPM_ENABLE_DEBUGGING’, true);

    in the file gwpm_config.php

    this will log all the transactions in /tmp/gwpm_error.log in your server. please post the error details from there so that it will be useful to debug

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to upload gallery images using custom form’ is closed to new replies.