The attached add-on files may be out of date. Please visit Devot-ee for the latest versions.
This plugin allows you to output values of custom fields of certain entry without using exp:weblog:entries.
PARAMETERS:
1) entry_id - Optional. Allows you to specify entry id number.
2) weblog - Optional. Allows you to specify weblog short name.
3) url_title - Optional. Allows you to specify url_title.
Either “entry_id” or “weblog” and “url_title” parameters must be defined.
4) field_format - Optional. Allows you to specify how field data should be formatted. In case this parameter is left undefined, format info will be retrieved from database. In case parameter’s value is “raw”, data will be outputted without any format applied.
5) site - Optional. Allows you to specify site id number. Default is “1”.
6) invalid_input - Optional. Accepts two values: “alert” and “silence”. Default value is “silence”. If the value is “alert”, then in cases when the plugin has some problem with parameters, PHP alert is being shown; if the value is “silence”, then in cases when the plugin has some problem with parameters, it finishes its work without any alert being shown. Set this parameter to “alert” for development, and to “silence” - for deployment.
7) allow_img_url - Optional. Allow inline images? Possible values: “yes” and “no”. Default is “no”.
8) auto_links - Optional. Auto-link URLs and email addresses? Possible values: “yes” and “no”. Default is “yes”. (Note that auto-linking does not ever occur if parameter “html_format” is set to “none”)
9) encode_email - Optional. Whether or not email addresses are encoded. Possible values: “yes” and “no”. Default is “yes”.
10) encode_type - Optional. Type of encoding applied to email addresses if email address encoding is enabled. Possible values: “javascript ” and “noscript”. “noscript” renders in a human readable format (e.g. “name at example dot com)”, suitable for use where JavaScript is inappropriate, such as in a feed.
11) html_format - Optional. Controls how HTML is handled in text. Possible values: “safe”, “all”, “none”. Default is “safe”.
12) parse_smileys - Optional. Replace text smileys with smiley images? Possible values: “yes” and “no”. Default is “yes”.
VARIABLES:
As a single variable can be used any field name of the entry with “field_value_” added at the beginning. For example if entry has such fields as “article_body” and “formatted_title” we can use such single variables as {field_value_article_body} and {field_value_formatted_title}.
Conditionals are not supported.
EXAMPLE OF USAGE:
{exp:field_value entry_id="251"}
<h1>{field_value_formatted_title}</h1>
{field_value_article_body}
{/exp:field_value}
Hello,
Just wanted to post info about a small bug.
After installing, I went to the plugins page and saw this:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/user/public_html/system/plugins/pi.field_value.php:281) in /home/user/public_html/system/extensions/ext.lg_htaccess_generator_ext.php on line 672
I fixed the error by deleting all the spaces after the closing php tag at the end of your plugin.
PHP Version 5.2.5 ExpressionEngine v 1.6.8
Thanks! Micky
Hi Micky,
I fixed the error by deleting all the spaces after the closing php tag at the end of your plugin.
Thanks for reporting; fixed.
I know that white space at the end of PHP file can cause various issues, but my favorite text editor inserts it and I sometimes forget to delete it… :long:
Hi,
I released version 1.2 of Field Value plugin.
In this release several new parameters were added allowing more control over formatting of the field values: “allow_img_url”, “auto_links”, “encode_email”, “encode_type”, “html_format” and “parse_smileys”.
About using these parameters read in the first post of this thread.
Thanks for your reply. I’m trying this…
{exp:field_value weblog="{segment_1}" url_title="{segment_2}"}{field_value_title}{/exp:field_value}
But it comes back with this error 😝
MySQL ERROR:
Error Number: 1054
Description: Unknown column 'field_id_' in 'field list'
Query: SELECT field_id_, field_ft_ FROM exp_weblog_data WHERE entry_id = '1343' LIMIT 1
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.