Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter petermaier

    (@petermaier)

    @robbieboy
    I made a shortcode [cat_future] to resolve that problem. You can tweak it for your own purpose. Place that code in the functions.php of the wordpress-theme (or of the child-theme, if you use one). You can use the shortcode everywhere in wordpress.
    Hope this helps!

    
    // Events Categories
    function cat_future_function() {
    	global $wpdb;
    	$tt = array();
    	$cat = array();
    
    	// Names/Labels of the Cats
    	$query = "SELECT term_taxonomy_id, name, slug FROM BKguQ_term_taxonomy inner join BKguQ_terms ON BKguQ_term_taxonomy.term_id = BKguQ_terms.term_id WHERE BKguQ_term_taxonomy.taxonomy = 'event-categories'";
    	$result = $wpdb->get_results($query, ARRAY_A);
    	foreach ($result as $ds) {
    		$tt[$ds['term_taxonomy_id']] = $ds;
    	}
    	
    	// Cats Used by Events in the Future
    	$query ="SELECT term_taxonomy_id from BKguQ_em_events inner join BKguQ_term_relationships on BKguQ_em_events.<code>post_id</code> = BKguQ_term_relationships.object_id where BKguQ_em_events.event_end_date >= CURDATE() group by BKguQ_term_relationships.term_taxonomy_id";
    	
    	$result = $wpdb->get_results($query, ARRAY_A);
    	foreach ($result as $ds) {
    		// ************          
    		// put in the correct path: 
    		// YOUR_PATH could be something like /events/categories/
    		$cat[] = '<a href="YOUR_PATH' .$tt[$ds['term_taxonomy_id']]['slug'] .'/">' .$tt[$ds['term_taxonomy_id']]['name'] .'</a>';
    	}
    	// *************
    	// and also a link for all events at the end of the list would be nice
    	$cat[] = '<a href="/events/">All Events</a>';
    
    	return implode("<br />", $cat);
    }
    add_shortcode('cat_future', 'cat_future_function');
    
    • This reply was modified 9 years, 4 months ago by petermaier.
    Thread Starter petermaier

    (@petermaier)

    Thank you very much!

    Thread Starter petermaier

    (@petermaier)

    @cosmoweb
    Thank you for the answer! You set me on the right path. After some trial and error I found the solution.

    There are two things to consider to get the resize work.

    1. Event Manager Settings
    You’ve got to set the image max-dimension much bigger (i.e. 5000 px) and also the max size of the file (i.e. 2,000,000 Bytes). Otherwise Event Manager will block the input of the image before Imsanity can do its job (message: image is too big).

    2. Imsanity settings
    There are three different settings for the size depending on where the image is uploaded. We have to set the 3rd fields let’s say to 1280 x 1280.

    Now all images uploaded in Event Manager (not exceeding the max size, see 1.) are resized to 1280 px.

    Hopefully this will help others too.

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