Hide Past Events from Displaying – AIT Themes Events & Events Pro Plugin

I am using AIT Themes City Guide and trying to configure the Events list to make sense. The theme plugin does not age out old events. I assumed this would be the bare minimum a plugin claiming to be an Event manager would offer. However, it seems I have to make this happen myself. Before you suggest it, the theme developer is not likely to be helpful. Despite having a full license, they have no plans to add this simple feature.

So, I would like to code this myself and the code would have universal benefits. Essentially, events in this theme are "formatted posts". So, writing code to hide past events could be as simple as the code I found on this page:

How can I hide posts that are over 2 years old

Here is the code suggested:

add_action( 'pre_get_posts', 'filter_old_posts' ); function filter_old_posts($  query){     if( !is_admin() && $  query->is_main_query()){          add_filter('posts_where', $  callback = function( $  where = ''){              $  where .= " AND post_date > '" . date('Y-m-d', strtotime('-2 years')) . "'";               return $  where;          });          add_filter('getarchives_where', $  callback );     } } 

How can I modify the above to filter out posts older than the current date? How can I filter out just a single category?

Thank you!!

How to create metrics of specific events in Google Analytics or Data Studio?

On my site, I am firing an event when the user lands on a specific URL. I’m firing another event when the user clicks on a button on that specific page.

When I go to Analytics, I can see the Total Events + Unique events for each dimension (specific page view, button click on specific page).

How is it possible to create a new metric (I assume a calculated metric) to display the Unique Events as metrics for any dimension I’d like to use in a Table?

Here is an example of what I have now:

Event Label Total Events Unique Events
specific_page_views 100 50
specific_page_clicks 20 10

…and what I’d like to achieve:

Source Specific Unique Page Views Specific Unique Page Clicks Specific Page CTR %
(direct) 30 8 26.67
google 15 2 13.34
bing 5 0 0

I have been searching for an answer for many days now and can’t seem to find the answer to this simple question. I will want to create multiple of these Metrics, not just 2.

Is this actually possible with Google Analytics or Google Data Studio? (I’m planning to use Google Data studio)

Why does the triangle rendered by OpenGL ES 2.0 , with SDL 2.0 context, vanishes after a single render, if events are not polled?

I was experimenting with OpenGL ES 2.0 and being new to OpenGL, I was trying to render a simple triangle. But I was shocked to see that, if I do not call SDL_PollEvent(...) after glDrawArrays(...) in the game loop, I see the triangle render on the screen for a split second and then it vanishes altogether ! But, if I call SDL_PollEvent then everything is fine ! Can anyone explain to me the reason for this abnormal behavior???

However, this is the interesting part of my code:

This code works perfectly, if I uncomment the commented block of code:

uint32_t vbo;  glGenBuffers(1, &vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);  glEnableVertexAttribArray(pos); glVertexAttribPointer(pos, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), (void*)0);  bool run = true; SDL_Event e; while (run) {     glDrawArrays(GL_TRIANGLES, 0, 3);   SDL_GL_SwapWindow(window);   /*while(SDL_PollEvent(&e)) {       switch(e.type)       {            case SDL_QUIT:                 run = false;                 break;        } } */ 

}

Vertex Shader:

precision mediump float;  attribute vec3 pos; void main() {     gl_Position = vec4(pos.xyz, 1.0);  } 

Fragment Shader:

precision mediump float;  void main() {       gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);  } 

Every help will be greatly appreciated, Thankyou everyone in advance !

If I ready a action (spell) in response to a companion’s attack, what is a fair GM rulling over the order of events?

In our campaign, I have a cleric who wished to use Ready an Action as his move. His idea behind this was that he wanted to ready Guiding Bolt and the condition he set was that, when one of the player (fighter) attacked a creature (one of 2 trolls), he would release the bolt beforehand. Therefore the figther would have advantage on her attack if the Guiding Bolt hit first.

I ruled that the fighter hit first, but I’m not so sure now – and feel like I was unfair in my ruling, maybe.

I can see both points of view:

  1. If I was the cleric readying my spell, I would cast the spell as soon as I noticed my fighter’s companion intention to attack a creature.

  2. But, also if I’m the fighter and I’m 5′ away from a creature, maybe my attack would land first, before the Guiding Bolt.

I would like some RAW guidance on this please. But, if not explicitly available, then a response with lived experience of a GM on a similar ruling to do with resolving oder of events.

How do I hide the event description within template of The Events Calenar using Ultimate Member shortcode?

OK, so the goal is to hide the event description with Ultimate Member shortcode [um_loggedin].

I tried doing echo do_shortcode but it’s not working…

This is the code I used within wp-content/themes/hello-elementor/tribe-events/single-event.php:

<?php echo do_shortcode('[um_loggedout]'."Sorry, but only loggedin users are allowed to access the details".'[/um_loggedout]');?>

<?php echo do_shortcode('[um_loggedin]'.the_content().'[/um_loggedin]');?>

Google Analytics wrongly records events when using Internet Explorer

I’m a web designer and came across an odd finding. On our website, we track our contact form submissions using Google Tag Manager & Google Analytics.

I noticed that every once in a while the number of submissions recorded by Google Analytics is higher than the actual amount of messages we received.

So, according to Analytics, we should have received 5 submissions last week – when in fact, we just received 2 messages. (From this page: https://avinton.com/services/avinton-data-platform/)

The tracking setup seems to be correct (and has been correctly tracking submissions for over a year). So, I did a lot of digging and finally found out that all those "ghost" submissions were visitors using Internet Explorer. In December, we even had 2 recorded form submissions in Analytics, originating from pages without ANY contact forms on them! (such as https://avinton.com/blog/2017/10/clustering/)

While Internet Explorer totally messes up the page’s CSS, I successfully received my own test message. So the form seems to work, at least in my IE version.

So, does that mean some version of Internet Explorer wrongly fires events? Or did visitors actually try to send us a message which didn’t get through? Any suggestions on what to look at next are greatly appreciated!

What events are depicted in these frescos from the “Shield of the Hidden Lord” DMsGuild module (which expands on the Descent into Avernus adventure)?

There is an unofficial module on DMsGuild named "Shield of the Hidden Lord" by M.T. Black – who is one of the writers on the official adventure Baldur’s Gate: Descent into Avernus, so I assume its lore is correct.

Pages 7-8 of the "Shield of the Hidden Lord" PDF include the descriptions of 4 frescos on the walls of area T2. These paintings reportedly depict Gargauth (presumably different key aspects or events relating to Gargauth).

What events or aspects exactly are depicted in each of the following frescos?

First Fresco. A handsome sage in amber robes sits on a throne with a pile of scrolls next to him. He is speaking to a group of kings and queens, who listen to him with interest and respect.

  • I suppose this is just an illustration of Gargauth’s charming abilities. Is that the only meaning?

Second Fresco. The sage in amber robes looks at a city in the background. The city is burning, and soldiers fight in its streets. In the foreground are two snakes, twisted together.

  • What city is depicted here?
  • Who are the soldiers, and what organisations do they belong to? Why do they fight?
  • What is the meaning of these snakes?

Third Fresco. The sage in amber robes rides a blue dragon over a dark forest. In a clearing in the forest is a unicorn with a broken, twisted horn.

  • I found this dragon’s name: Rathguul. Is that right?
  • Why is there a unicorn?
  • A twisted horn is Gargauth’s holy symbol. But the module says that Gargauth’s holy symbol is a Knight of the Shield badge. What is right here?

Fourth Fresco. The sage in amber robes wields a rapier and fights a shadowy figure in dark armor. The shadowy figure wears a jeweled gauntlet.

  • Why a rapier?
  • Who is the figure? Bhaal?

Calculate the total on events with two time conditions

I have a table in BigQuery that looks something like this:

    schema = [         bigquery.SchemaField('timestamp', 'TIMESTAMP', mode='REQUIRED', description='Data point timestamp'),         bigquery.SchemaField('event_id', 'STRING', description='EventID'),         [...]     ] 

The table has a fairly large dataset, and I’m trying to find write an efficient query that returns the number of events that happened in the last 24 hours but also within the last N days. That is, two different records with different conditions but the same event_id. I don’t care so much about the actual event_id, but rather the distribution.

Ideally, the query would return something like this:

7_days: 20 30_days: 15 60_days: 7 

If it’s impossible to do this in pure SQL, I also have Pandas available at my disposal.