WordPress.org

Ready to get started?Download WordPress

Forums

Plugin: Cimy User Extra Fields - Image URL In Rich Editor (11 posts)

  1. one3rdnerd
    Member
    Posted 3 years ago #

    I am using the textarea-rich cimy field on author profiles and within that have added images.

    These images worked fine before I upgraded the plugin and wordpress and was linking images like in the example below.

    http://www.securitynewsdesk.com/wp-content/uploads/2011/07/Kaba_logo_new-e1311845735277.jpg

    But now links to:

    ../wp-content/uploads/2011/07/Kaba_logo_new-e1311845735277.jpg

    and the image is thus not found.

    Example url of where this is happening...

    http://www.securitynewsdesk.com/browse/kaba/

    Cheers, I know this may not be CIMY specific but no images in normal posts have began using this ../wp-content format for relative url linking.

  2. Marco Cimmino
    Member
    Posted 3 years ago #

    These images worked fine before I upgraded the plugin and wordpress

    upgraded to which version? Come on man, I said read the FAQ!

    Example url of where this is happening...

    http://www.securitynewsdesk.com/browse/kaba/

    Example is not there as you disabled registration.

    Once again: provide more info or you are just wasting my time.

  3. Marco Cimmino
    Member
    Posted 3 years ago #

    http://www.securitynewsdesk.com/wp-content/uploads/2011/07/Kaba_logo_new-e1311845735277.jpg

    This url has nothing to do with textarea-rich do you understand this? If I understood correctly from the very fuzzy decription, I think you are complaining for the tinyMCE buttons' url that are not absolute, but those urls come from:
    /wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css

    so is not my fault, even though not sure why for me works perfectly and for you not.
    Of course with so poor description of your problem and of your system this is the most I can do.

  4. one3rdnerd
    Member
    Posted 3 years ago #

    Hi Marco,

    I have been on your site and looked for anything related but can't see it.

    Really do not want to waste your time and that wasnt my intention at all.

    What I am saying is... regardless of registration disabled if you look at the example link you will notice there is text on the top left of the content area where there should be a photo, if you inspect that part of the source you will see the image url it is trying to pull in begins with ../wp-content which doesnt work, if you edit the source live and just remove the two dots it works fine.

    Does that help you understand?

    I have upgraded to the latest version of the plugin and the latest version of wordpress.

    Thanks, hope your having a nice day.

  5. Marco Cimmino
    Member
    Posted 3 years ago #

    What I am saying is... regardless of registration disabled if you look at the example link you will notice there is text on the top left of the content area where there should be a photo, if you inspect that part of the source you will see the image url it is trying to pull in begins with ../wp-content which doesnt work, if you edit the source live and just remove the two dots it works fine.

    Does that help you understand?

    That url is not produced by my plug-in and I have no idea where it comes from.
    Cimy User Extra Fields is a plug-in to add registration and profiles' fields, does not do anything about your blog's content.

    So how can I help you in code is not mine?

  6. one3rdnerd
    Member
    Posted 3 years ago #

    The example url is an author profile url. I am hooking your plugin fields in with this page myself and the first content box you see on this page at the top is created using CIMY. It uses the rich text editor field option and I have added text and an image to this box so it then displays on user profiles? That make sense?

    So it is the rich text editor I think which is changing the image urls from absolute to relative to the wordpress install hense the ../wp-content instead of the full image url?

    People can fill this field in AFTER registration by logging in and going to Dashboard > Users > Your Profile.

    Thanks again.

  7. Marco Cimmino
    Member
    Posted 3 years ago #

    Man that page I have no idea how is created.
    Is your code? Show me the code.
    Is a plug-in that does that? Tell me which.

    I repeat you are lacking VITAL INFORMATION TO DEBUG THE ISSUE and you are seriously upsetting me.

  8. one3rdnerd
    Member
    Posted 3 years ago #

    The last thing I want to do is upset you Marco as I both appreciate your hard work on developing this tool and your prompt assistance. I am just providing what I know.

    To create this on an author profile I have created a function in my functions.php file within the theme. (Thesis Theme).

    The code used is below.

    /* Add Additional Fields to Author Profile */
    
    // Author / User Profiles
    
    function my_author_intro($output) {
        global $wp_query;
        $curauth = $wp_query->get_queried_object();
        if (is_author()) {
            $authinfo =    '<div id="archive_info"><h1>' . $curauth->display_name . '</h1></div>' . "\n";
    	$aboutbio = '<div id="profile-bio"><span style="color: #535250; font-size: 1.3em; line-height: 1.7em; padding-right: 2em;">' . get_cimyFieldValue($curauth->ID, 'ABOUT') . '</span></div>';
    	$banner = '<div id="banner"><span style="">' . get_cimyFieldValue($curauth->ID, 'BANNER') . '</span></div>';
    	$latesttitle = '<div id="latest-title"><h2> Latest Articles </h2></div>';
    	$output = $authinfo . $aboutbio . $banner . $latesttitle;
        }
    return $output;
    }
    
    add_filter('thesis_archive_intro','my_author_intro');

    You can ignore the banner part of the code as that pulls a banner url through and works fine. The part of interest is the code inside $aboutbio

    Does that help you any more? If you provide me an email I will send you a login link to the screen where this is being controlled?

    Thanks

  9. Marco Cimmino
    Member
    Posted 3 years ago #

    I am just providing what I know.

    Not true, it took for you 1+4 messages to show me the custom code you use and that is giving you issue.
    Is like going to the car service, asking to fix the car and hiding the car somewhere and saying: "Yea the car is blue and is broken... why?". Do you think is normal?

    Said this finally I understood that your problem is the url returned by this line of code you added:
    get_cimyFieldValue($curauth->ID, 'ABOUT')

    So what the specific user inserted in the about field? Show me a screenshot.
    Plus my email is everywhere, if you would have read the FAQ as I told you 3 times with this one you'll have found it.

  10. one3rdnerd
    Member
    Posted 3 years ago #

    I have dropped you an email regarding the above.

    Thanks

  11. Marco Cimmino
    Member
    Posted 2 years ago #

    Issue has been fixed in v2.2.0 and a short code to fix all your users should look like:

    $ef = get_cimyFieldValue(false, 'ABOUT');
    foreach ($ef as $field) {
          $user_id = $field['user_id'];
          $value = $field['VALUE'];
          $value = str_replace("../wp-content/", content_url(), $value);
          set_cimyFieldValue($user_id, 'ABOUT', $value);
    }

    * copy/paste ^ into cimy_uef_init_mce.php after the <?php (2nd line)
    * go to profile page (with your ADMIN user)
    * done everything should be automagically updated

    you can remove the above code.

Topic Closed

This topic has been closed to new replies.

About this Topic