Zum Inhalt springen

tt_rating Daten werden nicht gespeichert

Erstellt am 5. März 2005 · 2 Antworten · letzte Antwort am 18. März 2005

Tags: Frage

Kalendin ·

Ich habe jetzt schon bei der zweiten Extension (diesmal tt_rating) Probleme. Das Plugin wird im frontend angezeigt. Aber wenn ich auf "Rate this" clicke passiert nichts. Also es wird nichts in der datenbank gespeichert und dementsprechend steht auch nichts im Datensatz. wenn noch kein datensatz erstellt ist, wird er automatisch erstellt so wie es sein soll. aber wieso werden keine einträge in diesem datensatz gemacht?

übers backend den datensatz befüllen geht. also es wird auch das ergebnis davon im frontend angezeigt. jemand vielleicht schon mal ähnliches gehabt?

Ich habe schon allesmögliche probiert. auch einiges aus anderen threads ausprobiert.

Tankred ·

Ich habe genau das gleiche Problem. Folgende Vermutung habe ich über die Ursachen:

Meine Site wurde umgezogen. Eventuell wurde beim Installieren etwas vergessen. War in einem anderen Thema die Vermutung.

Rating kollidiert eventuell mit css_styled content.

Meine rating extension ist vielleicht nicht aktuell (komme aber seit gestern nicht auf typo3.org).

Du bist also nicht alleine, vielleicht hat ja noch jemand eine Idee.

Tankred ·

Alex Weber war so freundlich und hat mir eine Anleitung geschickt, wie man das Rating wieder zum Laufen bekommt.

Er hat eigentlich nur den Default Code extrahiert und noch einmal ins Templat geschrieben.

Constants:

plugin.tt_rating >
plugin.tt_rating {

    # cat=plugin.rating/typo; type=; label= Vote form data.
  formdata = | *data[tt_rating][EDIT][rating]=select |0 - Seitenbewertung=0, 6 - sehr gut=6, 5 - gut=5, 4 - befriedigend=4, 3 - ausreichend=3, 2 - mangelhaft=2, 1 - ungenügend=1 ||  |formtype_db = submit | Werten

    # cat=plugin.rating/typo; type=; label= Text to show if not rated yet.
  notRatedMsg = <p style="color:#0f0;">Noch keine Wertungen... </p>
    # cat=plugin.rating/typo; type=; label= Text to show if just rated.
  submittedRatingMsg = <p>Ihre Wertung: ###SUBMITTED_RATING###.</p>
    # cat=plugin.rating/typo; type=; label= Text to show if user try to rate twice.
  doubleRatingMsg = <p style="color:#f00;">Sie haben diese Seite bereits bewertet. </p>
    # cat=plugin.rating/typo; type=; label= Text to show below your rating bar.
  textOutput = &nbsp;&nbsp;<b>###RATING###</b> (###VOTES### Wertg.)

    # cat=plugin.rating/typo; type=int; label= The highest possible rating. (examples: 5 [best] - 1 [worst], 1 [best] - 6 [worst])
  highestRating = 6
    # cat=plugin.rating/typo; type=int; label= The lowest possible rating.
  lowestRating = 1
    # cat=plugin.rating/typo; type=int; label= For statistics logging. This should match the steps in the form.
  ratingStatSteps = 1
    # cat=plugin.rating/typo; type=int; label= The length of a bar or similiar.
  ratingOutputWidth = 110

    # cat=plugin.rating/typo; type=; label= Image used to render the 'good' bar.
  goodImgFile = EXT:tt_rating/pi/star.gif
    # cat=plugin.rating/typo; type=; label= Image used to render the 'bad' bar.
  badImgFile = EXT:tt_rating/pi/star_grey.gif
    # cat=plugin.rating/typo; type=; label= Image used to mask both images against the background color.
  maskImgFile = EXT:tt_rating/pi/star_mask.gif
    # cat=plugin.rating/typo; type=int[1-20]; label= Should the image be tiled (example: 5 stars). If not set it to 1.
  tileImg = 6
}

[globalVar = GP:L = 4]
plugin.tt_rating >
plugin.tt_rating {

    # cat=plugin.rating/typo; type=; label= Vote form data.
  formdata = | *data[tt_rating][EDIT][rating]=select |0 - Page Rating=0, 6 - very good=6, 5 - good=5, 4 - satisfiable=4, 3 - adequate=3, 2 - deficient=2, 1 - inadequately=1 ||  |formtype_db = submit | Vote

    # cat=plugin.rating/typo; type=; label= Text to show if not rated yet.
  notRatedMsg = <p style="color:#0f0;">This object is not rated yet ... </p>
    # cat=plugin.rating/typo; type=; label= Text to show if just rated.
  submittedRatingMsg = <p>Your vote was: ###SUBMITTED_RATING###.</p>
    # cat=plugin.rating/typo; type=; label= Text to show if user try to rate twice.
  doubleRatingMsg = <p style="color:#f00;">You have already rated this item.</p>
    # cat=plugin.rating/typo; type=; label= Text to show below your rating bar.
  textOutput = &nbsp;&nbsp;<b>###RATING###</b> (###VOTES### Votes.)

    # cat=plugin.rating/typo; type=int; label= The highest possible rating. (examples: 5 [best] - 1 [worst], 1 [best] - 6 [worst])
  highestRating = 6
    # cat=plugin.rating/typo; type=int; label= The lowest possible rating.
  lowestRating = 1
    # cat=plugin.rating/typo; type=int; label= For statistics logging. This should match the steps in the form.
  ratingStatSteps = 1
    # cat=plugin.rating/typo; type=int; label= The length of a bar or similiar.
  ratingOutputWidth = 110

    # cat=plugin.rating/typo; type=; label= Image used to render the 'good' bar.
  goodImgFile = EXT:tt_rating/pi/star.gif
    # cat=plugin.rating/typo; type=; label= Image used to render the 'bad' bar.
  badImgFile = EXT:tt_rating/pi/star_grey.gif
    # cat=plugin.rating/typo; type=; label= Image used to mask both images against the background color.
  maskImgFile = EXT:tt_rating/pi/star_mask.gif
    # cat=plugin.rating/typo; type=int[1-20]; label= Should the image be tiled (example: 5 stars). If not set it to 1.
  tileImg = 6
}
[global]

Ins Setup

## Includes the ratingLib:
includeLibs.ts_rating = EXT:tt_rating/pi/class.tx_ttrating.php

## Sets up the fields, that may be submitted in order to create items. Mandatory!
FEData.tt_rating {
  processScript = EXT:tt_rating/pi/rating_submit.inc
  allowEdit {
    rating = 1

    // following items are used to pass configuration to fe_tce.php, They are NOT fields
    // this may change later
    minRating = 0
    maxRating = 6
    ratingStatSteps = 1
  }
}


## This enables the tt_content.list item to display rating:
plugin.tt_rating >
plugin.tt_rating = USER
plugin.tt_rating {
  userFunc = tx_ttrating->main_rating

  pid_list.field = pages
  code.field = select_key

  allowNew = 1
  defaultCode = VOTEFORM, RESULT
    //used if you allowNew
  defaultTitle = rating
  defaultDescription =
    // the best and the worst rating value
  highestRating = {$plugin.tt_rating.highestRating}
  lowestRating = {$plugin.tt_rating.lowestRating}
    // normally the same as in your voteform
  ratingStatSteps = {$plugin.tt_rating.ratingStatSteps}
    // the length of a bar or similiar
  ratingOutputWidth = {$plugin.tt_rating.ratingOutputWidth}

  submittedRatingMsg = {$plugin.tt_rating.submittedRatingMsg}
  doubleRatingMsg = {$plugin.tt_rating.doubleRatingMsg}
  wrap =

  voteform < tt_content.mailform.20
  voteform.layout = <td>###FIELD###</td><td><img src="clear.gif" width={$styles.content.mailform.border}></td>
  voteform.stdWrap.wrap = <table class="wertung" border=0 cellspacing=0 cellpadding=0><tr>  | </tr></table>
  voteform.data >
  voteform.data = {$plugin.tt_rating.formdata}
  voteform.no_cache=1
  voteform.noValueInsert=1
  voteform.wrap =

  noRatingObj = TEXT
  noRatingObj.value = {$plugin.tt_rating.notRatedMsg}
  noRatingObj.textStyle < styles.content.textStyle


  renderObj = COA
  renderObj.stdWrap.wrap =  |
  renderObj {

    10 = IMAGE
    10.file = GIFBUILDER
    10.file {
      backColor = {$cSet.pageColor}
      transparentBackground = 1
offset = 10,0
#      XY = [10.w]*{$plugin.tt_rating.tileImg},[10.h]
      XY = 160,20
      10 = IMAGE
      10 {
        file = {$plugin.tt_rating.badImgFile}
        mask = {$plugin.tt_rating.maskImgFile}
        tile = {$plugin.tt_rating.tileImg},1
      }
      15 = WORKAREA
      15.set = 0,0,###RATING_MUL###*[10.w]*{$plugin.tt_rating.tileImg},[10.h]
      20 = IMAGE
      20 {
        file = {$plugin.tt_rating.goodImgFile}
        mask = {$plugin.tt_rating.maskImgFile}
        tile = {$plugin.tt_rating.tileImg},1
      }
    }
    20 = TEXT
    20.value = {$plugin.tt_rating.textOutput}
    20.textStyle < styles.content.textStyle

    30 = TEXT
    30.value = ###RATING_MSG###
    30.required = 1
    30.wrap =
    30.textStyle < styles.content.textStyle

  }
}

Danke vielmals Alex!
Ich glaube aber, dass der Cookieschutz flöten geht.