Current time: 11-22-2008, 12:53 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 1 Votes - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Basic Site-Forum Integration
03-03-2007, 04:25 AM
Post: #31
RE: [Tutorial] Basic Site-Forum Integration
I think this needs some update.

Visit this user's website Find all posts by this user
Quote this message in a reply
03-13-2007, 12:26 AM
Post: #32
RE: [Tutorial] Basic Site-Forum Integration
I hope this thread isnt too old...

On the forum statistics everything works except for the Registered users stat, it just displays 13 but not "13 users"...

Code:
Code:
<?php
$host = "localhost"; // Your database host
$user = ""; // Your database username
$pass = ""; // Your database password
$data = ""; // The name of your database
$prfx = ""; // The table prefix of your database

$conn = mysql_connect($host,$user,$pass) or die ("<b>Error:</b> Database connection failed.");
$sel = mysql_select_db($data,$conn) or die("<b>Error:</b> Database connection failed.");
$topic_result = mysql_query("SELECT COUNT(*) as count FROM ".$prfx."threads");
$topic_count = mysql_fetch_array($topic_result);
$topic_count = $topic_count["count"];
$post_result = mysql_query("SELECT COUNT(*) as count FROM ".$prfx."posts");
$post_count = mysql_fetch_array($post_result);
$post_count = $post_count["count"];
$user_result = mysql_query("SELECT COUNT(*) as count FROM ".$prfx."users");
$user_count = mysql_fetch_array($user_result);
$user_count = $user_count["count"];
$forum_result = mysql_query("SELECT COUNT(*) as count FROM ".$prfx."forums");
$forum_count = mysql_fetch_array($forum_result);
$forum_count = $forum_count["count"];
?>
<table>
<tr>
  <td><b><?php echo $topic_count; ?></b></td>
  <td>Threads</td>
</tr>
<tr>
  <td><b><?php echo $post_count; ?></b></td>
  <td>Posts</td>
</tr>
<tr>
  <td><b><?php echo $user_count; ?></b></td>
</tr>
<tr>
  <td><b><?php echo $forum_count; ?></b></td>
  <td>Forums</td>
</tr>
</table>

http://www.WebDevCode.com
Visit this user's website Find all posts by this user
Quote this message in a reply
03-14-2007, 05:31 PM
Post: #33
RE: [Tutorial] Basic Site-Forum Integration
thanks and i converted to turkish.

http://www.mybbturkiye.com/basit-site-fo...-8261.html
Find all posts by this user
Quote this message in a reply
03-24-2007, 02:43 PM
Post: #34
RE: [Tutorial] Basic Site-Forum Integration
Does the recent posts work on 1.1.x?

I keep getting the error:
Warning: chdir(): No such file or directory (errno 2) in URL HERE

The forums are in forums/ and its configered as the rest.
Find all posts by this user
Quote this message in a reply
04-06-2007, 05:11 AM (This post was last modified: 04-06-2007 05:14 AM by DCR.)
Post: #35
RE: [Tutorial] Basic Site-Forum Integration
I keep getting that same error too. This is from older versions, It needs an update for it to work in 1.2.3/4


I got it work by adding
PHP Code:
define("IN_MYBB"1); 


below the require thing And by deleting chdir($rel);

Visit this user's website Find all posts by this user
Quote this message in a reply
04-17-2007, 03:28 AM (This post was last modified: 04-17-2007 08:01 PM by HomerTheDragoon.)
Post: #36
RE: [Tutorial] Basic Site-Forum Integration
The guy above me solved my problem. If you have some problem with direct init. or make sure in_mybb is defined do what he said. Thanks a lot.

Anyone know how to do a log out script? I dont remember. Ill probably figure it out.
Find all posts by this user
Quote this message in a reply
04-21-2007, 09:21 PM
Post: #37
RE: [Tutorial] Basic Site-Forum Integration
i can give you a log out script. PM me
Find all posts by this user
Quote this message in a reply
06-28-2007, 11:21 PM
Post: #38
RE: [Tutorial] Basic Site-Forum Integration
Thankyou for this topic. I love the login script. I'll definitely be using it. It makes the website look a lot more professional and integrates nicely with the forum. Lovely.

[Image: banner1.PNG]
http://www.mariostadium.com/
Find all posts by this user
Quote this message in a reply
07-21-2007, 08:48 AM
Post: #39
RE: [Tutorial] Basic Site-Forum Integration
Direct initialization of this file is not allowed.

Please make sure IN_MYBB is defined.

i get that message when i use it
Visit this user's website Find all posts by this user
Quote this message in a reply
07-21-2007, 02:19 PM
Post: #40
RE: [Tutorial] Basic Site-Forum Integration
Add

Code:
define("IN_MYBB", 1);
at the beginning of the file.

[Image: destroyerjf8.jpg]

My software never has bugs. It just develops random features.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: