Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
04-15-2017, 08:39 AM | #1 |
So fucking bland
Industry Role:
Join Date: Jul 2006
Location: England
Posts: 8,004
|
Wordpress help please!
Two questions ....
1) What's the best wordpress stats plug-in at the moment? I'm mostly after low server load with this plugin. 2) Is there a way for a wordpress install to check on uploaded images and refuse ones that are below a sertain size? Cheers.
__________________
Free traffic and backlinks from one of the fastest growing adult pinsites on the net - SAUCY PICTURES! Easily my best performing webcam sponsor - CLICK HERE!! |
04-15-2017, 10:41 AM | #2 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 54,493
|
1. https://en-ca.wordpress.org/plugins/...for-wordpress/
they have a pro version too. 2. you can use filters to limit the size, depends if you want dimensions, or filesize which is it you want for #2? |
04-15-2017, 10:45 AM | #3 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 54,493
|
here is both methods
Code:
add_filter('wp_handle_upload_prefilter','_limit_image_dimensions'); function _limit_image_dimensions( $file ) { $image = getimagesize($file['tmp_name']); $minimum = array( 'width' => '400', 'height' => '400' ); $maximum = array( 'width' => '2000', 'height' => '2000' ); $image_width = $image[0]; $image_height = $image[1]; $too_small = "Image dimensions are too small. Minimum size is {$minimum['width']} by {$minimum['height']} pixels. Uploaded image is $image_width by $image_height pixels."; $too_large = "Image dimensions are too large. Maximum size is {$maximum['width']} by {$maximum['height']} pixels. Uploaded image is $image_width by $image_height pixels."; if ( $image_width < $minimum['width'] || $image_height < $minimum['height'] ) { $file['error'] = $too_small; return $file; } elseif ( $image_width > $maximum['width'] || $image_height > $maximum['height'] ) { $file['error'] = $too_large; return $file; } else return $file; } function _limit_image_size($file) { $image_size = $file['size']/1024; $limit = 200; // size in kb $is_image = strpos($file['type'], 'image'); if ( ( $image_size > $limit ) && ($is_image !== false) ) $file['error'] = 'Your picture is too large. It has to be smaller than '. $limit .'KB'; return $file; } add_filter('wp_handle_upload_prefilter', '_limit_image_size'); |
04-15-2017, 10:48 AM | #4 |
So fucking bland
Industry Role:
Join Date: Jul 2006
Location: England
Posts: 8,004
|
cheers, I've already installed that google analytics for wordpress, I saw how many d/ls it had and thought it worth a try.
the code, which file should it go in?
__________________
Free traffic and backlinks from one of the fastest growing adult pinsites on the net - SAUCY PICTURES! Easily my best performing webcam sponsor - CLICK HERE!! |
04-15-2017, 11:23 AM | #5 |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 54,493
|
your themes functions.php file
|
04-15-2017, 02:05 PM | #6 |
So fucking bland
Industry Role:
Join Date: Jul 2006
Location: England
Posts: 8,004
|
Thanks, unfortunately, it didn't work. I've a feeling that there is already code in the functions code that does this but is set very low, maybe but php is dutch to me.
__________________
Free traffic and backlinks from one of the fastest growing adult pinsites on the net - SAUCY PICTURES! Easily my best performing webcam sponsor - CLICK HERE!! |
04-15-2017, 05:07 PM | #7 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 54,493
|
Quote:
zip it up and email me it. |
|
04-15-2017, 07:55 PM | #8 |
Natalie K
Industry Role:
Join Date: Apr 2010
Location: Spain
Posts: 18,537
|
bump for help on WP, maybe BabeTerminal can help, he´s not much good for anything, but who knows...
__________________
My official site NatalieK.xxx My free porn & affiliate blog Natalie K affiliate programFirst time girls Skype: gspotproductions - "Converting your traffic into income since 2005" |
04-16-2017, 02:54 AM | #9 |
So fucking bland
Industry Role:
Join Date: Jul 2006
Location: England
Posts: 8,004
|
mail sent, many thanks
__________________
Free traffic and backlinks from one of the fastest growing adult pinsites on the net - SAUCY PICTURES! Easily my best performing webcam sponsor - CLICK HERE!! |