EllisLab text mark
Advanced Search
1 of 2
1
   
Plugin: Field Value
Posted: 12 March 2009 07:42 PM   [ Ignore ]
Avatar
Joined: 2007-02-02
981 posts

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} 
 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

 
Posted: 24 September 2009 12:35 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2006-02-22
424 posts

This (and all of your other plugs) rocks! Thank you!!!

 Signature 

EE2 Plugins: Eencode, Includee, Keywordz, x2html, SizePlus, APStylee

 
Posted: 24 September 2009 12:50 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2006-02-22
424 posts

Hello,

Just wanted to post info about a small bug.

After installing, I went to the plugins page and saw this:

Warningsession_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:281in /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

 Signature 

EE2 Plugins: Eencode, Includee, Keywordz, x2html, SizePlus, APStylee

 
Posted: 27 September 2009 08:44 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2007-02-02
981 posts

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 face

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

 
Posted: 27 September 2009 07:32 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2006-02-22
424 posts

Thanks for fixing! Like I said before, I love all of your addons! You do excellent work.

This plugin is saving me from having to use the weblog:entries tag for a bunch of extraneous stuff. smile

Cheers!
Micky

 Signature 

EE2 Plugins: Eencode, Includee, Keywordz, x2html, SizePlus, APStylee

 
Posted: 11 November 2009 11:28 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2007-02-02
981 posts

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.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

 
Posted: 22 November 2009 09:30 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Joined: 2007-06-06
187 posts

I’m guessing the advantage of this plugin is it’s a lot lighter on database queries?

 
Posted: 22 November 2009 02:05 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2007-02-02
981 posts

Hi,

Yes, it’s lighter on database queries.

In addition to that this plugin can be used inside exp:weblog:entries tag pair, or exp:weblog:entries tag pair can be wrapped by exp:field_value tag pair; you cannot nest two exp:weblog:entries tags.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

 
Posted: 24 November 2009 05:53 PM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Joined: 2007-06-06
187 posts

Hi,

maybe i’m being stpuid but i don’t get how t use this. I want the following to ouput the title for my entry. Have i misunderstood the “field_value” prefix?

{exp:field_value url_title="1343"}{field_value_title}{/exp:field_value} 
 
Posted: 24 November 2009 06:02 PM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Joined: 2006-02-22
424 posts

Hi NKT,

Note the placement of the “or” and the “and”:

Either “entry_id” or “weblog” and “url_title” parameters must be defined.

I could be wrong, but it looks like you also need an entry_id or weblog param defined. smile

 Signature 

EE2 Plugins: Eencode, Includee, Keywordz, x2html, SizePlus, APStylee

 
Posted: 25 November 2009 06:58 AM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Joined: 2007-06-06
187 posts

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 tongue rolleye

MySQL ERROR:

Error Number1054

Description
Unknown column 'field_id_' in 'field list'

QuerySELECT field_id_field_ft_ FROM exp_weblog_data WHERE entry_id '1343' LIMIT 1 
 
Posted: 25 November 2009 07:20 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Joined: 2006-02-22
424 posts
NKT com - 25 November 2009 11:58 AM
{exp:field_value weblog="{segment_1}" url_title="{segment_2}"}{field_value_title}{/exp:field_value} 

Quick question… Are you sure that segment_1 and segment_2 are returning what you expect?

 Signature 

EE2 Plugins: Eencode, Includee, Keywordz, x2html, SizePlus, APStylee

 
Posted: 25 November 2009 08:36 AM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2007-02-02
981 posts

Hi,

This plugin outputs only values of custom fields; it does not output the value of title field.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

 
Posted: 25 November 2009 12:09 PM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Avatar
Joined: 2006-09-06
513 posts

If you’re looking to output the title, Low’s Title Plugin works really well.

 Signature 

Kyle Summer | smartpill design | New Haven, CT |  twitter

 
Posted: 20 January 2010 11:25 AM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Joined: 2007-06-06
187 posts

How early is this tag parsed?

Would it be possible to turn this into a single tag also to reduce space…

{exp:field_value entry_id="251" field="extented_summary"

This plugin could be perfect for setting site wide interface settings and text if it was passed early enough.

 
Posted: 20 January 2010 02:09 PM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Joined: 2007-06-06
187 posts

Looks like this extension doesn’t work with FF Matrix fields. Any chance of supporting these?

Thanks.

 
1 of 2
1