Custom field display value doesn't work

Daegaladh

Member
I'm making a plugin to show different images and stuff depending on custom fields, in ranking_compile_stats, but display value doesn't work.
acf_xxx show the correct value, but acf_xxx_display does nothing

I'm using 1.3
 
Last edited:

Mark

Administrator
Staff member
works perfect for me.

I created a custom field with an ID of: started

pasted: {$acf_started} in the templates and it worked as expected.
 

Mark

Administrator
Staff member
sorry I have no idea what you mean, {$acf_started} clearly displays the value...
 

Daegaladh

Member
I mean the dropdown select fields

In my case:

Type: Dropdown select
Template Tag ( internal value ): {$acf_mode}
Template Tag ( display value ): {$acf_mode_display}


{$acf_mode} works fine, but {$acf_mode_display} shows nothing
 

Mark

Administrator
Staff member
Thank you for providing a more detailed example.

However this also works prefect for me.

I created a dropdown called hello, added 2 values:

Value: 1
Display: Hello1

Value: 2
Display: Hello2

I then added {$acf_hello_display} to table_row and the output is Hello1 when viewing the list after editing my member and selecting this choice.

Your clearly missing something.
 
Last edited:

Daegaladh

Member
Ok, thanks, and sorry, I've realized the fields were blank, since I've copied the sites table from an old backup

Another quick question: I want to make a simple plugin to add some checks in premium_list_row, what filename should I use? I've tried skin_global and some others, but doesn't work
 

Mark

Administrator
Staff member
you need to look at the PHP files, establish where your code needs to be injected and use the hook name as the file name.
 

Daegaladh

Member
Yeah, I've looked into skin.php, and skin_global hook is just after the premium_list code, but does nothing, should I place it before?
 

Mark

Administrator
Staff member
why not just try it? if you think you might need us to add a new hook location, you will once again need to invest more energy into your question and let us know exactly what you are trying to accomplish.
 

Daegaladh

Member
Yeah, I've made a new hook and works like a charm, thanks:

$TMPL['category_url'] = urlencode($prem_cat_url);
eval (PluginManager::getPluginManager ()->pluginHooks ('premium_list'));
$TMPL['premium_list_row'] .= base::do_skin('premium_list_row');
 

Mark

Administrator
Staff member
to stick with naming convention the new hook is as follows, you will want to tweak your code so it doesnt break next release.

Code:
eval (PluginManager::getPluginManager ()->pluginHooks ('skin_premium_list'));
 
Top