Skip to content

Commit

Permalink
work since 0.14.8
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@248 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
prescience committed May 7, 2001
1 parent 6e79a0e commit af08201
Show file tree
Hide file tree
Showing 9 changed files with 283 additions and 48 deletions.
169 changes: 169 additions & 0 deletions HOWTO-mantis-phorum
@@ -0,0 +1,169 @@
#############################################################################
### HOWTO-mantis-phorum ####
#############################################################################

This file details the steps needed to allow phorum to be smoothly integrated
into Mantis.

### Required:

* Mantis 0.15.x or later
* phorum 3.x series

phorum: http://www.phorum.org/


### Setup: We will proceed assuming the following setup:

* Your web root (usually htdocs for apache) is /usr/local/apache/htdocs/
(On a windows box it would look something like this
C:\\apache\\htdocs\\mantis\\ instead. Adapt to reflect your setup)
* Mantis is installed in /usr/local/apache/htdocs/mantis/

#################################
Step 0:
#################################

Mantis is installed and running properly. Download phorum and store it on the
server.

#################################
Step 1: Install phorum
#################################
Install phorum by unzipping it to a directory. We will install it in
/usr/local/apache/htdocs/mantis/phorum/

#################################
Step 2: Configure phorum.
#################################

Use the same database as Mantis. Follow the rest of the phorum configuration
steps.

#####################################
Step 3: Add phorum link to the menu
#####################################

Open up menu_inc.php and add the following line (right after summary is a good
idea):

<a href="<? echo $g_path ?>phorum/">Forum | </a>

You could wrap it in a if check (see code in menu_inc.php for examples) if
you'd like only users with a certain access level to view the forum link.

#################################
Step 4: Integrate with Mantis
#################################

Right now you can get to forum but there are no links with the rest of Mantis.
It's functional but not nicely integrated.

#################################
Step 4a: Header
#################################

Open up /usr/local/apache/htdocs/mantis/phorum/include/header.php - You may
want to make a backup because we're going to make large modifications.

Replace the file with the following lines:

#-----------------------------------------------------------------------------
<? include( "/usr/local/apache/htdocs/mantis/core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_connect($g_hostname,$g_db_username,$g_db_password,$g_database_name);

### extracts the user information for the currently logged in user
### and prefixes it with u_
$query = "SELECT *
FROM $g_mantis_user_table
WHERE cookie_string='$g_string_cookie_val'";
$result = db_query( $query );
$row = db_fetch_array( $result );
if ( $row ) {
extract( $row, EXTR_PREFIX_ALL, "u" );
}
?>
<? print_html_top() ?>
<? print_head_top() ?>
<? print_title( $g_window_title." phorum" ) ?>
<? print_css( "/usr/local/apache/htdocs/mantis/".$g_css_include_file ) ?>
<? include( "/usr/local/apache/htdocs/mantis/".$g_meta_include_file ) ?>
<meta name="Phorum Version" content="<?PHP echo $phorumver; ?>">
<meta name="Phorum DB" content="<?PHP echo $DB->type; ?>">
<meta name="PHP Version" content="<?PHP echo phpversion(); ?>">
<? print_head_bottom() ?>
<? print_body_top() ?>
<? print_header( $g_page_title." ".$ForumName ) ?>
<? print_top_page( $g_top_include_page ) ?>
<? print_menu( "/usr/local/apache/htdocs/mantis/".$g_menu_include_file ) ?>
<p>
#-----------------------------------------------------------------------------

This is pretty much copy+pasted from the normal mantis files with tweaks to
make sure errors are avoided.

NOTE: If you get include errors for config_inc.php then edit the top two lines
in core_API.php

require( "/usr/local/apache/htdocs/mantis/config_inc.php" );
require( "/usr/local/apache/htdocs/mantis/strings_".$g_language.".txt" );

For extra security in limiting users from accessing the forum you can place
access level check code right after the db_connect() call.

#################################
Step 4b: Footer
#################################

Replace /usr/local/apache/htdocs/mantis/phorum/include/footer.php with the
following lines:

#-----------------------------------------------------------------------------
<br>
<center><a href="http://phorum.org"><img src="images/button.gif" width="90"
height="30" alt="phorum.org" border="0"></a></center>
<p>
<? print_bottom_page( $g_bottom_include_page ) ?>
<? print_footer(__FILE__) ?>
<? print_body_bottom() ?>
<? print_html_bottom() ?>
#-----------------------------------------------------------------------------

NOTE: The show source link is likely to be broken. It shouldn't be important
so we won't try to make it work.

###################################
Step 5: Auto Filling Posting Data
###################################

At this point everything is functioning acceptably. Only users that are
logged into Mantis can access forum thanks to the login_cookie_check() in
phorum's header.php.

Now we'll get down to making phorum a bit easier to work with. One aspect of
phorum is that it allows anonymous posting because it does not use a user
authentication method. This is one reason why it makes it fairly simple to
integrate with Mantis. The drawback is that you need to type in your username
and email address constantly. To avoid this we'll automatically fill these
fields in by using our Mantis information.

Open up /usr/local/apache/htdocs/mantis/phorum/include/form.php.

Begin by adding these lines near the end of the first chunk of php code (line
53):

$p_author = get_current_user_field( "username" );
$p_email = get_current_user_field( "email" );

Now the username and email fields should be automatically filled in each time.

###################################
FINISHED!
###################################

You're now finished integrating phorum with Mantis!

If you wish to report any errors, comments, or suggestions please send email
to kenito@300baud.org
49 changes: 49 additions & 0 deletions devnotes.php3
@@ -0,0 +1,49 @@
<html>
<head>
<style>
body { background-color:#ffffff; font-family:Verdana, Arial; font-size=10pt }
td { font-family:Verdana, Arial; font-size=10pt }
p { font-family:Verdana, Arial; font-size=10pt }
</style>
<title>Mantis</title>
</head>
<body>

<p>
<div align=center>
<h2>Developer Notes</h2>
Last modified: <? echo date( "M d, Y - H:m", getlastmod() )?>
</div>

<p>
<div align=center>

<table width=100%>
<tr valign=top>
<? include("side_menu.php3") ?>
<td>
<p>
<b><font size=+1>Developer Notes</font></b>
<p>
Here are some notes that should help people understand the way Mantis is layed out.
<p>
<ul>
<li><a href="images/dg_menu.gif">Menu overview</a> <? echo round(filesize("images/dg_menu.gif") / 1024) ?>KB
<li><a href="images/dg_login.gif">Login procedure</a> <? echo round(filesize("images/dg_login.gif") / 1024) ?>KB
<li><a href="images/dg_viewbug.gif">View bug overview</a> <? echo round(filesize("images/dg_viewbug.gif") / 1024) ?>KB
<li><a href="images/dg_manage.gif">Manage overview</a> <? echo round(filesize("images/dg_manage.gif") / 1024) ?>KB
<li><a href="images/dg_overview.gif">Detailed complete overview</a> <? echo round(filesize("images/dg_overview.gif") / 1024) ?>KB
</ul>
<p>

</td>
</tr>
</table>

<p>
<div align=right>
<a href="http://sourceforge.net"> <IMG src="http://sourceforge.net/sflogo.php?group_id=14963" width="88" height="31" border="0" alt="SourceForge Logo"></A>
</div>

</body>
</html>
Binary file added images/dg_login.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dg_manage.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dg_menu.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dg_overview.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dg_viewbug.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 58 additions & 48 deletions release.php3
Expand Up @@ -95,7 +95,14 @@ This is a preliminary draft of the release notes.

<!-- BEGIN 0.15.0 --------------------------------------------- -->
<? print_release("0.1.0","July 3, 1977",
"This release really doesn't do much"); ?>
"There are database modifications in this release
<p>
The date_created/posted/submitted fileds have been switched from TIMESTAMP to DATETIME. There are subtle modifications in the code to handle this change. The last_modified/updated fields are left unchanged.
<p>
The access level system has been replaced by a system of integer values. The contstants used are VIEWER, REPORTER, UPDATER, DEVELOPER, MANAGER, and ADMINISTRATOR. These map to integer values 10,25,40,55,70,90. The values were chosen so that further customization can be done on a installation by installation basis.
<p>
Along with the access levels all other ENUM fields in the database have been switched over to INT(2). Similar spacing of values has taken place to allow for installation customizations.
<p>"); ?>

<!-- GLOBALS ------------------- -->
<table width=100%>
Expand All @@ -106,58 +113,61 @@ This is a preliminary draft of the release notes.
<? print_item("rename","g_var1","g_variable","New naming scheme") ?>
</table>

<!-- FILES ------------------- -->
<!-- FUNCTIONS ----------------- -->
<table width=100%>
<? print_table("Functions","#ddddff") ?>

<? print_item("add","news_add", "","News API") ?>
<? print_item("add","news_delete", "","News API") ?>
<? print_item("add","news_update", "","News API") ?>
<? print_item("add","news_select", "","News API") ?>
<? print_item("add","get_news_count", "","News API") ?>
<? print_item("add","get_user_info_by_id_arr","","User API") ?>
<? print_item("add","get_user_info_by_name_arr","","User API") ?>
<? print_item("add","increment_login_count","","User API") ?>
<? print_item("add","trans_bool", "","Helper API") ?>
<? print_item("add","check_access", "","User API") ?>
<? print_item("add","print_enum_string_option_list", "","Print API") ?>
<? print_item("remove","","print_table_field_option_list", "Print API") ?>
<? print_item("add","str_pd", "","Helper API") ?>
<? print_item("add","print_view_bug_sort_link", "","Print API") ?>
<? print_item("add","print_manage_user_sort_link", "","Print API") ?>
<? print_item("add","print_manage_project_sort_link", "","Print API") ?>
<? print_item("add","print_status_icon", "","Icon API") ?>
<? print_item("add","print_sort_icon", "","Icon API") ?>
<? print_item("add","print_unread_icon", "","Icon API") ?>
</table>

<!-- FILES --------------------- -->
<p>
<table width=100%>
<? print_table("Files","#ffdddd") ?>
manage_proj_add.php3
manage_proj_cat_add.php3
manage_proj_cat_delete.php3
manage_proj_cat_delete_page.php3
manage_proj_cat_edit_page.php3
manage_proj_cat_update.php3
manage_proj_delete.php3
manage_proj_delete_page.php3
manage_proj_edit_page.php3
manage_proj_menu_page.php3
manage_proj_update.php3
manage_proj_ver_add.php3
manage_proj_ver_delete.php3
manage_proj_ver_delete_page.php3
manage_proj_ver_edit_page.php3
manage_proj_ver_update.php3
manage_project_category_add.php3
<? print_item("rename","manage_project_add.php3","manage_proj_add.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_cat_add.php3","manage_proj_cat_add.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_cat_delete.php3","manage_proj_cat_delete.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_cat_delete_page.php3","manage_proj_cat_delete_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_cat_edit_page.php3","manage_proj_cat_edit_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_cat_update.php3","manage_proj_cat_update.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_delete.php3","manage_proj_delete.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_delete_page.php3","manage_proj_delete_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_edit_page.php3","manage_proj_edit_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_menu_page.php3","manage_proj_menu_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_update.php3","manage_proj_update.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_ver_add.php3","manage_proj_ver_add.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_ver_delete.php3","manage_proj_ver_delete.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_ver_delete_page.php3","manage_proj_ver_delete_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_ver_edit_page.php3","manage_proj_ver_edit_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_ver_update.php3","manage_proj_ver_update.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_category_add.php3","manage_project_category_add.php3","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>

<? print_item("rename","manage_project_add.php3", "manage_proj_add.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_category_add.php3", "manage_proj_cat_add.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_category_delete.php3", "manage_proj_cat_delete.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_category_delete_page.php3","manage_proj_cat_delete_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_category_edit_page.php3","manage_proj_cat_edit_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_category_update.php3", "manage_proj_cat_update.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_delete.php3", "manage_proj_delete.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_delete_page.php3", "manage_proj_delete_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_edit_page.php3", "manage_proj_edit_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_menu_page.php3", "manage_proj_menu_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_update.php3", "manage_proj_update.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_version_add.php3", "manage_proj_ver_add.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_version_delete.php3", "manage_proj_ver_delete.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_version_delete_page.php3","manage_proj_ver_delete_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_version_edit_page.php3", "manage_proj_ver_edit_page.php3","Renamed for MacOS") ?>
<? print_item("rename","manage_project_version_update.php3", "manage_proj_ver_update.php3","Renamed for MacOS") ?>
<? print_item("rename","account_profile_add.php3", "account_prof_add.php3","Renamed for MacOS") ?>
<? print_item("rename","account_profile_delete.php3", "account_prof_delete.php3","Renamed for MacOS") ?>
<? print_item("rename","account_profile_edit_page.php3", "account_prof_edit_page.php3","Renamed for MacOS") ?>
<? print_item("rename","account_profile_make_default.php3", "account_prof_make_default.php3","Renamed for MacOS") ?>
<? print_item("rename","account_profile_manage_page.php3", "account_prof_manage_page.php3","Renamed for MacOS") ?>
<? print_item("rename","account_profile_update.php3", "account_prof_update.php3","Renamed for MacOS") ?>
<? print_item("rename","old","new","Renamed for MacOS") ?>
<? print_item("add","","new_page_me.php","") ?>
<? print_item("add","","core_icon_API.php","Icon module") ?>
<? print_item("rename","ok.php","better.php","") ?>
</table>
<p>
Expand Down
7 changes: 7 additions & 0 deletions side_menu.php3
Expand Up @@ -38,11 +38,18 @@
&nbsp;&nbsp;&nbsp;<a href="mantis/ChangeLog">ChangeLog</a><br>
</td>
</tr>
<tr>
<td>
HOWTO<br>
&nbsp;&nbsp;&nbsp;<a href="HOWTO-mantis-phorum">phorum</a>
</td>
</tr>
<tr>
<td>
Development<br>
&nbsp;&nbsp;&nbsp;<a href="roadmap.php3">Roadmap</a><br>
&nbsp;&nbsp;&nbsp;<a href="guidelines.php3">Coding Guidelines</a><br>
&nbsp;&nbsp;&nbsp;<a href="devnotes.php3">Developer Notes</a><br>
&nbsp;&nbsp;&nbsp;<a href="database.php3">Database</a><br>
</td>
</tr>
Expand Down

0 comments on commit af08201

Please sign in to comment.