BBPress Steven Zahm : Replies Created

Forum Replies Created

Viewing 10 posts - 371 through 380 (of 15,332 total)
  • Author
    Posts
  • in reply to: en-US file #485497
    Steven Zahm
    Keymaster

    @ Jason

    Use you use the connection.pot file to create the en_US PO file and make the changes you wish.

    See this FAQ on where to save your custom PO file so it is not lost when there are Connections updates. Just be aware as updates are released the custom PO file will get more and more out of date.

    Hope this helps!

    in reply to: Need to update #485496
    Steven Zahm
    Keymaster

    Yes, just add those to items to the cart. Then click the renew existing link and add copy/paste the license key into the field, then apply it. Do this for the other items to.

    After you complete the purchase, navigate back to your WP admin. In a short while the updates will show available on the Plugins admin page. Click the Update Now link to apply the update. Be patient, it can take a some time to check our servers for the update. You can try navigating to the WordPress Updates admin page. This page checks for update more frequently than the Plugins admin page.

    Hope this helps!

    ps. Make you you have activated the license keys on the Connections : Settings admin page under the Licenses tab. They will need to be active in order for the update to be permitted.

    Steven Zahm
    Keymaster

    Sorry, this feature is not available. It just is not that highly requested. The directory pages on a site are generally some of the highest visited pages. Many users over the years have confirmed this. In my personal experience on smaller directory sites which do have reviews features, page after after page are empty giving the appearance of little to no social user interaction which gives the user the impression no one is visiting or making use of the directory. So there is little no value add for adding the feature especially when having to deal with spam and fake reviews is taken into consideration.

    in reply to: Link to Placeholder Text #485392
    Steven Zahm
    Keymaster

    @ Heather

    You could upload your placeholder image to the entry as the logo. Then in the Links section of the entry, select the “Link to Logo” option for the website link.

    Hope this helps!

    in reply to: Directory Images not showing #485390
    Steven Zahm
    Keymaster

    @ Debra

    I took another look and was able to replicate the issue. I was not able to before because my monitor at my workstation is large.

    The issue… is the theme.

    For some reason the theme, on smaller screens, globally hides ALL logos by setting their display to none. The profile images were uploaded as logos in Connections which is why they are affected.

    This is not a bug or issue with Connections, but I can tell you how to fix it.

    First here is what the theme is doing:

    @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
        .logo {display: none !important;}
        .retina-logo {display: inline-block !important;}
        .retina-logo-light {display: block !important;}
        .hamburger-logo .retina-logo {display: inline-block !important;}
        .logo-footer-retina {display: inline-block}
        .logo-footer {display: none;}
    }
    

    So we need to work out a way to override the theme. For some reason they wanted to make this a hard to do because they added the !important flag. This tells the browser, well, that it is important and not to change it easily.

    Add this to the theme’s custom CSS area, generally found in the Theme Customizer:

    @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
        img.cn-image {display: block !important;}
    }
    

    Hope this helps! Let me know.

    in reply to: Search field options and possibilities #485369
    Steven Zahm
    Keymaster

    They are using a beta addon for Connections which I offer, on request, to those who purchased the Pro Pack. They did adjust the styling a bit though.

    I freely give it as a free addon in the bundled price. The reason it is not officially part of the bundle is because I still consider it a beta product. With the release of WP5, my goal for this year is to build it as a block which can be used and configured in the new editor.

    You can see it in action on this third part site:

    https://sscit.org/directory/

    I consider this beta software, though safe to run on live sites. It can be difficult to configure due to the complicate shortcode structure to configure the multiple category setup. If you are familiar with shortcodes it should not be too difficult. They styling is as is, though I can give you CSS to apply you own color (instead of blue).

    Hope this helps!

    in reply to: After installing Enhanced Categories – ERROR #485344
    Steven Zahm
    Keymaster

    @ Ivan

    On this is a message for developers. It is a best practice not to display these developer messages on a live site. Here’s a link to a tutorial on how to turn them off:

    Hope this helps!

    in reply to: Two different searchs, order diffently #485343
    Steven Zahm
    Keymaster

    @ Janet

    If I understand correctly, you should be able to use the home_id shortcode option to *point” the two searches to the two different directory pages.

    Hope this helps!

    in reply to: Question about wp_connections_address table. #485342
    Steven Zahm
    Keymaster

    @ Joshua

    RE: Is it hard to associate an existing media library item (or image url) with a business connections entry programmatically?

    Sorry, but this will not be possible. Connections uses its own image “stash” for the lack of a better term. This is primarily for performance/usability reasons. WordPress stores all its image meta as a post type in the database. So when you access an image, you have to first hit the DB, then the image. Connections can also crop/scale on demand and cache’s them. With the Media Library, a new image size needs registered, then a plugin like Regenerate thumbnails needs to be run to create the new size for all images.

    The best that could be done is “sideload” an image from the Media Library into the Connections cache.

    Here’s a code snippet I have handy for sideloading an image added to an Connections Entry into the Media Library. This does not link the two images in any way. It just adds the image to the Media Library.

    add_action( 'cn_post_process_add-entry', 'cn_insert_image_into_media_library' );
    add_action( 'cn_post_process_update-entry', 'cn_insert_image_into_media_library' );
    
    function cn_insert_image_into_media_library( $entry ) {
    
        $image = $entry->getimageMeta();
    
        if ( ! is_wp_error( $image ) ) {
    
            // $file = array(
            //  'url'  => $image['url'],
            //  'type' => $image['type'],
            //  'path' => $image['path'],
            // );
    
            // $time    = current_time( 'mysql' );
            // $url     = $file['url'];
            // $type    = $file['type'];
            // $file    = $file['path'];
            // $title   = preg_replace('/\.[^.]+$/', '', basename( $file ) );
            // $content = '';
    
            // // Use image exif/iptc data for title and caption defaults if possible.
            // if ( $image_meta = @wp_read_image_metadata( $file ) ) {
    
            //  if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
    
            //      $title = $image_meta['title'];
            //  }
    
            //  if ( trim( $image_meta['caption'] ) ) {
    
            //      $content = $image_meta['caption'];
            //  }
            // }
    
            // // Construct the attachment array.
            // $attachment = array_merge( 
            //  array(
            //      'post_mime_type' => $type,
            //      'guid'           => $url,
            //      'post_parent'    => 0,
            //      'post_title'     => $title,
            //      'post_content'   => $content,
            //  ), 
            //  array()
            // );
    
            // // This should never be set as it would then overwrite an existing attachment.
            // unset( $attachment['ID'] );
    
            // // Save the attachment metadata
            // $id = wp_insert_attachment( $attachment, $file, 0 );
    
            // if ( ! is_wp_error( $id ) ) {
    
            //  wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
            // }
    
            /* 
             * Read the contents of the upload directory. We need the
             * path to copy the file and the URL for uploading the file.
             */
            $uploads = wp_upload_dir();
            $uploads_dir = $uploads['path'];
            $uploads_url = $uploads['url'];
    
            // Copy the file from the root directory to the uploads directory
            copy( $image['path'], trailingslashit( $uploads_dir ) . $image['name'] );
    
            /* 
             * Get the URL to the file and grab the file and load 
             * it into WordPress (and the Media Library)
             */
            $url = trailingslashit( $uploads_url ) . $image['name'];
            $result = media_sideload_image( $url, 0, $image['name'] );
    
            // If there's an error, then we'll write it to the error log.
            if ( is_wp_error( $result ) ) {
                error_log( print_r( $result, true ) );
            }
        }
    }
    

    I do not have any code handy to sideload an image into an Entry from the Media Library. I do plan on writing a series on helper functions to make adding an logo/photo easy. I need these for the REST API for Connections I’ve been working on. But I’m not there yet.

    You should be able to cobble something together from these lines of code:

    https://github.com/Connections-Business-Directory/Connections/blob/8.38.1/includes/entry/class.entry-actions.php#L630-L658

    And the code from this function:

    https://github.com/Connections-Business-Directory/Connections/blob/8.38.1/includes/entry/class.entry-actions.php#L76-L151

    You would need to tweak the to use an the absolute file path of an image from the Media Library instead of the files upload path.

    Hope this helps!

    in reply to: Custom Sort Order #485334
    Steven Zahm
    Keymaster

    @ Paul

    I’m assuming you are using the [connections] shortcode, correct? If so, use the order_by shortcode option and set it to title.

    Example: [connections order_by='title']'

    This is added to the existing shortcode on the page, not as as second instance of the shortcode.

    If you are using the new WordPress Editor and the Directory block, you can set the order in the block settings.

    Hope this helps!

Viewing 10 posts - 371 through 380 (of 15,332 total)