JMair Posted August 20, 2009 Share Posted August 20, 2009 Inside the shared_docs are folders named after teachers. These folders are shared and are mounted drives to the teacher. Anything they put into that drive is then shared on the site. Inside their folder is an index.php that displays everything in their folder. I would like to be able to add addition features for the teachers if they log into the site, however, I'm unable to retrieve the joomla login info from this location. I can from the www folder, but not further in.. How can I get that info from somewhere else in the site? here's an example of what works from www root, but not from any other directory. <?php //GET JOOMLA USERNAME define( '_JEXEC', 1 ); define('JPATH_BASE', dirname(__FILE__) ); define( 'DS', DIRECTORY_SEPARATOR ); require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); $mainframe =& JFactory::getApplication('site'); $mainframe->initialise(); $mainframe->route(); $user =& JFactory::getUser(); //gets and shows the joomla login users ID if they are logged into the joomla website. echo $user->get('id'); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.