zupidupi
Freshman
Offline
Posts: 25
|
 |
« Reply #2 on: February 09, 2008, 09:00:53 am » |
|
Thx, boldee, for the tip. I did, and got the answer 0, checked like this (I've done some fiddling around in the code since I didn't get the ff_getPageByName-call to work, either).
I'e done a bit of coding, so I understand well what we're after here, but a php-environment is somewhat new to me (I know perl, though) and this is my first hack under the Joomla-hood. So, any suggestions/answers can be fairly technical!
// declare our variables and set exists to 0 global $my, $exists; $exists = 0;
//look through the tables to see if mos_tbd_tags is in the Mambo database.
$dataset = mysql_query('SHOW TABLES') ;
while ($row = mysql_fetch_row($dataset)) { if ( $row[0] == "jos_tbd_tags" ) { $exists = 1; break; } } // if it exists got to page 1
if ($exists == 1) { // $this->page = ff_getPageByName('ftb_intro'); $this->page = 1; // if it does not exist send the form to the correct page for user type } else { if ($my->usertype == "Super Administrator") { // $this->page = ff_getPageByName('ftb_ctable'); $this->page = 2; } else { // $this->page = ff_getPageByName('ftb_ntable'); echo "$my->id: ".$my->id; $this->page = 3; } }
|