[SOLVED] Modifiying CB teplate

13 years 10 months ago #136962 by agouldtdc
Replied by agouldtdc on topic Re:Modifiying CB template
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!).

Please Log in to join the conversation.

13 years 10 months ago #136964 by krileon
Replied by krileon on topic Re:Modifiying CB template
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).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 10 months ago #136969 by agouldtdc
Replied by agouldtdc on topic Re:Modifiying CB template
Thanks for this detailed information.

I'm trying to determine how I can modify the CB template that I use (OSX). I know I can modify the CSS but I was wondering if I can also alter the HTML so I can change the layout. I see this is not possible.

What I am trying to determine now is if I can add a field delimiter to a tab created by a newsletter component. This mean I could improve the appearance (e.g place an <hr/> above the first newsletter field and add some explanatory information. When I add a field delimiter (or any other one) I cannot add it to the tab created by the plug-in, only to those created within CB itself (please see attachment). I assume I'll need to speak with the plug-in developer.

Post edited by: agouldtdc, at: 2010/07/01 20:32

Post edited by: agouldtdc, at: 2010/07/01 20:33
Attachments:

Please Log in to join the conversation.

13 years 10 months ago #136973 by agouldtdc
Replied by agouldtdc on topic Re:Modifiying CB template
Sorry, but the forum wouldn't let me upload the image so here it is...

Post edited by: agouldtdc, at: 2010/07/01 20:35
Attachments:

Please Log in to join the conversation.

13 years 10 months ago #136976 by Rapunzl
Replied by Rapunzl on topic Re:Modifiying CB template
Tabs are listed in the Tab Manager. You're referring to a field created by your plugin. I think that's where the confusion is coming in. A delimiter field is a field in itself that simply places text where you want it using the ordering of fields.

Jamie (Rapunzl)
Community Builder Team Member

Before posting on forums: Read all CB Articles | Specially the FAQ | Help us help you
CB links: Subscribe to CB documentation | [url=http://www.joomlapolis.com/content/view/7363/37/
]Our templates[/url] | [url=http://www.joomlapolis.com/content/blogcategory/61/74/
]Paid Subscriptions[/url] | Get Hosting | Our Forge
Visit my CB Profile

My personal site Rapunzl's Reality always under reconstruction

Please Log in to join the conversation.

13 years 10 months ago #137001 by agouldtdc
Replied by agouldtdc on topic Re:Modifiying CB template
I know. I would like to add a delimiter above the first newsletter field. When I add one in Field Manager I cannot select the newsletter tab (CB requires the tab to be defined).

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.301 seconds

Facebook Twitter LinkedIn