Welcome to Geeklog, Anonymous Friday, April 12 2024 @ 09:44 am EDT

Geeklog Forums

gl_Intraab 3.0 released + code tweak for a php side block

Status: offline


Forum User
Full Member
Registered: 04/18/04
Posts: 148
Stable Release in my Production Enviroment, test it first to be sure it works for you.
Get Plugin

Noticed an error after I submitted v3.0 to fix search you will need to edit the sql.php file in the templates folder.
$query4 = "SELECT * FROM ".$_DB_table_prefix."intraab WHERE '".$_POST['searchtype']."' like '%".$_POST['searchterm']."%'";
Should Be:
$query4 = "SELECT * FROM ".$_DB_table_prefix."intraab WHERE ".$searchtype." like '%".$searchterm."%'";

Intraab should be Register_Globals = off Compatible now.

Major Change: Intraab now uses the same user id (uid) as the rest of Geeklog. (In preparation of gl_timecard (lite) which will be released sometime next week)

Please Note--- There is NO direct upgrade ability of existing Intraab installs to 3.0. I'm sorry for this inconvience, it was an oversight on my part. This functionality should have be part of Intraab at intial release as I knew I would need to make this change at a later date. The reason for no direct upgrade is that there is no simple and reliable way to merge users from gl_users with gl_intraab with out going one by one.

That said I will provide a tool for doing one-to-one merging next week. the Tool will create a temp table and copy the existing Intraab records, then delete the gl_intraab table and recreate it will the changes made to the table. The records will then step through one by one allowing you to assign them existing records in gl_users.
Other changes:
Fixed some minor bugs in the code.
Changed how the pages are called in index.php due to the Register_Globals = off change


Status: offline


Forum User
Full Member
Registered: 04/18/04
Posts: 148
Add the following code to the bottom of lib-common.php just before the '?>'

function phpblock_intrrab_search () {
$retval = "<form action=".$_CONF['site_url']."/intraab/index.php method=post>";
$retval .= "Choose Search Type: ";
$retval .= "<select name=searchtype>";
$retval .= "<option value=lastname>Last Name";
$retval .= "<option value=firstname>First Name";
$retval .= "</select><br>";
$retval .= "Enter Search Term: ";
$retval .= "<input name=searchterm type=text><br>";
$retval .= "<input name=Action type=hidden value=Search><br>";
$retval .= "<input type=submit value=Search>";
$retval .= "</form>";
$retval .= "<a href=".$_CONF['site_url']."/intraab/index.php>View Entire Phone List</a>";
return $retval;

1. Goto the the Blocks Admin screen click new
2. Title and Name your new block
3. Set 'Block Type:' to 'PHP Block'
4. paste "phpblock_intrrab_search" (without quotes) in to the 'Block Function:' field.
5. Save your block and postion as normal

TA! DA! you now have a PHP side block that allows the users to search you intranet address book from the main page!

All times are EDT. The time is now 09:44 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content