• Resolved johndoe01

    (@johndoe01)


    Greetings, I want to add a custom field on the form for Profile, since it will not be linked with the Avatar System from WordPress (i could integrate it later), the idea is add a field for the image and (somehow) make a copy there somehow. My main interest is that i can upload the image and then store it into a meta from the user as the other fields, but i cant find the image item. Is there a way to enable it?

    Thanks in advance

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    if you would like to have this field in the [adverts_add] form then i am afraid this is not possible.

    If you are using the Authors extension you can integrate it with WP User Avatar plugin then the users will be able to set their avatars from the Author panel or you could use the WP User Avatar as stand-alone plugin that is, just create a page with [avatar_upload] shortcode where your users will be able to set their avatars.

    Thread Starter johndoe01

    (@johndoe01)

    Hello. This workaround might work. I’ll need however to set the space to redirect to SUerr Avatar since first it cant coexist with the user registration form in the same page and second i’ll try to redirect with a link on a thumbnail.

    My only concern is to add the link to edit the avatar on the Edit profile section but i guess i have an idea of how might be.

    The other issue is layout for that page but that concerns for WP User Avatar.

    If i have any update i’ll let you know

    Thread Starter johndoe01

    (@johndoe01)

    I was trying to place a custom link on the dashboard.php template of wpadverts authors by adding at functions.php

    add_action("adverts_template_load", "profileform");
    function profileform( $tpl ) {
        // $tpl is an absolute path to a file, for example
        // /home/simpliko/public_html/wp-content/plugins/wpadverts/templates/list.php
        
        $basename = basename( $tpl );
        // $basename is just a filename for example list.php
         
         if( $basename == "dashboard.php" ) {
            // return path to list.php file in custom-list-template directory
            return dirname( __FILE__ ) . "/dashboard.php";
         } else {
            return $tpl;
         }
         
            
            
    }

    But is not working, since the only thing i need to do is add a link to the Upload avatar page inside the form, which i’m trying to do with this override.

    • This reply was modified 4 years, 2 months ago by johndoe01.
    Plugin Author Greg Winiarski

    (@gwin)

    To insert a link inside the Authors menu you should use the adverts_authors_dashboard_menu filter.

    See here https://github.com/simpliko/wpadverts-snippets/blob/master/change-author-menu/change-author-menu.php how to use it.

    Thread Starter johndoe01

    (@johndoe01)

    Effectively worked, and since i needed to add a Shortcode from other plugin, it is working as intended. Although the “Custom Dashboard” option gave me a headache since i needed the original setting.

    I guess that the other image i need to load i can handle it similarly.

    Thanks for the help.

    Plugin Author Greg Winiarski

    (@gwin)

    If you have some plugin that will accept the additional file upload and it has some function or shortcode to display it on page then you can use the adverts_authors_dashboard_menu filter again to add an additional menu item to the Authors menu and handle the upload from there.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Profile Form – Add image Field’ is closed to new replies.