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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-15-2017, 08:39 AM   #1
rogueteens
So fucking bland
 
rogueteens's Avatar
 
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!!
rogueteens is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2017, 10:41 AM   #2
fris
Too lazy to set a custom title
 
fris's Avatar
 
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?
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


my contact: fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2017, 10:45 AM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
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');
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


my contact: fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2017, 10:48 AM   #4
rogueteens
So fucking bland
 
rogueteens's Avatar
 
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!!
rogueteens is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2017, 11:23 AM   #5
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,493
your themes functions.php file
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


my contact: fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2017, 02:05 PM   #6
rogueteens
So fucking bland
 
rogueteens's Avatar
 
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!!
rogueteens is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2017, 05:07 PM   #7
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,493
Quote:
Originally Posted by rogueteens View Post
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.
if you can send me the theme i can assist.

zip it up and email me it.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


my contact: fris at fris.net
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-15-2017, 07:55 PM   #8
NatalieK
Natalie K
 
NatalieK's Avatar
 
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"
NatalieK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-16-2017, 02:54 AM   #9
rogueteens
So fucking bland
 
rogueteens's Avatar
 
Industry Role:
Join Date: Jul 2006
Location: England
Posts: 8,004
Quote:
Originally Posted by fris View Post
if you can send me the theme i can assist.

zip it up and email me it.
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!!
rogueteens is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
wordpress, check, uploaded, install, sertain, size, cheers, refuse, images, plugin, stats, plug-in, questions, moment, load, server, low



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.