head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	2000.08.28.02.28.24;	author chuck;	state dead;
branches;
next	1.4;

1.4
date	2000.01.17.22.11.06;	author chuck;	state Exp;
branches;
next	1.3;

1.3
date	2000.01.16.18.49.40;	author chuck;	state Exp;
branches;
next	1.2;

1.2
date	99.08.04.04.16.00;	author chuck;	state Exp;
branches;
next	1.1;

1.1
date	99.07.20.07.36.29;	author jon;	state Exp;
branches;
next	;


desc
@@


1.5
log
@starting to modernize babel - nothing autogenerated, standard
directory/library names, etc.
@
text
@function run_profile (&$request_ref) {
  global $userid, $auth;
  
  if (!(restore_state($request_ref)))
    return error("could not restore state");
  
  if (!($username = $userid))
    return error("username not specified");
  
  $var_hash['username'] = $auth->auth_getusername($username);
  $var_hash['email'] = 'need a way to store/retrieve email addys for users';
  $var_hash['institution'] = 'default institution - keep this?';
  
  $var_hash['back'] = make_back_button($request_ref);
  
  if (!(build_navigation_bar($request_ref, $var_hash['nav_bar'])))
    return error("could not build navigation bar");
  
  if (!(build_status_bar($request_ref, $var_hash['status'])))
    return error("could not build status bar");
  
  if (!(build_search_button($request_ref, $var_hash['search'])))
    return error("could not build search button");
  
  $var_hash['body_tags'] = make_body_tags();
  
  if (!(print_template('profile', $var_hash)))
    return error("could not print profile template");
  
  return success();
}
@


1.4
log
@Another whomping commit that really doesn't do much tangible. The conf
system is now moved over to the $conf[section][value|subsection] mode that
the other cvs horde stuff is using.

Also, I'm compacting and tightening up the code wherever possible when I go.
Lots of major changes - moving the configuration of forums into the
database, changes in the database code for faster sql access, options to put
different forums in different tables/databases, and some nifty setup ideas -
to come.

Comments on what people would like to see in a forum system - I've already
thought of being able to attach files (where should they be stored?) - would
be welcome.
@
text
@@


1.3
log
@Babel no longer keeps it's own user table; it grabs Horde (phplib)
usernames/ids and uses those. We'll need to figure out a way of storing
email and fullname prefs with Horde accounts.
@
text
@d25 1
a25 1
  $var_hash['body_tags'] = make_body_tags($request_ref);
d27 2
a28 2
  if (!(print_template($request_ref->conf['profile_template'], $var_hash)))
    return error("could not print 'profile_template'");
@


1.2
log
@cjh: pruning out all the code that either isn't used or is only used for
maintaining/creating users - all of which is moving to Horde proper. Also a
few more fixes for the new session/user stuff, though I haven't quite gotten
rid of the "users" table yet - that's coming, though.

babel.php3 is a nice bit shorter, now... ;)

Anyway, a bit more work, and a better Horde user framework, and babel should
be more or less ready for primetime. oh, there's that whole customization
thing, too.

Speaking of which, what do people prefer: imp-style defaults.php3, or
babel-style babel.conf. I figure we should standardize on one; they're both
easy to auto-generate; babel's is maybe a little bit more overhead to parse,
but it's a bit more user friendly as well. Thoughts?
@
text
@d2 1
a2 1
  global $userid;
a6 3
  if (!($dbh = $request_ref->dbh))
    return error("database undefined");
  
d10 3
a12 17
  $query  = "SELECT email, institution FROM users ";
  $query .= "WHERE id = '$username'";
  
  if (!($sth = $dbh->prepare($query)))
    return error("could not prepare: " . $dbh->errstr);
  
  if (!($sth->execute()))
    return error("could not execute: " . $sth->errstr); 
  
  if (!($record = $sth->fetchrow()))
    return error("could not fetch row: $sth->errstr");
  
  $sth->finish();
  
  $var_hash['username'] = $username;
  $var_hash['email'] = $record[0];
  $var_hash['institution'] = $record[1];
@


1.1
log
@
jon: alrighty, babel.php3.in is now broken down into seperate
     function files.  they're jusy dying to be combined into
     objects and seperate source files.
@
text
@d2 1
a2 1
  global $user;
d10 1
a10 1
  if (!($username = $user))
d14 1
a14 1
  $query .= "WHERE username = '$username'";
@

