From 2b91c368ee57ed2657f3b33788bf240126d6ede3 Mon Sep 17 00:00:00 2001 From: Duskell Date: Tue, 17 Mar 2026 21:40:11 +0100 Subject: [PATCH] did some touch ups, now the maquee should be actually working --- .../class-partnerexpo-core-user-fields.php | 59 ++++- includes/mc-integrations/com-form.php | 2 - partnerexpo-core.php | 4 +- public/class-partnerexpo-core-public.php | 35 ++- public/css/comments.css | 7 +- public/css/register.css | 204 ++++++++++++++++++ .../partnerexpo-core-public-comments.php | 6 +- .../partnerexpo-core-public-register.php | 79 +++++++ 8 files changed, 368 insertions(+), 28 deletions(-) create mode 100644 public/css/register.css create mode 100644 public/partials/partnerexpo-core-public-register.php diff --git a/includes/class-partnerexpo-core-user-fields.php b/includes/class-partnerexpo-core-user-fields.php index a5f4b4d..da5022c 100644 --- a/includes/class-partnerexpo-core-user-fields.php +++ b/includes/class-partnerexpo-core-user-fields.php @@ -133,6 +133,54 @@ class Partnerexpo_Core_User_Fields extends Partnerexpo_Core { public function add_value_after_reg( $user_id ) { + if ( ! empty( $_POST['first_name'] ) ) { + update_user_meta( + $user_id, + 'first_name', + sanitize_text_field( $_POST['first_name'] ) + ); + } + + if ( ! empty( $_POST['last_name'] ) ) { + update_user_meta( + $user_id, + 'last_name', + sanitize_text_field( $_POST['last_name'] ) + ); + } + + if ( ! empty( $_POST['phone'] ) ) { + update_user_meta( + $user_id, + 'phone', + sanitize_text_field( $_POST['phone'] ) + ); + } + + if ( ! empty( $_POST['phone'] ) ) { + update_user_meta( + $user_id, + 'phone', + sanitize_text_field( $_POST['phone'] ) + ); + } + + if ( ! empty( $_POST['gdpr'] ) ) { + update_user_meta( + $user_id, + 'gdpr', + sanitize_text_field( $_POST['gdpr'] ) + ); + } + + if ( ! empty( $_POST['newsletter'] ) ) { + update_user_meta( + $user_id, + 'newsletter', + sanitize_text_field( $_POST['newsletter'] ) + ); + } + if ( ! empty( $_POST['company'] ) ) { update_user_meta( $user_id, @@ -140,7 +188,7 @@ class Partnerexpo_Core_User_Fields extends Partnerexpo_Core { sanitize_text_field( $_POST['company'] ) ); } - + if ( ! empty( $_POST['image_attachment_id'] ) ) { update_user_meta( $user_id, @@ -148,15 +196,8 @@ class Partnerexpo_Core_User_Fields extends Partnerexpo_Core { absint( $_POST['image_attachment_id'] ) ); } - } - function registration_form() { - ?> -

- -

- client ) { Logger::log(__("MiniCRM Kliens nem található, Szinkronizálás megszakítása!", 'partnerexpo-core'), [$com_id_text => $comment_id]); return; diff --git a/partnerexpo-core.php b/partnerexpo-core.php index 872856b..c8afb50 100644 --- a/partnerexpo-core.php +++ b/partnerexpo-core.php @@ -9,7 +9,7 @@ * Plugin Name: PartnerExpo Core * Plugin URI: https://partnerexpo.eu * Description: A PartnerEXPO oldal belső pluginja - * Version: 1.1.12 + * Version: 1.1.13 * Author: Juhász Levente * Author URI: https://github.com/Duskell/ * License: GPL-2.0+ @@ -23,7 +23,7 @@ if ( ! defined( 'WPINC' ) ) { die; } -define( 'PARTNEREXPO_CORE_VERSION', '1.1.12' ); +define( 'PARTNEREXPO_CORE_VERSION', '1.1.13' ); function activate_partnerexpo_core() { require_once plugin_dir_path( __FILE__ ) . 'includes/class-partnerexpo-core-activator.php'; diff --git a/public/class-partnerexpo-core-public.php b/public/class-partnerexpo-core-public.php index dd25ddb..c218039 100644 --- a/public/class-partnerexpo-core-public.php +++ b/public/class-partnerexpo-core-public.php @@ -44,6 +44,7 @@ class Partnerexpo_Core_Public { add_shortcode( 'partnerexpo_searchbox', [ $this, 'searchbox_shortcode' ] ); add_shortcode( 'partnerexpo_comment_section', [ $this, 'comments_shortcode' ] ); add_shortcode( 'partnerexpo_company_head', [ $this, 'company_head_shortcode' ] ); + add_shortcode( 'partnerexpo_register', [ $this, 'register_shortcode' ] ); } public function searchbox_shortcode() { @@ -74,6 +75,23 @@ class Partnerexpo_Core_Public { return ob_get_clean(); } + public function register_shortcode() { + wp_enqueue_style( $this->plugin_name . '-register-css' ); + + wp_enqueue_script( $this->plugin_name . '-business-page' ); // TODO for now it references the business page js + + // $atts = shortcode_atts( array( + // 'post_id' => get_the_ID(), + // ), $atts ); + + // // This variable is now scoped and ready for the partial + // $post_id = intval( $atts['post_id'] ); + + ob_start(); + include plugin_dir_path( __FILE__ ) . 'partials/partnerexpo-core-public-register.php'; + return ob_get_clean(); + } + public function company_head_shortcode() { wp_enqueue_style( $this->plugin_name . '-company-head-css' ); @@ -216,6 +234,14 @@ class Partnerexpo_Core_Public { 'all' ); + wp_register_style( + $this->plugin_name . '-register-css', + plugin_dir_url( __FILE__ ) . 'css/comments.css', + [], + $this->version, + 'all' + ); + wp_register_style( $this->plugin_name . '-multiselect-css', plugin_dir_url( __FILE__ ) . 'css/multiselect.css', @@ -247,15 +273,6 @@ class Partnerexpo_Core_Public { true ); - wp_register_script( - $this->plugin_name . '-comments-js', - plugin_dir_url( __FILE__ ) . 'js/comments.js', - [], - $this->version, - true - ); - - wp_register_script( $this->plugin_name . '-multiselect-js', plugin_dir_url( __FILE__ ) . 'js/multiselect.js', diff --git a/public/css/comments.css b/public/css/comments.css index c91892b..6e72e48 100644 --- a/public/css/comments.css +++ b/public/css/comments.css @@ -45,13 +45,14 @@ display: flex; width: max-content; will-change: transform; - animation: scrolling 20s linear infinite; + animation: scrolling 5s linear infinite; } .pexpo-core-comment-group { display: flex; gap: 100px; + padding-right: 100px; width: max-content; } @@ -110,7 +111,7 @@ display: flex; flex-direction: column; width: 100%; - max-width: 500px; + max-width: 600px; box-shadow: #00000020 0px 5px 20px 0; border-radius: 15px; padding: 20px; @@ -199,6 +200,6 @@ @keyframes scrolling { to { - transform: translate3d(-50%, 0, 0); + transform: translate3d(calc(-100% / var(--group-count)), 0, 0); } } \ No newline at end of file diff --git a/public/css/register.css b/public/css/register.css new file mode 100644 index 0000000..c91892b --- /dev/null +++ b/public/css/register.css @@ -0,0 +1,204 @@ +#pexpo-custom-comment-form { + width: 100%; + padding: 20px; + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.pexpo-core-comments-title { + text-align: center; + font-size: 2rem; + color: #333; + margin-top: 50px; +} + +.pexpo-core-comments-body:has(> .pexpo-core-comment-groups-wrapper) { + margin: 0 auto; + padding: 20px 0; + max-width: 1500px; + overflow: hidden; + -webkit-mask-image: linear-gradient( + to right, + transparent, + black 80px, + black calc(100% - 80px), + transparent + ); + + mask-image: linear-gradient( + to right, + transparent, + black 80px, + black calc(100% - 80px), + transparent + ); + + &:hover .pexpo-core-comment-groups-wrapper { + animation-play-state: paused; + } +} + +.pexpo-core-comment-groups-wrapper { + display: flex; + width: max-content; + will-change: transform; + animation: scrolling 20s linear infinite; +} + + +.pexpo-core-comment-group { + display: flex; + gap: 100px; + width: max-content; +} + +.pexpo-core-comment { + position: relative; + flex: 0 0 auto; + width: 500px; + color: #333; + border-radius: 24px; + box-shadow: rgba(0,0,0,0.1) 5px 5px 20px 0; + padding: 20px 20px 50px 20px; + min-height: 200px; +} + +.pexpo-core-comment-content { + font-style: italic; + font-size: 1.2rem; + max-height: 250px; + overflow-x: hidden; + overflow-y: auto; + margin-bottom: 50px; +} + +.pexpo-core-comment-said_by { + position: absolute; + bottom: 20px; + right: 20px; + display: flex; + align-items: center; + gap: 10px; + font-size: 1.2rem; + font-weight: bold; + color: #555; + padding-left: 30px; + max-height: 50px; + + & p { + margin: 0; + } +} + + +.comment-form:has(> .pexpo-core-com-form-wrapper) { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + margin-top: 100px; + + & .form-submit .submit { + border-radius: 10px; + } +} + +.pexpo-core-com-form-wrapper { + display: flex; + flex-direction: column; + width: 100%; + max-width: 500px; + box-shadow: #00000020 0px 5px 20px 0; + border-radius: 15px; + padding: 20px; + margin-top: 50px; + + & .pexpo-core-com-form-title { + margin: 0 0 20px 0; + font-size: 1.5rem; + color: #333; + text-align: center; + } + + & .pexpo-core-com-field { + display: flex; + flex-direction: column; + gap: 5px; + + & label { + font-weight: bold; + color: #555; + } + + & input, & textarea { + padding: 10px; + border-radius: 10px; + border: none; + background-color: #00000010; + font-size: 1rem; + resize: vertical; + + &:focus { + outline: none; + background-color: #00000020; + } + } + } +} + +.pexpo-core-com-consent { + display: flex; + flex-direction: column; + gap: 10px; + justify-content: left; + font-size: 1.3rem; + + & div { + display: flex; + gap: 5px; + + & input[type="checkbox"] { + width: auto; + transform: scale(1.2); + + &:focus { + outline: none; + } + } + } +} + +.pexpo-core-no-comments { + text-align: center; + font-size: 1.2rem; + color: #777; + margin: 50px 0; +} + +.pexpo-core-submit-wrapper { + display: flex; + justify-content: center; + margin: 40px; + + & .submit { + background-image: linear-gradient(rgb(178, 34, 34) 21%, rgb(149, 0, 0) 87%); + color: white; + border: none; + border-radius: 15px; + padding: 10px 20px; + font-size: 1rem; + cursor: pointer; + transition: background-color 0.3s ease; + + } +} + + +@keyframes scrolling { + to { + transform: translate3d(-50%, 0, 0); + } +} \ No newline at end of file diff --git a/public/partials/partnerexpo-core-public-comments.php b/public/partials/partnerexpo-core-public-comments.php index 73ca869..af6ab9d 100644 --- a/public/partials/partnerexpo-core-public-comments.php +++ b/public/partials/partnerexpo-core-public-comments.php @@ -26,12 +26,12 @@ $complience_url = "rendszerepito.hu/adatkezeles"; ]); if ( ! empty( $comments ) ) { - echo '
'; if ( count( $comments ) < 3 ) { - $groups = 6 / count( $comments ); + $groups = 4 / count( $comments ); } else { $groups = 2; } + echo '
'; for ($i = 0; $i < $groups; $i++) { echo '