wouldhide, i would just use the current version and upgrade the core whenever a new version comes out. As long as you don’t modify the core, updating is a simple copy/paste.
abmcr, Why not structure it like the FieldSet plugin? that way you wouldn’t need to modify the codex_form.php view and make your plugin a one-file download 😊
Yes i have made it like FieldSet, but it is need to create int the HTML a
<ul>
<li><a href="#div1">Div1</a></li>
<li><a href="#div2">Div2</a></li>
<li><a href="#div3">Div3</a></li
</ul>my plugin is
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
include_once('formcontainer.php');
class TabSet extends FormContainer
{
function TabSet($name,$params) {
FormContainer::FormContainer($name,$params);
}
function getHTML()
{
$CI = &get;_instance();
$CI->codextemplates->css('ui.tabs-css','flora.tabs.css');
$CI->codextemplates->js('ui.tabs-core-js','ui.core.min.js');
$CI->codextemplates->js('ui.tabs-js','ui.tabs.min.js');
$CI->codextemplates->js('ui.tabs-init','ui.tabs.init.js');//set the init js
$html = "\n<div id='".underscore($this->label)."'>".$this->label;
$html .= $this->form->getHTML();
$html .= "\n</div>";
return $html;
}
}
?>How i do this code into the plugin?
$array_tab=array();
foreach($this->codexadmin->form_setup as $name=>$params){
if(in_array('TabSet',$params)){
$array_tab[].="<a ><span>".humanize($name)."</span></a>";
}
}
echo ul($array_tab);? Thank you… ciao!