/[drupal]/contributions/tricks/phpbb2drupal/4.6.5/viewtopic.php
ViewVC logotype

Contents of /contributions/tricks/phpbb2drupal/4.6.5/viewtopic.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Apr 6 09:27:25 2006 UTC (3 years, 7 months ago) by tavon
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
Updated the phpbb2drupal_import.php
  -Removed some major bugs
  -Imports Polls

Added redirection scripts
  -viewtopic.php
  -stories.php
1 <?php
2
3 include_once 'includes/bootstrap.inc';
4 include_once 'includes/common.inc';
5
6 fix_gpc_magic();
7
8 if(isset($_GET['t']) && is_numeric($_GET['t'])) {
9 $topic_id = $_GET['t'];
10
11 $nid = db_result(db_query("SELECT nid
12 FROM {phpbb2drupal_temp_topic}
13 WHERE topic_id = %d", $topic_id));
14
15 drupal_goto("node/$nid");
16 }
17 elseif(isset($_GET['p'])) {
18 $post = explode("#", $_GET['p']);
19 if(is_numeric($post[0])) {
20 $post_id = $post[0];
21 } else {
22 drupal_goto("/");
23 }
24
25 $cid = db_result(db_query("SELECT cid
26 FROM {phpbb2drupal_temp_post}
27 WHERE post_id = %d", $post_id));
28
29 $nid = db_result(db_query("SELECT nid
30 FROM {comments}
31 WHERE cid = %d", $cid));
32
33 drupal_goto("node/$nid#comment-$cid");
34 }
35 elseif(isset($_GET['f']) && is_numeric($_GET['f'])) {
36 $forum_id = $_GET['f'];
37
38 $tid = db_result(db_query("SELECT tid
39 FROM {phpbb2drupal_temp_forum}
40 WHERE forum_id = %d", $forum_id));
41
42 drupal_goto("taxonomy/term/$tid/all");
43 }
44 ?>

  ViewVC Help
Powered by ViewVC 1.1.2