agouldtdc wrote:
Most helpful. I just need to work out how these can be applied to fields displayed by plug-ins. I can add them to standard CB fields but there is no option to do this for tabs created by plug-ins (that I can see yet anyway!).
What exactly are you trying to do? Create tabs via a plugin and/or create fields via a plugin? To create a tab you'd need to add extra XML to your plugins XML file. Please see the following example.
[code:1]
<tabs>
<tab name="MyTab" description="" class="getmytabTab" fields="0" position="cb_tabmain" displaytype="tab" ordering_register="1">
<params>
</params>
</tab>
</tabs>
[/code:1]
You could of course add parameters to the tab if you see fit which would be visible when editing the tab in Tab Management. The class should match your PHP class that calls your display tab function.
The following is an example of creating a new fieldtype.
[code:1]
<fieldtypes>
<field type="myfield" label="MyField" unique="true">
<database version="1">
<table name="#__comprofiler" class="moscomprofiler" maintable="true" strict="false" drop="never" shared="true">
<columns>
<column name="" nametype="namesuffix" type="sql:text" unsigned="true" null="true" default="NULL" />
</columns>
<indexes strict="false">
<index name="" nametype="namesuffix">
<column name="" nametype="namesuffix" />
</index>
</indexes>
</table>
</database>
<params>
</params>
</field>
</fieldtypes>
[/code:1]
The above would give you a new fieldtype, but of course needs to be triggered within PHP using the following structure.
[code:1]
$_PLUGINS->registerUserFieldParams();
$_PLUGINS->registerUserFieldTypes( array( 'myfield' => 'myfieldclass' ) );
[/code:1]
The above are simply examples and would need modification of course.
If all you're wanting to do is adjust their appearance then the displayed fields alternate the classes
sectiontableentry1 and
sectiontableentry2, which is one of the easiest methods to edit fields. You could also target all fields using the following two classes
titleCell and
fieldCell. For more specific classes that are generated on the fly you'd need to examine your site as I can not tell you those. If you want to modify the actual HTML then you can't without core changes which aren't supported (and can't advise you on).