[TH] Custom Post Fields [Deleted]

Sorted that out, but I'm getting the post field list in the header for the thread now, which doesn't make sense, and I'm seeing the values instead of the graphic stars for the custom rating field I imported . Any way to resolve?
Yeah same here. Custom rating is showing a number instead of the stars. trying to work around it but got no idea where to change it.
@Waindigo, can you assist? How do we display the ratings as stars?
See this post:
http://xenforo.com/community/thread...lds-custom-field-xml.47009/page-2#post-728802
 
That example is using images that I don't have.

I've found about a dozen ways to get this to NOT work.

This is in the header template html for the post fields tab for the forum I want to display this in.

Code:
<div style="float:left !important" class="pairsRows secondaryContent">
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">

<xen:require css="rating.css" />
<xen:require css="waindigo_custom_rating_widget_customfields.css" />
<xen:require js="js/waindigo/customrating/customrating.js" />
<xen:if hascontent="true">
    <div class="pairsRows secondaryContent">
        <xen:contentcheck>
Brand Purchased: {$customPostFields.Brand} <br>
Item Purchased:  {$customPostFields.Item} <br>
Sales Method:    {$customPostFields.SaleMethod} <br>
Date Purchased:  {$customPostFields.VDatePurchased} <br>

Shipping:               <xen:if is="{$customPostFields.RateShipping}">
                               <xen:include template="waindigo_custom_rating_widget_customfields" />
                        <xen:else />
                        </xen:if>
Customer Service:       <xen:if is="{$customPostFields.VCustService}">
                               <xen:include template="waindigo_custom_rating_widget_customfields" />
                        <xen:else />
                        </xen:if>
Overall Vendor Rating:  <xen:if is="{$customPostFields.VRating}">
                               <xen:include template="waindigo_custom_rating_widget_customfields" />
                        <xen:else />
                        </xen:if>
        </xen:contentcheck>
    </div>
</xen:if>
</xen:if>
</div>

Two problems - I'm getting this on the initial post, which I don't want (should show on the replies only), and the stars aren't filling in.

upload_2014-6-10_0-57-4.webp


Please help.
 
You need to include the headings inside the <xen:if> statements. That way they will only appear on the posts.
 
I've tried everything just about everywhere, doesn't fix it. It either shows in all posts or none. And, that still doesn't fix the stars. Only the empty ones appear, although there is data for the replies.

The current code:
Code:
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} != 0">
<div style="float:left !important" class="pairsRows secondaryContent">
Brand Purchased: {$customPostFields.Brand} <br>
Item Purchased:  {$customPostFields.Item} <br>
Sales Method:    {$customPostFields.SaleMethod} <br>
Date Purchased:  {$customPostFields.VDatePurchased} <br>
Shipping:               <xen:if is="{$customPostFields.RateShipping}">
                               <xen:include template="waindigo_custom_rating_widget_customfields" />
                        <xen:else />
                        </xen:if>
Customer Service:       <xen:if is="{$customPostFields.VCustService}">
                               <xen:include template="waindigo_custom_rating_widget_customfields" />
                        <xen:else />
                        </xen:if>
Overall Vendor Rating:  <xen:if is="{$customPostFields.VRating}">
                               <xen:include template="waindigo_custom_rating_widget_customfields" />
                        <xen:else />
                        </xen:if>
</div>
</xen:if>

Shows none of the post fields. Just the Custom Thread fields.

upload_2014-6-10_12-32-21.webp
 
I've also tried:
Code:
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} >= 1">

and
Code:
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} != 0">

and every other example I can find on here. I either get the data in all the posts, or none of them.
 
I've confirmed that both {$post.position} & {$xenOptions.messagesPerPage} are null in the custom post fields header/footer, so I have no way to prevent this from posting to the initial post. I also can't use the custompostfields in the ad_message_body template, so that's not an optional workaround. Since this is post field data only, this seems like a bug that it's displaying in the initial post.
 
HTML:
<xen:if hascontent="true">
<div style="float:left !important" class="pairsRows secondaryContent">
<xen:contentcheck>
<xen:if is="{$customPostFields.Brand}">Brand Purchased: {$customPostFields.Brand} <br></xen:if>
<xen:if is="{$customPostFields.Item}">Item Purchased: {$customPostFields.Item} <br></xen:if>
<xen:if is="{$customPostFields.SaleMethod}">Sales Method: {$customPostFields.SaleMethod} <br></xen:if>
<xen:if is="{$customPostFields.VDatePurchased}">Date Purchased: {$customPostFields.VDatePurchased} <br></xen:if>
<xen:if is="{$customPostFields.RateShipping}">Shipping: <xen:if is="{$customPostFields.RateShipping}">
<xen:include template="waindigo_custom_rating_widget_customfields" />
<xen:else />
</xen:if></xen:if>
<xen:if is="{$customPostFields.VCustService}">Customer Service:
<xen:include template="waindigo_custom_rating_widget_customfields" />
</xen:if>
<xen:if is="{$customPostFields.VRating}">Overall Vendor Rating:
<xen:include template="waindigo_custom_rating_widget_customfields" />
</xen:if>
</xen:contentcheck>
</div>
</xen:if>
 
One (last) question: is it possible to display the TEXT instead of the VALUE for drop down fields? (It's fine when they're filling the field out, but problematic when the content is displayed per the code above.)
 
i'm getting fatal errors when attempting to search an RM instance with this add-on enabled:
(ie, using RM "Search" from the drop-down menu gives me this):

Fatal error: Call to undefined method Waindigo_CustomFields_Extend_XenResource_Model_ResourceField::getResourceFieldGroupTitlePhraseName() in/srv/www/domain/public_html/library/Waindigo/CustomFields/Extend/XenResource/Model/ResourceField.php on line 71
 
The error you have reported is not to do with this add-on. Please check that you have the latest version of Custom Fields by Waindigo as this is the add-on that this relates to and I think it has been fixed. If not, please post in that thread.
 
One (last) question: is it possible to display the TEXT instead of the VALUE for drop down fields? (It's fine when they're filling the field out, but problematic when the content is displayed per the code above.)
You need to create your own xen:if statements for this. If you are interested in contributing to have this functionality added, please drop me a PM.
 
It would be great also to display at least some custom post fields in an inline editor. This can be done by implementing actionEditInline() and actionSaveInline() in ControllerPublic_Post the same way it was done with actionEdit() and actionSave()
 
Some strange things, could you help @Waindigo
  • Custom post field title is not show in post, only value of field, no matter what I tried
  • In Node tree option (in post fields tab) you have to recheck option "Required Fields" every time when you open that tab becouse it is not checked by default if you checked that option before
  • Is it possible to enable certain custom post field to only one certain thread, and not to all subforum
Thanks! ;)
 
Last edited:
@Waindigo I also cannot see the fields in the post........ after posting....

Also, how can we also display the box only when the users has not replied yet to the thread?
 
Some strange things, could you help @Waindigo
  • Custom post field title is not show in post, only value of field, no matter what I tried
  • In Node tree option (in post fields tab) you have to recheck option "Required Fields" every time when you open that tab becouse it is not checked by default if you checked that option before
  • Is it possible to enable certain custom post field to only one certain thread, and not to all subforum
Thanks! ;)

And one more question @Waindigo
Is it possible that text from custom post field convert into part of post, part of real user text, couse if this Mod is uninstalled then all custom post fields input will be deleted too :cry:
 
Top Bottom