danbrellis
Forum Replies Created
-
Forum: Plugins
In reply to: [Invite Anyone] Page times out when loading list of 1,000s of usersbradley, just put it into you’re theme’s (or child theme’s) functions.php file. Anywhere inside <?php ?> should be just fine.
Forum: Plugins
In reply to: [Invite Anyone] Page times out when loading list of 1,000s of users*puts foot in mouth*
The second I start to dig into the code to write my own fix, I see the filter:
invite_anyone_is_large_network
a simple:
add_filter( 'invite_anyone_is_large_network', '__return_true' );
allowed the page to load just fine.
Thanks!
Forum: Plugins
In reply to: [No CAPTCHA reCAPTCHA] buddypress registration captchaI will second the need for this feature. It’d be great to incorporate with buddypress.
Forum: Plugins
In reply to: [Easy Social Icons] jQuery is not definedAdditionally, you need to change the action hook to add these scripts:
add_action('wp_enqueue_scripts', 'cnss_my_script');
on line 23 of ‘easy-social-icons.php’
Forum: Localhost Installs
In reply to: Line break added in wp_editor codeUpdate.
Resolved.
I removed this by adding the following code in my router callback function.
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_content', 'wptexturize' );
Apparently wp still uses the content hook.
Plus 1 for adding filters. For message content and many other things in the email, i.e. for sending headers with wp_mail() to set custom reply-to addresses, etc.
Thanks
P.S. Great plugin, thanks for the hard work!
Forum: Plugins
In reply to: [Categories Images] How do i handle image size?@clairele Thanks for this bit of code. I expanded on it a bit and amde it into a more adaptable function
function my_get_taxonomy_image_url($catID, $size=false){ global $_wp_additional_image_sizes; if (function_exists('z_taxonomy_image_url') && z_taxonomy_image_url($catID) !== false) { $img_url = z_taxonomy_image_url($catID); if(empty($img_url)) return false; $name = substr( $img_url, 0, strrpos( $img_url, '.' ) ); $ext = substr ($img_url, strrpos( $img_url, '.' ) + 1 ); if(is_array($size)){ //$size is array of width and height of a predefined image size $name .= '-' . $size[0] . 'x' . $size[1]; } elseif($_wp_additional_image_sizes[$size]){ //$size is a string of the id of a predefined image size $name .= '-' . $_wp_additional_image_sizes[$size]['width'] . 'x' . $_wp_additional_image_sizes[$size]['height']; } //returns new image url return $name . '.' . $ext; } }
Now, you don’t have to target jpg/png/gif and you can enter the name of the custom image size or it’s width & height
So if we did this in functions.php: add_image_size(‘my_cat_thumb’,24,24);
We can do this in a template file:
$cats = get_the_category(); if($cats && is_array($cats)){ foreach($cats as $cat){ echo '<img src="'. my_get_taxonomy_image_url($cat->term_id,'my_cat_thumb') .'" />'; } }
Forum: Plugins
In reply to: [Download Monitor] Support for Website DownloadsActually, I just noticed that is a top-level domain is entered (i.e. https://foo.net/), the plugin will take “net” as the file extension, so whenever I output a file extension on my site, I check for web extensions first:
$webext = array('net','com','org','edu','gov','mil','info','biz'); echo $dlm->get_the_filetype() && !in_array($dlm->get_the_filetype(), $webext) ? $dlm->get_the_filetype() : 'web';
Forum: Plugins
In reply to: [Download Monitor] Support for Website DownloadsNo problem, glad it helped out someone as well.
Unfortunately, there is no filter for the get_the_filetype() function, so where ever I need the filetype to be displayed, I replace $dlm_download->the_filetype() with that code snippet. So for instance, in your download template in the plugin folder (i.e. templates/content-download.php). Hope this helps.
Forum: Plugins
In reply to: [Download Monitor] Support for Website DownloadsMy current work around:
add_filter('dlm_do_not_force','hgs_dlm_do_not_force',10,3); function hgs_dlm_do_not_force($bool, $download, $version){ $bool = true; return $bool; }
This disables the force download, so webpages are opened in a new window. Fortunately, the plugin author was kind enough to include the download and version in the filter, so you could condition to force or not based on the if the download was a webpage.
As for the filetype, this is working for me for now:
echo $dlm_download->get_the_filetype() ? $dlm_download->get_the_filetype() : 'web';
I am still curious on your thoughts about adding a web filetype for a version if it’s a webpage into the database, rather than conditioning. Or, to include a condition in the get_the_filetype() function.
Thanks!
Forum: Plugins
In reply to: [Categories Images] How do i handle image size?swapnesh, I am very interested in this functionality. Have you made any progress in completing? It’d be great to use add_image_size as we would do for post_thumbnails.
Thanks and let me know.
Forum: Plugins
In reply to: [User Photo] More photo sizes cropping optionI would also like a solution to this post. The option to have multiple photo sizes or ability to add_image_size for user photos would be excellent.
Forum: Plugins
In reply to: [uCan Post] Imageupload doesn't workI too am having this problem!
I am getting the exact same problem as benchwarmer. When I turn html on for the preferred text type, emails from gmail work perfectly (except signatures aren’t removed), but emails from outlook get all content stripped, only showing title.