Alias anzeigen?

Hier bekommst Du deutschsprachigen Support. Keine Fehlermeldungen oder Erweiterungswünsche bitte!
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

Alias anzeigen?

Post by spin_doctor »

Hallo,

gibt es vielleicht eine Art replacement_tag mit sich der geneigte Admin den Seiten-Alias oder Seiten-Titel anzeigen lassen kann?

Viele Grüße

doc
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,

hier drei Funktionen: bitte jeweils als Datei abspeichern im Ordner frontend_render

Datei: reptag_pagetitle.php
Aufruf: {PAGETITLE}

Code: Select all

<?php
// PAGETITLE replacement
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------

if( ! (strpos($content["all"],'{PAGETITLE}')===false)) {
   $content["all"] = str_replace('{PAGETITLE}', $content["struct"][$content["cat_id"]]
["acat_name"], $content["all"]);
} ?>
Datei: reptag_article_title.php
Aufruf: {ARTICLE_TITLE}

Code: Select all

<?php
// ARTICLE_TITLE replacement
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------

if( ! (strpos($content["all"],'{ARTICLE_TITLE}')===false)) {
   $content["all"] = str_replace('{ARTICLE_TITLE}', $GLOBALS['row']['article_title'], $content["all"]);
 }
?>
Datei: reptag_toplevel.php
Aufruf: {TOPLEVEL}

Code: Select all

<?php
// -----------[ CREATE ]----------------
// phpwcms_template/inc_script/reptag_toplevel.php
// -----------[ ADD ]----------------
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
   die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------

$cur_toplevel_name = ''; 
$GLOBALS['nav_point_listing'] = get_breadcrumb($GLOBALS['content']["cat_id"], $GLOBALS['content']['struct']); 

if(isset($GLOBALS['nav_point_listing']) && count($GLOBALS['nav_point_listing']) > 1) { 
   reset($GLOBALS['nav_point_listing']); 
   next($GLOBALS['nav_point_listing']); 
   $cur_toplevel_name = html_specialchars($GLOBALS['content']['struct'][ intval(key($GLOBALS['nav_point_listing'])) ]['acat_name']); 
} 

$content['all'] = str_replace('{TOPLEVEL}', $cur_toplevel_name, $content['all']); 
// -----------[ CLOSE ]----------------
?>
Spiele ein bischen damit ............

Gruß Knut
Last edited by flip-flop on Tue 20. May 2008, 10:08, edited 1 time in total.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

Post by spin_doctor »

Hi Knut,

Du schon wieder ;-)

Danke - äh - wo soll das gespeichert werden?
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

phpwcms_template/inc_script/frontend_render/

Und in der config: $phpwcms['allow_ext_render'] = 1;

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

Post by spin_doctor »

Ah jetzt.

die Verzeichnisstruktir ist noch neu.

Warum sind denn da Dinge disabled?
Vor allem so vielversprechend klingende wie Pixeltracking :twisted:

doc
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Weil das nicht jeder braucht. Je mehr du verwendest, je langsamer läuft die Seite natürlich.
Außerdem sollte man bei einigen Sachen wissen was man tut.
Bitte gebe nur die RTs frei die du tatsächlich verwendest.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

Post by spin_doctor »

Hallo Knut,

SENSATIONELL!! Es läuft.

var pagename='{ARTICLE_TITLE}';

Mit Hilfe der RT's wird der Seitenname (Artikelname) in die Statistik übernommen.

Danke nochmal.

doc
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Welche Statistik? Und was deklarierst du hier mit "var pagename" ?

Noch einmal zum Ordner /frontend_render/
Alle Dateien die hier abgelegt sind werden bei jedem Seitenaufbau abgearbeitet egal ob die Funktion gebraucht wird oder nicht. Deshalb nur so viele RTs/Dateien wie notwendig verwenden.
Hier tun sich also ungeahnte Möglichkeiten auf, wenn spezielle Funktionen notwendig werden.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

Post by spin_doctor »

Hallo Knut,

da habe ich zwei posts verwurstet. Sorry!

Ich brauch die Funktion für die Einbindung von phpmyvisits in die Vorlagen des phpwcms. Mit der Angabe brauchst Du den js-Code der Statistik nur einmal in der Vorlage einbauen und Du bekommst trotzdem seitengenaue Statistiken 8) .

Viel Spaß

doc
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

HILFE RT's unter Version 1.9 Problem

Post by spin_doctor »

Hallo Knut, hallo Alle,

die oben beschrieben RT's funktionieren unter Version 1.9 nicht mehr?! :cry:
Was kann ich tun, damit ich wieder Tracken kann? :(
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

Hast du den neuen "template" Ordner und liegt das dann auch da drinnen ?
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

Post by spin_doctor »

:?: :?: :?:
Neuen Template Ordner
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

Post by spin_doctor »

AH!

Statt phpwcms_template nur noch template?

doc
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

phpwcms_template heisst (kann heissen) in der neuen Installation "template"

Und da da der Frontend_render enthalten ist, gibt es eine Wahrscheinlichkeit, dass dein skript woanders liegt... :idea:


//Edit Kannst im conf.inc.php nachsehen was du eingestellt hast
spin_doctor
Posts: 93
Joined: Fri 9. Feb 2007, 13:16

Post by spin_doctor »

Es funktioniert wieder :lol: .

Jagt mir doch um Gottes Willen nich so einen Schrecken ein :shock: . Auf Dauer ist das nicht gut für's Herz.

:?

Grüße und Danke

doc
Post Reply