Zum Inhalt springen

Tip-A-Friend im hauptemplate

Erstellt am 10. Mai 2004 · 5 Antworten · letzte Antwort am 12. Mai 2004

Tags: Frage

Fintan ·

hallo

habe euch wiedermal eine Aufgabe!
Da ich Typo3 von vorne bis hinten durchteste bin ich nun halt auf das Plugin Tip-A-Friend gestossen!

Ich habe es ausprobiert und hab es sogar zum laufen gebracht! Jep es funktioniert.

NUR: ich musste auf jeder Seite das TIPLINK angeben, damit man diese Seite versenden kann!
Ich möchte gerne dieses Link ins Haupttemplate einbauen, damit er immer kommt!

Hat Jemand eine Idee wie man das machen kann?

mfg Fintan

PS: Falls ihr nicht nach kommt, könnt ihr gerne nachfragen 🙂

TW ·
Fintan schrieb

hallo

habe euch wiedermal eine Aufgabe!
Da ich Typo3 von vorne bis hinten durchteste bin ich nun halt auf das Plugin Tip-A-Friend gestossen!

Ich habe es ausprobiert und hab es sogar zum laufen gebracht! Jep es funktioniert.

NUR: ich musste auf jeder Seite das TIPLINK angeben, damit man diese Seite versenden kann!
Ich möchte gerne dieses Link ins Haupttemplate einbauen, damit er immer kommt!

Hat Jemand eine Idee wie man das machen kann?

mfg Fintan

PS: Falls ihr nicht nach kommt, könnt ihr gerne nachfragen 🙂

hi
marker im html template plazieren...
im root template den marker mit tip a friend deklarieren...

cu
thorsten

Fintan ·

marker im html template plazieren...
im root template den marker mit tip a friend deklarieren...

danke für deine Antwort 🙂
Kannst du mir das genauer erklären oder anhand eines Beispiels...
Muss nicht genau sein, nur damit ich ein Denkanstoss bekomme 🙂

mfg Fintan

TW ·
Fintan schrieb

marker im html template plazieren...
im root template den marker mit tip a friend deklarieren...

danke für deine Antwort 🙂
Kannst du mir das genauer erklären oder anhand eines Beispiels...
Muss nicht genau sein, nur damit ich ein Denkanstoss bekomme 🙂

mfg Fintan

hi
also wenn du im root template was definierst wird es auf die unterseiten mit "vererbt".. das ist so das prinzip von typo3!

es sei denn du änderst in den unterseiten in den templates die definition.
dann läuft es nämlich nicht mehr 8-)

also im root template definieren!

cu
thorsten

Fintan ·

hallo nochmals 🙂

Bin leider immer noch gleich weit wie am Anfang...

Also im Haupttemplate: tpl.html soll ich also ein Platzhalter (Marker) setzen! Richtig?

Bei mir sieht es im Moment so aus: Im Template gibt es ein Link (seite versenden) der aber im Moment noch nirgends hinführt.

 <td><a href="#">SEITE VERSENDEN</a></td>

Soll ich diesen Link löschen und dort ein Platzhalter hin tun? Oder irgendetwas in den Link schreiben?
Der Marker sieht dann wie aus?

{seite versenden}

oder irgendwie sowas:

###seite versenden###

?

OK wenn ich das getan habe. Was dann? Irgendiwe muss es ja das alles ansprechen. Also für Tip-A-Friend musste ich ja im Template der Hauptseite im "Constants" folgendes reinschreiben:

plugin.tipafriend.PIDtipForm = 94

Wobei 94 die ID der Seite ist, wo das Tip-A-Friend ist.
Muss ich nun da was ändern (also im Constants)? Oder muss ich was im Setup programmieren?

Ihr seht ich hab sowas noch nie gemacht und habe keine Ahnung wie 😃
Wäre für jede Hilfe dankbar 🙂

Fintan

TW ·

hi
also:
mein erklärungsversuch #giggle#
-----------------------------------------------------------------------------
im html template nen marker machen z.b.

###tip###

------------------------------------------------------------------------------

dann fügst du mal auf der ersten seite ein inhaltselement text ein.....
dann den typ ändern auf plugin...

erweiterung -> tipp geben auswählen
und in das code feld ->TIPLINK eingeben....

--------------------------------------------------------------------------------

dann gehst du hin und schreibst folgendes in das setup des root templates

# tip object:
marks.tip = CONTENT
marks.tip > 
marks.tip = RECORDS 
marks.tip.tables = tt_content
marks.tip.source = id des contentelementes..

damit holst du dir das inhaltselement direkt an die marker position..

-----------------------------------------------------------------------------------

in den constantsbereich des root templates kommt folgendes

plugin.tipafriend {
    # cat=plugin.tipafriend/file; type=file[html,htm,tmpl,txt]; label= Template File: HTML-template file for display of the Tip-a-Friend form
  file.templateFile = EXT:tipafriend/pi/tipafriend_template.tmpl

    # cat=plugin.tipafriend/typo; type=wrap; label= Wrap 1: This wrap is used in the template-file.
  wrap1 = <font face="verdana" size=2 color=black> | </font>
    # cat=plugin.tipafriend/typo; type=wrap; label= Wrap 2: This wrap is used in the template-file.
  wrap2 = <font face="verdana" size=1 color=black> | </font>

    # cat=plugin.tipafriend/color; type=color; label= Color 1: This bgcolor is used in the template-file.
  color1 = #cccccc
    # cat=plugin.tipafriend/color; type=color; label= Color 2: This bgcolor is used in the template-file.
  color2 = #999999
    # cat=plugin.tipafriend/color; type=color; label= Color 3: This bgcolor is used in the template-file.
  color3 = #333333

    # cat=plugin.tipafriend//; type=int+; label= PID for the Tip-form page.
  PIDtipForm = 0 //das ist die seite wo das tipafriend draufgeschickt wird...
                          also die seitenid eingeben....
    # cat=plugin.tipafriend/enable; type=boolean; label= Send page as HTML: If set, the mail is sent as an HTML mail.
  htmlMail = 0
}

in das setup kommt folgendes

## Includes the newsLib:
includeLibs.ts_tipafriend= EXT:tipafriend/pi/class.tx_tipafriend.php

## This enables the tt_content.list item to display the news:
plugin.tipafriend >
plugin.tipafriend = USER
plugin.tipafriend {
  userFunc = tx_tipafriend->main_tipafriend
  code.field = select_key
  templateFile = {$plugin.tipafriend.file.templateFile}

  # Global wraps
  wrap1.wrap = {$plugin.tipafriend.wrap1}
  wrap2.wrap = {$plugin.tipafriend.wrap2}
  color1.wrap = {$plugin.tipafriend.color1}
  color2.wrap = {$plugin.tipafriend.color2}
  color3.wrap = {$plugin.tipafriend.color3}

  typolink.parameter = {$plugin.tipafriend.PIDtipForm}
  htmlmail = {$plugin.tipafriend.htmlMail}

}

--------------------------------------------------------------------------------
in der seite wo hin gelinkt wird

erstellst du ein plugin vom typ text
dann änderst du das wieder auf plugin
dann erweiterung auf tipp geben....
dann in das code feld TIPFORM eingeben....

-------------------------------------------------------------------------------

in die constants dieser seite

plugin.tipafriend {
    # cat=plugin.tipafriend/file; type=file[html,htm,tmpl,txt]; label= Template File: HTML-template file for display of the Tip-a-Friend form
  file.templateFile = EXT:tipafriend/pi/tipafriend_template.tmpl

    # cat=plugin.tipafriend/typo; type=wrap; label= Wrap 1: This wrap is used in the template-file.
  wrap1 = <font face="verdana" size=2 color=black> | </font>
    # cat=plugin.tipafriend/typo; type=wrap; label= Wrap 2: This wrap is used in the template-file.
  wrap2 = <font face="verdana" size=1 color=black> | </font>

    # cat=plugin.tipafriend/color; type=color; label= Color 1: This bgcolor is used in the template-file.
  color1 = #cccccc
    # cat=plugin.tipafriend/color; type=color; label= Color 2: This bgcolor is used in the template-file.
  color2 = #999999
    # cat=plugin.tipafriend/color; type=color; label= Color 3: This bgcolor is used in the template-file.
  color3 = #333333

    # cat=plugin.tipafriend//; type=int+; label= PID for the Tip-form page.
  PIDtipForm = 0 //das ist die seite wo das tipafriend draufgeschickt wird...
                          also die seitenid eingeben....
    # cat=plugin.tipafriend/enable; type=boolean; label= Send page as HTML: If set, the mail is sent as an HTML mail.
  htmlMail = 0
}

und in das setup

## This enables the tt_content.list item to display the news:
plugin.tipafriend >
plugin.tipafriend = USER
plugin.tipafriend {
  userFunc = tx_tipafriend->main_tipafriend
  code.field = select_key
  templateFile = {$plugin.tipafriend.file.templateFile}

  # Global wraps
  wrap1.wrap = {$plugin.tipafriend.wrap1}
  wrap2.wrap = {$plugin.tipafriend.wrap2}
  color1.wrap = {$plugin.tipafriend.color1}
  color2.wrap = {$plugin.tipafriend.color2}
  color3.wrap = {$plugin.tipafriend.color3}

  typolink.parameter = {$plugin.tipafriend.PIDtipForm}
  htmlmail = {$plugin.tipafriend.htmlMail}

}

dann müsste es laufen

cu
thorsten

-----------------------------------------------------------------------------