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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Link to "About Fudforum" in eGW [message #34671] Mon, 13 November 2006 23:28 Go to next message
kaype is currently offline  kaype   Canada
Messages: 10
Registered: September 2006
Location: Canada
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
I installed FUDforum on eGW - everything works fine with one issue - when I click on "About Fudforum" on thr left menu on eGW I get the following error message.

Fatal error: Call to undefined function: fud_use() in /home/open/public_html/egroupware/fudforum/inc/class.fud_sidebox_hooks.inc.php on line 18


I read there here there may be issues may in the globals.php so below is what I have in globals.php...any idea why I may have this error?

<?php
/***************************************************************************
* copyright            : (C) 2001-2003 Advanced Internet Designs Inc.
* email                : forum(at)prohost(dot)org
* $Id: GLOBALS.php 14797 2004-04-03 18:35:35Z iliaa $
*
* 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.
***************************************************************************/

	$INCLUDE 		= "/home/open/tmp/egroup/files/fudforum/3814588639/include/";
	$WWW_ROOT 		= "/egroupware/fudforum/3814588639/";
	$WWW_ROOT_DISK		= "/home/open/public_html/egroupware/fudforum/3814588639/";
	$DATA_DIR		= "/home/open/tmp/egroup/files/fudforum/3814588639/";
	$ERROR_PATH 		= "/home/open/tmp/egroup/files/fudforum/3814588639/errors/";
	$MSG_STORE_DIR		= "/home/open/tmp/egroup/files/fudforum/3814588639/messages/";
	$TMP			= "/home/open/tmp/egroup/files/fudforum/3814588639/tmp/";
	$FILE_STORE		= "/home/open/tmp/egroup/files/fudforum/3814588639/files/";
	$FORUM_SETTINGS_PATH 	= "/home/open/tmp/egroup/files/fudforum/3814588639/cache/";

	$FUD_OPT_1		= 1743713469;
	$FUD_OPT_2		= 695537725;
	$FUD_OPT_3		= 0;

	$CUSTOM_AVATAR_MAX_SIZE = 10000;	/* bytes */
	$CUSTOM_AVATAR_MAX_DIM	= "64x64";	/* width x height (pixels) */

	$DBHOST_TBL_PREFIX	= "phpgw_fud_";	/* do not modify this */

	$FUD_SMTP_SERVER	= "";
	$FUD_SMTP_TIMEOUT	= 10;		/* seconds */
	$FUD_SMTP_LOGIN		= "";
	$FUD_SMTP_PASS		= "";

	$ADMIN_EMAIL 		= "";

	$PRIVATE_ATTACHMENTS	= 5;		/* int */
	$PRIVATE_ATTACH_SIZE	= 1000000;	/* bytes */
	$MAX_PMSG_FLDR_SIZE	= 300000;	/* bytes */

	$FORUM_IMG_CNT_SIG	= 2;		/* int */
	$FORUM_SIG_ML		= 256;		/* int */

	$UNCONF_USER_EXPIRY	= 7;		/* days */
	$MOVED_THR_PTR_EXPIRY	= 3;		/* days */

	$MAX_SMILIES_SHOWN	= 15;		/* int */
	$DISABLED_REASON	= "Temporarily offline; please come back soon!";
	$POSTS_PER_PAGE 	= 40;
	$THREADS_PER_PAGE	= 40;
	$WORD_WRAP		= 60;
	$NOTIFY_FROM		= "";		/* email */
	$ANON_NICK		= "";
	$ANON_PASS		= "";
	$FLOOD_CHECK_TIME	= 60;		/* seconds */
	$SERVER_TZ		= "America/Montreal"; /* timezone code from tz.inc */
	$SEARCH_CACHE_EXPIRY	= 172800;	/* seconds */
	$MEMBERS_PER_PAGE	= 40;
	$POLLS_PER_PAGE		= 40;
	$THREAD_MSG_PAGER	= 5;
	$GENERAL_PAGER_COUNT	= 15;
	$EDIT_TIME_LIMIT	= 0;
	$LOGEDIN_TIMEOUT	= 5;		/* minutes */
	$MAX_IMAGE_COUNT	= 10;
	$STATS_CACHE_AGE	= 600;		/* seconds */
	$FORUM_TITLE		= "";
	$SITE_HOME_PAGE		= "";
	$MAX_LOGIN_SHOW		= 25;
	$MAX_LOCATION_SHOW	= 25;
	$SHOW_N_MODS		= 2;

	$TREE_THREADS_MAX_DEPTH	= 15;
	$TREE_THREADS_MAX_SUBJ_LEN = 75;

	$REG_TIME_LIMIT		= 60;		/* seconds */
	$POST_ICONS_PER_ROW	= 9;		/* int */
	$MAX_LOGGEDIN_USERS	= 25;		/* int */
	$PHP_COMPRESSION_LEVEL	= 9;		/* int 1-9 */
	$MNAV_MAX_DATE		= 31;		/* days */
	$MNAV_MAX_LEN		= 256;		/* characters */

	$RDF_AUTH_ID		= 0;		/* 0 - treat as anon user, >0 treat like specific forum user */
	$RDF_MAX_N_RESULTS	= 100;		/* int */

	$PDF_PAGE		= "letter";	/* string */
	$PDF_WMARGIN		= 15;		/* int */
	$PDF_HMARGIN		= 15;		/* int */
	$PDF_MAX_CPU		= 60;		/* seconds */

/* DO NOT EDIT FILE BEYOND THIS POINT UNLESS YOU KNOW WHAT YOU ARE DOING */

	require($INCLUDE.'core.inc');
?>
Re: Link to "About Fudforum" in eGW [message #34677 is a reply to message #34671] Tue, 14 November 2006 09:48 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Your GLOBALS.php looks perfectly correct to me. The error you are showing is the result if core.inc not being loaded. You may want to open the " /home/open/public_html/egroupware/fudforum/inc/class.fud_sidebox_hooks.inc. php " script and make sure it loads GLOBALS.php before calling fud_use() function. The globals file automatically will load the core.inc from the include directory.

FUDforum Core Developer
Re: Link to "About Fudforum" in eGW [message #34683 is a reply to message #34677] Tue, 14 November 2006 11:56 Go to previous messageGo to next message
kaype is currently offline  kaype   Canada
Messages: 10
Registered: September 2006
Location: Canada
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
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']);
		}
	}
}

?>
Re: Link to "About Fudforum" in eGW [message #34697 is a reply to message #34683] Tue, 14 November 2006 21:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
You need to put it before the fud_use('db.inc'); function call.

FUDforum Core Developer
Re: Link to "About Fudforum" in eGW [message #34700 is a reply to message #34671] Tue, 14 November 2006 21:55 Go to previous messageGo to next message
kaype is currently offline  kaype   Canada
Messages: 10
Registered: September 2006
Location: Canada
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
May be I did not ask the Q the right way - what is the code I need add before the fud_use('db.inc'); function call to make sure it loads GLOBALS.php?
I am sorry, if it is a silly Q, I am not a PHP person Embarassed
Re: Link to "About Fudforum" in eGW [message #34713 is a reply to message #34700] Wed, 15 November 2006 12:22 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
include "/home/open/tmp/egroup/files/fudforum/3814588639/include/GLOBALS.php";

is the code you need to add.


FUDforum Core Developer
Re: Link to "About Fudforum" in eGW [message #34745 is a reply to message #34713] Thu, 16 November 2006 17:51 Go to previous messageGo to next message
kaype is currently offline  kaype   Canada
Messages: 10
Registered: September 2006
Location: Canada
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Thanks Ilia, I added "include "/home/open/tmp/egroup/files/fudforum/3814588639/include/GLOBALS.php";" before "class fud_sidebox_hooks" but now when I click on the FUDforum icon in eGW it gives me the following error,

Fatal error: Cannot redeclare rls_db_lck() (previously declared in /home/open/tmp/egroup/files/fudforum/3814588639/include/core.inc:20) in /home/open/tmp/egroup/files/fudforum/3814588639/include/core.inc on line 18



One more Q I have regarding FF for eGW is the ACL implementation.
How can I grant access to a certain Category/Forum to users/groups?
Re: Link to "About Fudforum" in eGW [message #34746 is a reply to message #34745] Thu, 16 November 2006 18:11 Go to previous messageGo to next message
kaype is currently offline  kaype   Canada
Messages: 10
Registered: September 2006
Location: Canada
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
You can neglect my 2nd Q, I found the "Groups Manager" with a great ACL in the Admin > Fudforum > Site configuration*
Re: Link to "About Fudforum" in eGW [message #34751 is a reply to message #34745] Thu, 16 November 2006 19:04 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Can you try changing "include" into "include_once" ?

FUDforum Core Developer
Re: Link to "About Fudforum" in eGW [message #34764 is a reply to message #34751] Thu, 16 November 2006 23:44 Go to previous messageGo to next message
kaype is currently offline  kaype   Canada
Messages: 10
Registered: September 2006
Location: Canada
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Yes! That did the trick! Thanks a ton!! Smile

Now I am trying setup ACL using "Groups Manager", I am able to set up different forums with different access controls. Which works great for me.

Now the Q I have is, I have a super admin login for eGW and I have other users who are also admins. Now I want to know how can an admin create forums which cannot assessed by any users (including admins and super admin) other than the users set by that admin. Also other admins should not be able to edit/access these permissions.

Other applications in eGW like the file manager (myDMS) allows me to set such private permissions.

[Updated on: Thu, 16 November 2006 23:46]

Report message to a moderator

Re: Link to "About Fudforum" in eGW [message #34785 is a reply to message #34764] Fri, 17 November 2006 10:26 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
FUDforum does not, you can make access restricted forums, but a forum admin will always have access to groups necessary to gain/remove access from those forums.

FUDforum Core Developer
Re: Link to "About Fudforum" in eGW [message #34796 is a reply to message #34785] Fri, 17 November 2006 16:30 Go to previous message
kaype is currently offline  kaype   Canada
Messages: 10
Registered: September 2006
Location: Canada
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
OK, thanks for confirming
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Mon Dec 11 04:42:00 EST 2017

Total time taken to generate the page: 0.00684 seconds