I have try many times and many ways to implement the "Tabs" using JsTools, but cannot success :( ,
by the way i have installed and enabled all JsTools Features, and I got the AJAX Feature inside it (very nice)

but when i try to create some tab page, my page cannot render the tabpage like in this site, http://stilbuero.de/jquery/tabs/
but it just render like common LIST and Header (UL -- LI and H2), like this below

* One
* Two
* Three

One
First tab content.
Two
Second tab content.
Three
Third tab content.
--------------------------------
i have tried to implement the simple tab page in my page.tpl.php page, like this script :

if (!$node) {
print my_tabs()
}

function my_tabs(){
$form = array();

$form['example1'] = array(
'#type' => 'tabset',
);
$form['example1']['tab1'] = array(
'#type' => 'tabpage',
'#title' => t('One'),
'#content' => t('First tab content.'),
);
$form['example1']['tab2'] = array(
'#type' => 'tabpage',
'#title' => t('Two'),
'#content' => t('Second tab content.'),
);
$form['example1']['tab3'] = array(
'#type' => 'tabpage',
'#title' => t('Three'),
'#content' => t('Third tab content.'),
);

return tabs_render($form);
}
---------------------------------------------------------
For the information, when i view the "view source" to my browser i cannot see the tabs.js inside it.., is it an issue ?
but i've tried to put it directly at the page.tpl.php file.., still cannot render :(

can anyone help me to resolve this problem... :(

@import "/ppds/modules/forum/forum.css";@import "/ppds/modules/jstools/collapsiblock/collapsiblock.css";@import "/ppds/modules/node/node.css";@import "/ppds/modules/system/defaults.css";@import "/ppds/modules/system/system.css";@import "/ppds/modules/user/user.css";@import "/ppds/modules/acidfree/acidfree.css";@import "/ppds/modules/jstools/activeedit/activeedit.css";@import "/ppds/themes/abac/style.css";@import "/ppds/modules/jstools/activemenu/activemenu.css";

----------------------------------------------------------------------------------------

Please help me to solve this problem :(

Comments

vm’s picture

taken from the example in tabsexample.module in the 5.x-dev version of jsTools

see:

/**
 * Generate an example set of tabs.
 */
function tabsexample_form() {
  $form = array();

  $form['example1'] = array(
    '#type' => 'tabset',
  );
  $form['example1']['tab1'] = array(
    '#type' => 'tabpage',
    '#title' => t('One'),
    '#content' => t('First tab content.'),
  );
  $form['example1']['tab2'] = array(
    '#type' => 'tabpage',
    '#title' => t('Two'),
    '#content' => t('Second tab content.'),
  );
  $form['example1']['tab2']['tabset2'] = array(
    '#type' => 'tabset',
  );
  $form['example1']['tab2']['tabset2']['tab1'] = array(
    '#type' => 'tabpage',
    '#title' => t('One'),
    '#content' => t('First tab content.'),
  );
  $form['example1']['tab2']['tabset2']['tab2'] = array(
    '#type' => 'tabpage',
    '#title' => t('Two'),
    '#content' => t('Second tab content.'),
  );
  $form['example1']['tab3'] = array(
    '#type' => 'tabpage',
    '#title' => t('Three'),
    '#content' => t('Third tab content.'),
  );
  
  return $form;
}

_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and you feed them for a lifetime

rredika’s picture

I've paste that function ,
output is --> Array

but when i modify that function at the last of that function...
return tabs_render($form);
}

i got same result like what previous problem :( :(

what actually the problem :(

when i view my view source , I see JS File like this below :

script type="text/javascript" src="/ppds/misc/jquery.js">

script type="text/javascript" src="/ppds/misc/drupal.js">

script type="text/javascript" src="/ppds/modules/jstools/jstools.js">

script type="text/javascript" src="/ppds/modules/jstools/activemenu/activemenu.js">

script type="text/javascript" src="/ppds/modules/jstools/collapsiblock/collapsiblock.js">

script type="text/javascript" src="/ppds/modules/jstools/jquery.cookie.js">

script type="text/javascript" src="/ppds/modules/jstools/dynamicload/dynamicload.js">

script type="text/javascript" src="/ppds/misc/progress.js">

script type="text/javascript" src="/ppds/modules/acidfree/acidfree.js">

script type="text/javascript" src="/ppds/misc/collapse.js">

script type="text/javascript" src="/ppds/modules/jstools/activeedit/activeedit.js">

the tabs.js file, look like not load..

vm’s picture

sorry i should have been clearer, download the 5.x-dev version and take a look at the tabsexample.module file in total. if necessary enable the module. what the tabsexample.module shows http://dev.verymisunderstood.com/tabsexample

what i get when I add the sample code

<?php  
$form = array();

  $form['example1'] = array(
    '#type' => 'tabset',
  );
  $form['example1']['tab1'] = array(
    '#type' => 'tabpage',
    '#title' => t('One'),
    '#content' => t('First tab content.'),
  );
  $form['example1']['tab2'] = array(
    '#type' => 'tabpage',
    '#title' => t('Two'),
    '#content' => t('Second tab content.'),
  );
  $form['example1']['tab3'] = array(
    '#type' => 'tabpage',
    '#title' => t('Three'),
    '#content' => t('Third tab content.'),
  );

  return tabs_render($form);

to a page content type, with the PHP input format. see: see : http://dev.verymisunderstood.com/node/1

again , I am using the jsTools 5.x-dev release dated August 9 2007
_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and you feed them for a lifetime

rredika’s picture

I've used drupal 5.x huhuhuhhuhuhu :((

vm’s picture

the 5.x-dev version is not the same as the 5.x-0.8 version. could you please state specifically WHAT version you are using. 5.x is not a full version number that anyone can follow or track for you.
_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and you feed them for a lifetime

shawnpetriw’s picture

The way the code is written it looks like the tabs should be in the order of Tab 1, Tab 2, Tab 3.

But The order on your example (and from my install of tabsexample) is Tab 2, Tab 1, Tab 3.

This makes no sense to me at all.

vm’s picture

drupal search to the rescue: http://drupal.org/node/166571

___________________________________________________________
The search tool on Drupal.org really does work.
This message has been brought to you by:
the letter X , the letter Z and the number 2.
Thanks for watching! : )
rredika’s picture

I think, i used Drupal 5.1 version

is it work for tabs (JsTool) ?

vm’s picture

there is no version called 5.1.

the lastest public release is 5.x-0.8 the next version is being built in 5.x-dev (which you also have access to using the project page of JStools clicking on the view all releases link.)

to find out exactly what version you are using. download a new copy and un tar it, look at the top line of jstools.module and compare it with the one you have already uploaded.

All i did was copy the code from the readme.txt file and place it in a page content type submitting using the php input format as previously stated.
_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and you feed them for a lifetime

rredika’s picture

in which file or what menu i can read my drupal version exactly ?

but instead of it i will try for the newest version..

vm’s picture

to be a bit clearer: to find out exactly what version you are using. download a new copy and un tar it, look at the top line of jstools.module file inside the download and compare it with the jstools.module file you have already uploaded.
_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and you feed them for a lifetime