Plugin Directory

Changeset 3448443


Ignore:
Timestamp:
01/28/2026 07:43:23 AM (2 months ago)
Author:
curato
Message:

Erweiterung Meta Title und Description für Social Media, Individuelle Description für Ausgabe von Content als statische Seite

Location:
travelmanager-buchungssoftware
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • travelmanager-buchungssoftware/.gitignore

    r3430878 r3448443  
    2424tmp/
    2525*.log
     26.svn/wc.db
  • travelmanager-buchungssoftware/trunk/ajax/target.php

    r3384018 r3448443  
    238238            if(!empty($row["infotext_api"]) && strlen($row["infotext_api"])>10){
    239239                $infotext = $row["infotext_api"];
    240                 $Ausgabe.="<div class='wp-block-column'><a href='{$row["url"]}' target='_blank' linie='".rawurlencode($row["linie_bezeichnung_internet"])."' infotext='".rawurlencode($infotext)."' onclick='showDialogListCategorie(this); return false;'>{$dialog["more_info"]}</a></div>";
     240                $Ausgabe.="<div class='wp-block-column'><a href='{$row["url"]}' target='_blank' linie='".rawurlencode($row["linie_bezeichnung_internet"])."' infotext='".rawurlencode($infotext)."' onclick='showDialogListCategorie(this); return false;'>{$dialog["jetzt_buchen_mehr_infos"]}</a></div>";
    241241            }
    242242            else{
  • travelmanager-buchungssoftware/trunk/buchung.component.php

    r3430878 r3448443  
    1414//Meta Title und Description im Cache speichern
    1515if(!empty($json["description"]) AND !empty($json["title"]) AND function_exists("tm_set_meta_data") AND function_exists("tm_save_meta_cache_url")){
    16     tm_set_meta_data($json["title"], $json["description"]);
    17     tm_save_meta_cache_url($json["title"], $json["description"]);
     16
     17    if(!empty($json["description_meta"])){
     18        $json["description"] = $json["description_meta"];
     19    }
     20
     21    tm_set_meta_data($json["title"], $json["description"], $json["titel_social_media"], $json["description_social_media"]);
     22    tm_save_meta_cache_url($json["title"], $json["description"], $json["titel_social_media"], $json["description_social_media"]);
    1823}
    1924
  • travelmanager-buchungssoftware/trunk/index.php

    r3433704 r3448443  
    44Plugin URI: https://travelmanager.de/support/wordpress/
    55Description: Inhalte aus der Travelmanager, Tickyt Buchungssoftware und Gastrozack Gastrokasse direkt in WordPress einbinden
    6 Version: 22.21
     6Version: 22.22
    77Author: Philipp Stäbler
    88Text Domain: travelmanager
  • travelmanager-buchungssoftware/trunk/js/fahrtfinderv2.js

    r3337228 r3448443  
    251251
    252252    var zielseite = vAddTarget+"?relation="+row["external_product_key"]+"&date="+viewDate+"&ref="+ref+"#booknow";
    253     var link = $("<div class='buchen_button'><a href='"+zielseite+"'>"+dialoge["more_info"]+"</a></div>");
     253    var link = $("<div class='buchen_button'><a href='"+zielseite+"'>"+dialoge["jetzt_buchen_mehr_infos"]+"</a></div>");
    254254    $(cell).append(link);
    255255
  • travelmanager-buchungssoftware/trunk/libs/metatitle_desc.php

    r3337228 r3448443  
    33
    44// === globale Meta ===
    5 global $tm_meta_title, $tm_meta_desc;
     5global $tm_meta_title, $tm_meta_desc,$tm_meta_desc_social_media,$tm_meta_title_social_media;
    66$tm_meta_title = '';
    77$tm_meta_desc  = '';
     8$tm_meta_desc_social_media  = '';
     9$tm_meta_title_social_media  = '';
    810
    9 function tm_set_meta_data($title, $description) {
    10     global $tm_meta_title, $tm_meta_desc;
     11function tm_set_meta_data($title, $description,$title_social_media="", $description_social_media="") {
     12    global $tm_meta_title, $tm_meta_desc,$tm_meta_title_social_media, $tm_meta_desc_social_media;
    1113    $tm_meta_title = $title;
    1214    $tm_meta_desc  = $description;
     15    $tm_meta_title_social_media = $title_social_media;
     16    $tm_meta_desc_social_media  = $description_social_media;
    1317}
    1418
     
    3034
    3135// === speichern für die aktuelle Seite ===
    32 function tm_save_meta_cache_url($title, $desc) {
     36function tm_save_meta_cache_url($title, $desc,$title_social_media="", $description_social_media="") {
    3337    $url = tm_get_full_current_url();
    3438    $key = tm_meta_cache_key_url($url);
     
    3640        'title' => $title,
    3741        'desc'  => $desc,
     42        'title_social_media' => $title_social_media,
     43        'desc_social_media'  => $description_social_media,
    3844    ];
    3945    // 1 Monat
     
    5359
    5460    if (is_array($meta) && isset($meta['title']) && isset($meta['desc'])) {
    55         tm_set_meta_data($meta['title'], $meta['desc']);
     61        tm_set_meta_data($meta['title'], $meta['desc'], $meta['title_social_media'], $meta['desc_social_media']);
    5662    }
    5763});
     
    6672// Meta Description separat im head ausgeben
    6773add_action('wp_head', function() {
    68     global $tm_meta_desc;
     74    global $tm_meta_desc, $tm_meta_title_social_media, $tm_meta_desc_social_media;
    6975    if (!empty($tm_meta_desc)) {
    7076        $tm_meta_desc = mb_substr($tm_meta_desc, 0, 160); // max. 160 Zeichen
    7177        echo '<meta name="description" content="' .  esc_attr(strip_tags($tm_meta_desc)) . '">' . "\n";
    7278    }
     79
     80    if(!empty($tm_meta_title_social_media)){
     81        $tm_meta_title_social_media = mb_substr($tm_meta_title_social_media, 0, 60); // max. 60 Zeichen
     82        echo '<meta property="og:title" content="' .  esc_attr(strip_tags($tm_meta_title_social_media)) . '">' . "\n";
     83    }
     84
     85    if(!empty($tm_meta_desc_social_media)){
     86        $tm_meta_desc_social_media = mb_substr($tm_meta_desc_social_media, 0, 160); // max. 160 Zeichen
     87        echo '<meta property="og:description" content="' .  esc_attr(strip_tags($tm_meta_desc_social_media)) . '">' . "\n";
     88    }
     89
    7390}, 1);
  • travelmanager-buchungssoftware/trunk/sitemap.component.php

    r3428847 r3448443  
    135135    $key  = $relation["external_product_key"];
    136136    if ($relation["station_start"] == $relation["station_stop"]) {
    137         $name = $linie["bezeichnung"];
     137        if(isset($linie["abweichende_url"]) AND !empty($linie["abweichende_url"]))
     138        {
     139            $name = $linie["abweichende_url"];
     140        }
     141        else{
     142            $name = $linie["bezeichnung"];
     143        }
    138144    } else {
    139145        $name = $relation["station_start"] . ' ' . $relation["station_stop"];
Note: See TracChangeset for help on using the changeset viewer.