Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
honestdish
tagDiv Member

To fix this, I’ve edited the plugin directly under plugins -> plugin editor (WARNING to anyone else reading this, if tagDiv updates their plugin, there is a risk they will overwrite this change and you’ll have to make it again).

Then I chose tagDiv composer from the dropdown on the top right and clicked apply. I navigated to legacy -> common -> booster and clicked on td_module.php. Then I clicked into the code area and typed cmd-f (ctrl-f for windows) and searched for this:

class="td-image-wrap

I replaced that line that starts with $buffy, with the following code:

	            
                if ( is_null( $this->post_thumb_id ) ) {
                    $no_thumbnail = 'no-thumb';
                } else {
                    $no_thumbnail = '';
                }
                $buffy .= '<a>href . '" rel="bookmark" class="td-image-wrap ' . $no_thumbnail . $video_popup_class . '" title="' . $this->title_attribute . '" ' . $video_popup_data . '>';

I now have a “no-thumb” class which shows up then there is no thumbnail, and am able to use that to hide the thumbnail anchor (“a”) element entirely via CSS.

honestdish
tagDiv Member

Thanks Vlad. I’ve been noticing that. I tracked it down somewhat:

There is code in the PHP file /wp-content/plugins/td-composer/legacy/common/wp_booster/td_module.php
(or alternately /wp-content/plugins/td-cloud-library/includes/tdb_module.php, where similar code lives).

$custom_placeholder = td_util::get_option('tds_thumb_placeholder');

That thumb placeholder appears to get assigned, in the case of no featured image, on this line:

} else if( $custom_placeholder != '' && $css_image === true ) {
    $td_temp_image_url[0] = $custom_placeholder;

Then the assignment appears to be used here to render the thumbnail:

$buffy .= '<span class="entry-thumb td-thumb-css" data-type="css_image" data-img-url="' . $td_temp_image_url[0] . '" ' . $retina_image . ' ></span>';

That option tds_thumb_placeholder is being defined in the wordpress database. It’s in the wp_options table, in the rows with option_name td_011 and td_011_settings. Unfortunately, the option_value for those two items are PHP serialized data, and contain an insane 2,500 rows of information (all inside one single database cell — over 256kb of data).

Trying to unserialize the data using online tools has proven fruitless.

I’m thinking of writing additional PHP code near those if statements to simply add a class like “no-thumb” when there is no featured image. Of course overwriting plugin code is a challenge, as there’s no such thing as a “child plugin” the way there is a “child theme”, but I’m sure there’s a way to do that without risking issues when the plugin is updated.

I built the whole site in about 4 hours, then I’ve spent 4+ hours trying to hide just that one thumbnail. Can it be added as a feature request to be able to turn off thumbnail placeholders? I see from searching around that I’m not the first person to ask.

Cheers,
Michael

honestdish
tagDiv Member

Thanks for the reply Vlad.

That was the same conclusion I mentioned above, and unfortunately it sounds like there’s no known intuitive solution, so it will involve training and will be confusing for each new editor.

I’ll keep looking for a solution. Thanks!

honestdish
tagDiv Member

Any ideas here? Really need to get rid of thumb placeholders.

I’m a coder, so if the solution is CSS or javascript, that’s fine, but I notice there’s no css class for no-thumb. It just acts as if it’s the actual featured image.

Would love some suggestions.

honestdish
tagDiv Member

To add to this, I notice that the cloud templates default to “Edit with tagDiv Composer” as the first option. Is there a way to set that for a single page? I suspect not, but it’s an idea…

View post on imgur.com

Viewing 5 posts - 1 through 5 (of 5 total)