[TH] Custom Fields [Deleted]

Waindigo updated Custom Fields by Waindigo with a new update entry:

Version 1.1.0e released

Bug fixes:
  • Fixes error when un-removing forum with NoForo by Waindigo add-on, and now ensures that all tables are correctly re-built such that this add-on does not need then to be upgraded/re-installed to function correctly.
  • Improved installer to enable better future compatibility with other add-ons that may wish to add new custom field types in future.

Read the rest of this update entry...
 
I ended getting it to work finally through the header template, I was trying to over-complicate things. Just want to say thanks :), we'll try to get a donation to you, this has turned out better than we imagined. We setup a little review submission system with this addon and the star rating:

View attachment 36162

View attachment 36163


The only thing I'd like to do is show the star rating inside the thread_list_item template, is that possible?

How do that? Please, tell me anybody. :)
It's extremely need to me. And I very little know about HOW work with custom fields. I'll be VERY grateful you for that.
 
I would love to see how that is done as well. Being very new to admin stuff - some examples of how to use the header templates and other ways to display the custom fields would be very helpful to us noobs.

Any help would really be appreciated - even pointing us where to look!
 
When trying to install the xml to XF 1.1.4, it fails. When I try to install the xml from the server, I get this error:

Server Error

String could not be parsed as XML
  1. SimpleXMLElement->__construct() in AddOnInstaller/Model/AddOn.php at line 0
  2. AddOnInstaller_Model_AddOn->getXmlType() in AddOnInstaller/ControllerAdmin/AddOn.php at line 33
  3. AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 310
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  5. XenForo_FrontController->run() in /admin.php at line 13
 
Well it's been awhile since I've had it set like that but... you'll need:

http://xenforo.com/community/resources/star-rating-for-custom-fields-1-1-x-by-waindigo.1596/

You can use this little tip to customize your thread_create:

http://xenforo.com/community/threads/custom-fields-by-waindigo.34093/page-7#post-435748

You can use something like this for the stars(not sure if this works for his latest)

Code:
<xen:if is="{$customFields.waindigo_star_rating.rating} == 1}">
IMAGES_FOR_1_STAR
<xen:elseif is="{$customFields.waindigo_star_rating.rating} == 2}" />
IMAGES_FOR_2_STARS
<xen:elseif is="{$customFields.waindigo_star_rating.rating} == 3}" />
IMAGES_FOR_3_STARS
<xen:elseif is="{$customFields.waindigo_star_rating.rating} == 4}" />
IMAGES_FOR_4_STARS
<xen:elseif is="{$customFields.waindigo_star_rating.rating} == 5}" />
IMAGES_FOR_5_STARS
<xen:else />
IMAGES_FOR_NO_STARS
</xen:if>

So I literally just coded a div, that contained these elements and floated it to the right in the "header template" for his addon.
 
Well it's been awhile since I've had it set like that but... you'll need:

http://xenforo.com/community/resources/star-rating-for-custom-fields-1-1-x-by-waindigo.1596/

You can use this little tip to customize your thread_create:

http://xenforo.com/community/threads/custom-fields-by-waindigo.34093/page-7#post-435748

You can use something like this for the stars(not sure if this works for his latest)

Code:
<xen:if is="{$customFields.waindigo_star_rating.rating} == 1}">
IMAGES_FOR_1_STAR
<xen:elseif is="{$customFields.waindigo_star_rating.rating} == 2}" />
IMAGES_FOR_2_STARS
<xen:elseif is="{$customFields.waindigo_star_rating.rating} == 3}" />
IMAGES_FOR_3_STARS
<xen:elseif is="{$customFields.waindigo_star_rating.rating} == 4}" />
IMAGES_FOR_4_STARS
<xen:elseif is="{$customFields.waindigo_star_rating.rating} == 5}" />
IMAGES_FOR_5_STARS
<xen:else />
IMAGES_FOR_NO_STARS
</xen:if>

So I literally just coded a div, that contained these elements and floated it to the right in the "header template" for his addon.

Hi Russ,

This is helpful thank you. Does the code go in the html templates?

Also if I wanted to display the text from a Drop down selection (2nd box) in the post - how would I do that?

Thanks!
 
In the new version you can put:
HTML:
<xen:if is="{$customFields.waindigo_custom_rating} == 1}">
IMAGES_FOR_1_STAR
<xen:elseif is="{$customFields.waindigo_custom_rating} == 2}" />
IMAGES_FOR_2_STARS
<xen:elseif is="{$customFields.waindigo_custom_rating} == 3}" />
IMAGES_FOR_3_STARS
<xen:elseif is="{$customFields.waindigo_custom_rating} == 4}" />
IMAGES_FOR_4_STARS
<xen:elseif is="{$customFields.waindigo_custom_rating} == 5}" />
IMAGES_FOR_5_STARS
<xen:else />
IMAGES_FOR_NO_STARS
</xen:if>
or I think you can even put:
HTML:
<xen:include template="rating">
<xen:set var="$rating">{$customFields.waindigo_custom_rating}</xen:set>
</xen:include>

This is placed in the header/footer of your post/library article by going to:
Admin CP -> Applications -> Node List -> SELECT NODE -> Thread/Post Fields
and pasting it in the box titled Header Template HTML or Footer Template HTML.

As Russ says, you can put literally any HTML in. So he put it all in a <div>, added borders and background colours etc. and floated it right.
 
When trying to install the xml to XF 1.1.4, it fails. When I try to install the xml from the server, I get this error:

Server Error

String could not be parsed as XML
  1. SimpleXMLElement->__construct() in AddOnInstaller/Model/AddOn.php at line 0
  2. AddOnInstaller_Model_AddOn->getXmlType() in AddOnInstaller/ControllerAdmin/AddOn.php at line 33
  3. AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 310
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  5. XenForo_FrontController->run() in /admin.php at line 13

Sounds like a bug with Add-On Installer. What are you trying to install? Custom Fields or the Star Rating? For the Star Rating, it is not an add-on, it is a custom field. You have to import it as a custom field. See my post here:
http://xenforo.com/community/thread...m-fields-1-1-x-by-waindigo.47009/#post-505975
 
I am trying to install the custom fields addon downloaded from this thread:
addon-Waindigo_CustomFields-1.1.0f.1364657954
addon-Waindigo_CustomFields.xml
 
I am trying to install the custom fields addon downloaded from this thread:
addon-Waindigo_CustomFields-1.1.0f.1364657954
addon-Waindigo_CustomFields.xml
How are you installing it? Are you uploading the zip file using Chris's add-on? Or are you typing in the URL from the Resource Manager? Or uploading the files manually by FTP and then just uploading the XML file?

I have tried all three methods and am unable to replicate the issue.
 
How are you installing it? Are you uploading the zip file using Chris's add-on? Or are you typing in the URL from the Resource Manager? Or uploading the files manually by FTP and then just uploading the XML file?

I have tried all three methods and am unable to replicate the issue.
I have unzipped and uploaded the files to the server. Then tried to upload the xml through the admin panel. This failed.
Then I uploaded the file to the server and pointed the installer to 'install from file on server'. This resulted in this error.
 
Just uninstalled this add-on and got this error.

An exception occurred: Mysqli prepare error: Table 'forum_xflive.xf_thread' doesn't exist in /var/www/vhosts/domain.com/httpdocs/forum/library/Zend/Db/Statement/Mysqli.php on line 77

Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219
XenForo_Model->fetchAllKeyed() in XenForo/Model/Thread.php at line 371
XenForo_Model_Thread->getThreads() in WidgetFramework/WidgetRenderer/Threads.php at line 100
WidgetFramework_WidgetRenderer_Threads->_render() in WidgetFramework/WidgetRenderer.php at line 421
WidgetFramework_WidgetRenderer->render() in WidgetFramework/Core.php at line 254
WidgetFramework_Core->_renderWidgetsFor() in WidgetFramework/Core.php at line 192
WidgetFramework_Core->renderWidgetsFor() in WidgetFramework/Listener.php at line 30
WidgetFramework_Listener::template_post_render()
call_user_func_array() in XenForo/CodeEvent.php at line 54
XenForo_CodeEvent::fire() in XenForo/Template/Abstract.php at line 195
XenForo_Template_Abstract->render() in XenForo/Template/Public.php at line 110
XenForo_Template_Public->render() in XenForo/ViewRenderer/HtmlPublic.php at line 119
XenForo_ViewRenderer_HtmlPublic->renderContainer() in XenForo/FrontController.php at line 565
XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
XenForo_FrontController->run() in /var/www/vhosts/domain.com/httpdocs/forum/index.php at line 13

Had to disable the Widget Framework add-on to get my site working again.
 
Just uninstalled this add-on and got this error.

Had to disable the Widget Framework add-on to get my site working again.
Do you have NoForo installed? The error says that there is no thread table in your database.
 
Nope. I can't view any threads now either.

Getting this when I try to view a thread.

Server Error

Mysqli prepare error: Table 'forum_xflive.xf_thread' doesn't exist

Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Model/Thread.php at line 392
XenForo_Model_Thread->countThreads() in XenForo/Model/Thread.php at line 455
XenForo_Model_Thread->countThreadsInForum() in XenForo/ControllerPublic/Forum.php at line 83
XenForo_ControllerPublic_Forum->actionIndex() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/www/vhosts/domain.com/httpdocs/forum/index.php at line 13
 
Top Bottom