FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » FUDforum in eGroupWare » Link to "About Fudforum" in eGW
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Link to "About Fudforum" in eGW [message #34683 is a reply to message #34677] Tue, 14 November 2006 16:56 Go to previous messageGo to previous message
kaype is currently offline  kaype   Canada
Messages: 10
Registered: September 2006
Location: Canada
Karma:
Junior Member
Thanks Ilia, but what do I need to do to make sure make sure it loads GLOBALS.php before calling fud_use() function?

Here is my "class.fud_sidebox_hooks.inc.php" code.

<?php
	/****************************************************************************\
	* phpGroupWare - FUDforum 2.6.0 equivalent                                   *
	* http://fud.prohost.org/                                                    *
	* Written by Ilia Alshanetsky <ilia(at)prohost(dot)org>                             *
	* -------------------------------------------                                *
	*  This program is free software; you can redistribute it and/or modify it   *
	*  under the terms of the GNU General Public License as published by the     *
	*  Free Software Foundation; either version 2 of the License, or (at your    *
	*  option) any later version.                                                *
	\****************************************************************************/

class fud_sidebox_hooks
{
	function all_hooks($args)
	{
		if (!function_exists('db_saq')) {
			fud_use('db.inc');
		}
		$GLOBALS['adm_file'] = array();
		list($GLOBALS['fudh_uopt'], $theme_name) = db_saq("SELECT u.users_opt, t.name FROM phpgw_fud_users u INNER JOIN phpgw_fud_themes t ON t.id=u.theme WHERE u.id!=1 AND u.egw_id=".(int)$GLOBALS['phpgw_info']['user']['account_id']);
		$GLOBALS['fudh_uopt'] = (int) $GLOBALS['fudh_uopt'];
		if (!empty($GLOBALS['phpgw_info']['user']['apps']['admin'])) {
			$GLOBALS['fudh_uopt'] |= 1048576;
		}
		include_once($GLOBALS['DATA_DIR'].'include/theme/'.str_replace(' ', '_', $theme_name).'/usercp.inc');

		/* regular user links */
		if (!empty($GLOBALS['t'])) {
			display_sidebox('fudforum', lang('Preferences'), $GLOBALS['usr_file']);
		}

		/* admin stuff */
		if ($GLOBALS['adm_file']) {
			display_sidebox('fudforum', lang('Administration'), $GLOBALS['adm_file']);
		}
	}
}

?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: German language trouble in eGroupware post.php T_String 2018
Next Topic: How to install?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Jun 16 18:49:32 GMT 2024

Total time taken to generate the page: 0.05062 seconds