Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter ffenton

    (@ffenton)

    I have now got it working. I didn’t come across those instructions once when searching – only the old document.
    However, there is an error in the new document. In it you state “replace en_US in the file name with en_UK, es_ES, fr_FR, etc, if necessary” but for UK it’s en_GB.

    Thread Starter ffenton

    (@ffenton)

    I’m using 4.0.16 and have followed your instructions here https://awpcp.com/quick-start-guide/#qs-translate
    I have site language set as English(UK)
    I have new files in wp-content\languages\ – another-wordpress-classifieds-plugin-en_GB.mo and another-wordpress-classifieds-plugin-en_GB.mo – but any changes I make aren’t showing up on the website.
    Your instructions say Under Classifieds->Settings->General Tab, find and check the box that says “Turn On Translation File (POT)?” but that option doesn’t exist.
    And I’ve made sure cache flushed.

    Thread Starter ffenton

    (@ffenton)

    Thank you.
    Managed to achieve it by using an iframe

    Thread Starter ffenton

    (@ffenton)

    We have approximately 14,000 listings which are added to/removed daily by various means. Some automated, some manual via a separate login area outside of WordPress.
    It’s the manual ones that I’m wanting to deal with at the moment. I want these to show updated information immediately.

    I know header() must be called before any actual output but the php file is an included file so not possible.

    Thread Starter ffenton

    (@ffenton)

    My code isn’t in WordPress so can’t use LiteSpeed_Cache_API::purge($tag)

    Also have a problem with using header(“X-LiteSpeed-Purge: /your-php.php”) as I get Cannot modify header information – headers already sent by etc

    To explain better I have a php file that contains a form which posts back to itself. On submitting, the form fields are used to run query to update database. Once query has run I then want to purge the corresponding page and then redisplay form with fields populated with database values.

    Thread Starter ffenton

    (@ffenton)

    Found it!

    I had to alter wp-config.php. Even though I had define(‘WP_MEMORY_LIMIT’, ‘1024M’) for some reason admin was only using default 256M. Have now added define(‘WP_MAX_MEMORY_LIMIT’, ‘1024M’) to wp-config.php and the problem appears to have gone away.

    Thread Starter ffenton

    (@ffenton)

    I’ve checked and double checked with hosting company and memory limit is set to 1024M so don’t think this is the problem.

    Any other ideas as to what might be causing this?

    Thread Starter ffenton

    (@ffenton)

    No point in giving you url as all the relevant pages are password protected.
    I have a feeling it may be a max memory problem. The hosting company are being less than helpful. So have decided they are losing my business and I’m moving to another hosting company.
    I’ll mark this as resolved for now and if I still have any problems after moving it again I’ll come back to you.

    Thread Starter ffenton

    (@ffenton)

    Thanks Nick, that set me on the right path and I now have it working as wanted.
    For anyone else wanting to resize images after upload this is what I ended up with.

    if (!function_exists('wfu_before_file_upload_handler')) {
        function wfu_before_file_upload_handler($file_path, $file_unique_id) {
          $_SESSION['wfu_tempfiles'][$file_unique_id] = $file_path;
          return $file_path;
      }
      add_filter('wfu_before_file_upload', 'wfu_before_file_upload_handler', 10, 2);
    }
    if (!function_exists('wfu_after_file_upload_handler')) {
      function wfu_after_file_upload_handler($changable_data, $additional_data) {
    	$file_unique_id = $additional_data["file_unique_id"];
        if ($additional_data['upload_result'] == 'success' && isset($_SESSION['wfu_tempfiles'][$file_unique_id]) && $_SESSION['wfu_tempfiles'][$file_unique_id] != '') {
         $filepath= $_SESSION['wfu_tempfiles'][$file_unique_id];
    	 //now that we have the path to uploaded file we can resize it using our resizeImage function in our functions.php file
    	 resizeImage($filepath, $filepath, 600, 600);
    
    	}
    	return $changable_data;
      }
      add_filter('wfu_after_file_upload', 'wfu_after_file_upload_handler', 10, 2);
    }

Viewing 9 replies - 1 through 9 (of 9 total)