so the two results that matched in Google were dead ends for me... :(

in a nutshell, im trying to get my FiveStar rating content to show up on a custom content type, that has location information (and shows up on the sites node map - the popup wont display my rating information)... ive created my own .tpl page, and have all the formatting and -other- fields i want displaying correctly...

i just cant seem to get the FiveStar content to show up... ive dumped the entire $node on another page, as well as called get_defined_vars()... i know the data is there... can someone help me to display the actual stars (with current results, etc.) please? :)

here is a portion from the $node dump:

[fivestar_widget] => Array ( [#weight] => 50 [#value] => [#title] => [#description] => [#printed] => 1 ) [#title] => [#description] => [#children] => [#printed] => 1 ) [links] => Array ( ) )

and here is the relevant portion from the call to get_defined_vars():

Array
(
    [template_file] => themes/garland/node-center.tpl.php
    [variables] => Array
        (
            [nid] => 16
            [type] => center
            [title] => Jump Zone Inc.
            [body] => <div class="field field-type-text field-field-description">
      <div class="field-label">Description:&nbsp;</div>
    <div class="field-items">
            <div class="field-item odd">
                    This is the description for Jump Zone Inc.        </div>
        </div>
</div>
<h3>Location</h3>
<div class="location vcard"><div class="adr">
<div class="street-address">5366 FM 1960 E.</div>
<span class="locality">Humble</span>, <span class="region">TX</span>, <span class="postal-code">77346</span></div></div>
<form action="/playgroop2.3/centers/16"  accept-charset="UTF-8" method="post" id="fivestar-form-node-16" class="fivestar-widget">
<div><div class="fivestar-form-16 clear-block"><input type="hidden" name="content_type" id="edit-content-type-16" value="node"  />
<input type="hidden" name="content_id" id="edit-content-id-16" value="16"  />
<div class="fivestar-form-item  fivestar-combo-text fivestar-average-stars fivestar-labels-hover"><div class="form-item" id="edit-vote-0-wrapper">
 <label for="edit-vote-0">Average: </label>
 <input type="hidden" name="vote_count" id="edit-vote-count-0" value="1"  />
<input type="hidden" name="vote_average" id="edit-vote-average-0" value="60"  />
<input type="hidden" name="auto_submit_path" id="edit-auto-submit-path-0" value="/playgroop2.3/fivestar/vote/node/16"  class="fivestar-path" />
<select name="vote" class="form-select" id="edit-vote-0" ><option value="-">Select rating</option><option value="20">Poor</option><option value="40">Okay</option><option value="60" selected="selected">Good</option><option value="80">Great</option><option value="100">Awesome</option></select>
 <div class="description"><div class="fivestar-summary fivestar-summary-combo fivestar-feedback-enabled"><span class="user-rating">Your rating: <span>3</span></span> <span class="average-rating">Average: <span>3</span></span> <span class="total-votes">(<span>1</span> vote)</span></div></div>
</div>
</div><input type="hidden" name="destination" id="edit-destination-16" value="node/16"  />
<input type="submit" name="op" id="edit-fivestar-submit-16" value="Rate"  class="form-submit fivestar-submit" />
<input type="hidden" name="form_build_id" id="form-0bc0d8c57f4f1b10b15ec66e34126720" value="form-0bc0d8c57f4f1b10b15ec66e34126720"  />
<input type="hidden" name="form_token" id="edit-fivestar-form-node-16-form-token" value="d57842dc4473c5f9ee48a259eacd8ae4"  />
<input type="hidden" name="form_id" id="edit-fivestar-form-node-16" value="fivestar_form_node_16"  />
</div>
</div></form>

            [log] => 
            [revision_timestamp] => 1239994457

the [body] piece above looks to be exactly what i want, but no matter how i try to call it, i get bumpkus...

print $node->content['body'];
print '<br>' . $node->description;
print '<br>' . $node->variables['body'];
print_r($node->content['body']);
print $node->body;

Comments

steveadamo’s picture

i think ill try creating a new view, and for its theme setting, ill set the path to my new node-content-type.tpl.php page... that might do the trick, huh?

steveadamo’s picture

scratch that... i think i misunderstood how that part of a View works...

steveadamo’s picture

It looks like Views displays the most logical .tpl files that would control the content from the view... and the naming conventions are based off how the view was named in the first place...

i dont think i can force a view created for (ex.) mywidget to go to a path called views-view--widget.tpl.php... but i still dont see how to make the view go to another option than whats selected by default (in bold)...