Automatically export backlinks from template edit with Notepad?

Good morning,

Im building some kind of automation through python and the thing that bugs me is that i have to navigate to Edit > Options > Automatically export… and select a new location where i want to export the verified backlinks.
Is there any way to set the automated export path using Edit with Notepad and some kind of property that handles the path?

EDIT:
More data… i know that i can export the template anytime i want but i really want it to be automatically exported so i can watch a folder looking for the report of backlinks (in case i want to do another tier or whatever)

Thank you so much!

Automatically set x=0, after each input/output ? ($AfterEachInputOutput)

Is it possible to do something that I want, after each input/output automatically and silently?
I am looking for a feature like $ AfterEachInputOutput in the following code :

Example : to set variable x to 0 after each output

In[1] $  AfterEachInputOutput=(x=0;) ---> x=0 automatically and silently (not important because this is a starting step) In[2] x=2;x+2 Out[2] 4 ---> x=0 automatically and silently In[3] If[x=0,100,-100] Out[3] 100 ---> x=0 automatically and silently In[4] x=1;y=1; ---> x=0 automatically and silently In[5] x+10 Out[5] 10 ---> x=0 automatically and silently 

I have tried

$  Post=(x=0;) 

or

$  Preprint=(x=0;) 

But it didn’t work well.

How to select selected Html Drop Down and paste it automatically into a Contact Form

first of all its my first question in Stackoverflow, because im hardstuck in a problem right now. So hopefully someone can help me with that.

The project: I am building a Product Configurator for a Website. The main goal is, that customers can configurate their product and the options they selected are automatically placed in a Contact Form.

I am working on WordPress with Elementor. The Plugin I used for the configurator is: "Woocommerce Extra Product options"

My Problem: I need to get the ID’s of the specific selected containers and fill the text of the containers automatically in the Form down below.

The site: https://soundgreets.com/produkt/konfigurator/

Does anyone know how i can do this? Maybe in a .php file? Or in elementor? I did some massive CSS on the site, so that it looks like it is right now. This Selector is to select all containers of the Dropdowns.

.tc-extra-product-options .cpf-type-select .tmcp-field-wrap label.fullwidth select{ color: red; } What i also tried is to use Elementors Html Code-widget to get the variable of the specific Id of a container.

This didnt work: the output is "undefined"

var e = document.getElementById(“tmcp_select_160362915b5ef2”); var strUser = e.options[e.selectedIndex].text; document.write(strUser) I hope someone has an idea on this.

thanks in advance

Berkan

PS: The site could look a bit messy i am sorry for that

Automatically add Link Images to Posts in WordPress if has not linked before or has specified class

I use this code to Automatically add Link Images to Posts in WordPress.

function wpguy_linked_image($  content){ if (is_single() === TRUE){ $  searchfor = '/(<img[^>]*\/>)/';   $  replacewith = '<a target="_blank" href="'.get_permalink().'">$  1</a>'; { $  content = preg_replace($  searchfor, $  replacewith, $  content); } } return $  content; } add_filter('the_content', 'wpguy_linked_image'); 

How can I add a condition that if the img tags are already linked or have class="no link me" , they will be excluded from linking?

script for update game resources automatically in MySQL database

would you please tell me how I can update my MySQL database automatically when some event finished? for example when player send some resources to another player there is time should be appearing and when a time finished. the database should be updated automatically .even if the player was offline or browser was closed.

thanks for your time

Best Regards

Repmgr : It automatically promotes to new master but other standby stopped

I’m trying to setup postgre with repmgr and here is the rsult

enter image description here

The scenario is,

  1. i tried to spinup 1 primary and 2 standby.
  2. then i stop the primary so the postgres-2 got promoted.
  3. Unfortunately the postgres-3 got disconnected due to some reason but here is the error log enter image description here

It looks like it was able to connect but the postgres restared and didn’t come back. 4. I spin up another standby but the master it was pointing is the old one which is postgres-1 That might be the reason why it is saying !running and still primary even if the actual primary is postgres-2.

My question is how can i make other standby not disconnected every time i promoted (automatically due to failure etc.) a new primary?

here is my repmgr.conf

NET_IF=`netstat -rn | awk '/^0.0.0.0/ {thif=substr($  0,74,10); print thif;} /^default.*UG/ {thif=substr($  0,65,10); print thif;}'` NET_IP=`ifconfig $  {NET_IF} | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`   HOSTNAME='postgres-'$  {my_node}  cat<<EOF > /etc/repmgr.conf     node_id=$  {my_node}     node_name=$  HOSTNAME     conninfo='host=$  {NET_IP} user=repmgr password=repmgr dbname=repmgr connect_timeout=2'     data_directory='$  {PGDATA}'      log_level=INFO     log_facility=STDERR     log_status_interval=300          pg_bindir='/usr/lib/postgresql/10/bin'     use_replication_slots=1          failover=automatic     promote_command='repmgr standby promote'     follow_command='repmgr standby follow -W' EOF 

Also, I’m running using docker extending the official postgres docker image

FROM postgres:10  RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main 10" \           >> /etc/apt/sources.list.d/pgdg.list  # RUN ln -s /home/postgres/repmgr.conf /etc/repmgr.conf  RUN apt-get update && apt-get install wget -y RUN apt-get install net-tools -y RUN apt-get update; apt-get install -y git make postgresql-server-dev-10 libpq-dev postgresql-10-repmgr repmgr-common  #RUN wget -c https://repmgr.org/download/repmgr-5.1.tar.gz -O - | tar -xz  RUN touch /etc/repmgr.conf; \     chown postgres:postgres /etc/repmgr.conf  ENV PRIMARY_NAME=localhost ENV REPMGR_USER=repmgr ENV REPMGR_DB=repmgr ENV REPMGR_PASSWORD=repmgr  COPY postgresql.replication.conf /tmp/postgresql.replication.conf  COPY scripts/*.sh /docker-entrypoint-initdb.d/ 

Lastly, here is how i check if should be register as primary or standby

PGHOST=$  {PRIMARY_NAME}  installed=$  (psql -qAt -h $  {PGHOST} repmgr -c "SELECT 1 FROM pg_tables WHERE tablename='nodes'")  if [ "$  {installed}" != "1" ]; then     echo "Registering as PRIMARY SERVER"     repmgr primary register else     my_node=$  (grep node_id /etc/repmgr.conf | cut -d= -f 2)     is_reg=$  (psql -qAt -h $  {PGHOST} repmgr -c "SELECT 1 FROM repmgr.nodes WHERE node_id=$  {my_node}")      if [ "$  {is_reg}" != "1" ] && [ $  {my_node} -gt 1 ]; then         echo "Registering as STANDBY SERVER"          pg_ctl -D $  {PGDATA} stop -m fast         rm -Rf $  {PGDATA}/*         repmgr -h $  {PRIMARY_NAME} -d repmgr standby clone --fast-checkpoint         pg_ctl -D $  {PGDATA} start &         sleep 1         repmgr -h $  {PRIMARY_NAME} -d repmgr standby register         fi fi 

here is my update for the postgres.conf

 sed -i "s/#*\(shared_preload_libraries\).*/='repmgr'/;" $  {PGDATA}/postgresql.conf sed -i "s/#port = 5432/port = 5432/g" $  {PGDATA}/postgresql.conf sed -i "s/#max_wal_senders/max_wal_senders/g"  $  {PGDATA}/postgresql.conf sed -i "s/#wal_level/wal_level/g"  $  {PGDATA}/postgresql.conf sed -i "s/#max_replication_slots/max_replication_slots/g"  $  {PGDATA}/postgresql.conf sed -i "s/#hot_standby/hot_standby/g"  $  {PGDATA}/postgresql.conf  sed -i "s/#archive_mode = off/archive_mode = on/g"  $  {PGDATA}/postgresql.conf  echo "archive_command = '/bin/true'" >>  $  {PGDATA}/postgresql.conf 

I’m using postgres:10 and repmgr-5.0

hope someone could help me on this. Thanks,

Content generator : Photos : automatically rename + Retrive same freepik

Hello, Sven,

Is it possible to automatically rename the title of the photos by the inserted keywords or by a relation with the article?

Is it possible for you to select photos related to our recovery theme / article ?

Example for me, marketing
Is it possible to retrieve photos by keywords on Freepik (by indicating his account identifiers) because this site is free or almost free or other photo sites but good photos ?
thank you for a great software

Downloadable Product Permission Issue – Grant Access automatically

When I order downloadable products, I can’t see them in my downloads page. When I checked the order details in the admin side, I saw that the downloadable product permissions part is blank even if the status of my order is completed.

I used paypal sandbox for testing. The order status was initially on-hold, and then I changed it to completed.

My functions.php:

function has_bought_item( $  product_id ) { global $  wpdb;  if( ! is_user_logged_in() )     return false;  $  current_user = wp_get_current_user();  $  statuses      = array_map( 'esc_sql', wc_get_is_paid_statuses() );  // Count the number of products $  count_query = $  wpdb->get_var( "     SELECT COUNT(woim.meta_value) FROM {$  wpdb->prefix}posts AS p     INNER JOIN {$  wpdb->prefix}postmeta AS pm ON p.ID = pm.post_id     INNER JOIN {$  wpdb->prefix}woocommerce_order_items AS woi ON p.ID = woi.order_id     INNER JOIN {$  wpdb->prefix}woocommerce_order_itemmeta AS woim ON woi.order_item_id = woim.order_item_id     WHERE p.post_status IN ( 'wc-" . implode( "','wc-", $  statuses ) . "' )     AND pm.meta_key = '_customer_user' AND pm.meta_value = $  current_user->ID     AND woim.meta_key IN ( '_product_id', '_variation_id' )     AND woim.meta_value = $  product_id " ); // Return true boolean value if count is higher than 0, if not false return $  count_query > 0 ? true : false; }  // Shop and archives - Replace add to cart ajax button to a custom linked button add_filter( 'woocommerce_loop_add_to_cart_link', 'replace_loop_add_to_cart', 20, 2 ); function replace_loop_add_to_cart( $  html, $  product ) { if( has_bought_item( $  product->get_id() ) ) {          $  text = __("Download", "woocommerce");          $  user_id = get_current_user_id();     $  downloads = wc_get_customer_available_downloads($  user_id);      if (!empty($  downloads)) {         foreach ($  downloads as $  download) {             if ($  download['product_id'] === $  product->get_id()) {                 $  link = $  download['download_url'];             }         }     }      $  html = '<a href="' . $  link . '" class="button alt add_to_cart_button">' . $  text . '</a>'; } return $  html; }  function add_completed_status_to_download_permission($  data, $  order) { if ( $  order->has_status( 'completed' ) ) { return true; } return $  data; } add_filter('woocommerce_order_is_download_permitted', 'add_completed_status_to_download_permission', 10, 2); 

My system status report:

### WordPress Environment ### WordPress address (URL): https://stg.myscrapchick.com Site address (URL): https://stg.myscrapchick.com WC Version: 4.3.1 REST API Version: ✔ 1.0.10 WC Blocks Version: ✔ 2.7.2 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 1.3.1 Log Directory Writable: ✔ WP Version: 5.4.2 WP Multisite: – WP Memory Limit: 2 GB WP Debug Mode: – WP Cron: – Language: en_US External object cache: –  ### Server Environment ###  Server Info: Apache PHP Version: 7.3.17 PHP Post Max Size: 2 GB PHP Time Limit: 600 PHP Max Input Vars: 16384 cURL Version: 7.29.0 NSS/3.44  SUHOSIN Installed: – MySQL Version: 5.5.5-10.2.31-MariaDB Max Upload Size: 2 GB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔  ### Database ###  WC Database Version: 4.3.1 WC Database Prefix: wp_ Total Database Size: 4286.03MB Database Data Size: 2622.78MB Database Index Size: 1663.25MB wp_woocommerce_sessions: Data: 0.54MB + Index: 0.02MB + Engine MyISAM wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_downloadable_product_permissions: Data: 196.98MB + Index: 184.73MB + Engine MyISAM wp_woocommerce_order_items: Data: 80.96MB + Index: 44.21MB + Engine MyISAM wp_woocommerce_order_itemmeta: Data: 643.68MB + Index: 440.29MB + Engine MyISAM wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_actions: Data: 1.55MB + Index: 0.58MB + Engine MyISAM wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_actionscheduler_logs: Data: 1.14MB + Index: 0.91MB + Engine MyISAM wp_commentmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_comments: Data: 2.17MB + Index: 1.23MB + Engine MyISAM wp_email_log: Data: 152.56MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ninja_table_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 6.19MB + Index: 0.21MB + Engine MyISAM wp_postmeta: Data: 1251.84MB + Index: 837.68MB + Engine MyISAM wp_posts: Data: 140.07MB + Index: 45.37MB + Engine MyISAM wp_ppgc_categories: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_ppgc_customers: Data: 2.09MB + Index: 2.91MB + Engine MyISAM wp_ppgc_orders: Data: 28.50MB + Index: 22.76MB + Engine MyISAM wp_ppgc_products: Data: 0.18MB + Index: 0.26MB + Engine MyISAM wp_simple_history: Data: 7.52MB + Index: 4.03MB + Engine InnoDB wp_simple_history_contexts: Data: 34.56MB + Index: 26.08MB + Engine InnoDB wp_termmeta: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp_terms: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp_term_relationships: Data: 0.21MB + Index: 0.42MB + Engine MyISAM wp_term_taxonomy: Data: 0.02MB + Index: 0.01MB + Engine MyISAM wp_tinvwl_analytics: Data: 1.52MB + Index: 0.36MB + Engine InnoDB wp_tinvwl_items: Data: 0.44MB + Index: 0.00MB + Engine InnoDB wp_tinvwl_lists: Data: 0.14MB + Index: 0.00MB + Engine InnoDB wp_usermeta: Data: 56.78MB + Index: 45.81MB + Engine MyISAM wp_users: Data: 2.85MB + Index: 2.79MB + Engine MyISAM wp_wcpv_commissions: Data: 0.30MB + Index: 0.00MB + Engine InnoDB wp_wcpv_per_product_shipping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_notes: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_customer_lookup: Data: 0.19MB + Index: 0.14MB + Engine MyISAM wp_wc_download_log: Data: 0.60MB + Index: 0.50MB + Engine MyISAM wp_wc_order_coupon_lookup: Data: 0.04MB + Index: 0.06MB + Engine MyISAM wp_wc_order_product_lookup: Data: 0.81MB + Index: 0.60MB + Engine MyISAM wp_wc_order_stats: Data: 0.16MB + Index: 0.14MB + Engine MyISAM wp_wc_order_tax_lookup: Data: 0.05MB + Index: 0.05MB + Engine MyISAM wp_wc_product_meta_lookup: Data: 0.16MB + Index: 0.20MB + Engine MyISAM wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wfblockediplog: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfconfig: Data: 1.39MB + Index: 0.00MB + Engine InnoDB wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilemods: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_wfhits: Data: 1.52MB + Index: 0.28MB + Engine InnoDB wp_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfknownfilelist: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wflogins: Data: 0.47MB + Index: 0.16MB + Engine InnoDB wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfstatus: Data: 0.13MB + Index: 0.09MB + Engine InnoDB wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB  ### Post Type Counts ###  attachment: 8211 ctct_forms: 3 ctct_lists: 5 custom_css: 2 customize_changeset: 36 elementor_library: 20 nav_menu_item: 9 page: 18 post: 160 product: 2533 revision: 410 shop_coupon: 19 shop_order: 577585 shop_order_refund: 34  ### Security ###  Secure connection (HTTPS): ✔ Hide errors from visitors: ✔  ### Active Plugins (26) ###  ManageWP - Worker: by GoDaddy – 4.9.6 WC Thanks Redirect: by Nitin Prakash – 2.2 – Installed version not tested with active version of WooCommerce 4.3.1 Better Search Replace: by Delicious Brains – 1.3.3 Classic Editor: by WordPress Contributors – 1.5 Constant Contact Forms for WordPress: by Constant Contact – 1.8.5 Login/Signup Popup ( Inline Form + Woocommerce ): by XootiX – 2.0 – Installed version not tested with active version of WooCommerce 4.3.1 Elementor Pro: by Elementor.com – 2.9.5 Elementor: by Elementor.com – 2.9.13 Email Log: by Sudar – 2.3.2 Site Kit by Google: by Google – 1.10.0 Grant download permissions for past WooCommerce orders: by Claudio Sanches – 0.0.2 – Installed version not tested with active version of WooCommerce 4.3.1 Insert Headers and Footers: by WPBeginner – 1.4.5 Kadence WooCommerce Email Designer: by Kadence WP – 1.4.2 – Installed version not tested with active version of WooCommerce 4.3.1 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.3 Remove Widget Titles: by Stephen Cronin – 1.0 Simple CSS: by Tom Usborne – 1.1.1 Simple History: by Pär Thernström – 2.34.0 Smoother: by Merkulove – 1.0.5 User Menus: by Code Atlantic – 1.2.3 WP Sheet Editor - WooCommerce Products (Premium): by WP Sheet Editor – 1.5.0 – Installed version not tested with active version of WooCommerce 4.3.1 Woo Title Limit: by Dima W. – 2.0.0 – Installed version not tested with active version of WooCommerce 4.3.1 WooCommerce Product Vendors: by WooCommerce – 2.1.32 – Installed version not tested with active version of WooCommerce 4.3.1 WooCommerce: by Automattic – 4.3.1 Wordfence Security: by Wordfence – 7.4.8 WordPress Importer: by wordpressdotorg – 0.7 WP Mail SMTP: by WPForms – 2.1.1  ### Inactive Plugins (5) ###  Already In Cart / Already Purchased: by MyThemeShop – 1.0.2 – Installed version not tested with active version of WooCommerce 4.3.1 TI WooCommerce Wishlist: by TemplateInvaders – 1.20.5 – Installed version not tested with active version of WooCommerce 4.3.1 WooCommerce Products Layout for Elementor: by AD-Theme – 1.0 – Installed version not tested with active version of WooCommerce 4.3.1 WP DataTable: by Samuel Behan – 0.2.5 WP Super Cache: by Automattic – 1.7.1  ### Must Use Plugins (2) ###  ManageWP - Worker Loader: by GoDaddy – Nexcess Managed Apps: by Nexcess – 1.9.1  ### Settings ###  API Enabled: ✔ Force SSL: – Currency: USD ($  ) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)  Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)  Connected to WooCommerce.com: –  ### WC Pages ###  Shop base: #5 - /shop/ Cart: ❌ Page does not contain the shortcode. Checkout: ❌ Page does not contain the shortcode. My account: ❌ Page does not contain the shortcode. Terms and conditions: #577437 - /terms-of-use-copyright/  ### Theme ###  Name: GeneratePress Child Version: 0.1 Author URL: https://tomusborne.com Child Theme: ✔ Parent Theme Name: GeneratePress Parent Theme Version: 2.4.2 Parent Theme Author URL: https://tomusborne.com WooCommerce Support: ✔  ### Templates ###  Overrides: generatepress_child/woocommerce/order/order-downloads.php generatepress_child/woocommerce/single-product/add-to-cart/simple.php  ### Action Scheduler ###  Complete: 6,179 Oldest: 2020-05-26 17:41:33 -0400 Newest: 2020-08-06 16:19:38 -0400 

I know we can manually grant access per order but access should be granted automatically, right? any help is highly appreciated.