MyBB Community Forums

Full Version: [Tutorial] Basic Site-Forum Integration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Need help with the "Recent Posts" box...it does not show up the recent posts at all, but it showed up blank.
For the recent post there are a couple of plugins available that can do this for you that is what i am using on my site www.fish-n-tassie.com.

I found that the best way less code in the actual page for you toworry about and more support at the moment.

Fishntassie...
Wow your login form code works pretty good but with a few customizations. Cool
How do I make a LOG OUT link?
Getting this for both login and recent posts boxes.
Warning: Cannot modify header information - headers already sent by (output started at /home/lastmach/public_html/forum/login.php:2) in /home/lastmach/public_html/forum/inc/functions.php on line 1133

Any ideas?

EDIT: Getting error code 3 times after another, per frame, per load/refresh.
EDIT2: No 3 time error; just once now.
I really like the latest posts box, and I'd like to put this into my site, but is there anyway that someone can get the file and find out the database password?

I'm just worried about the security
About the latest posts box....how would this be adapted for the download system?
ahero4heor Wrote:Getting this for both login and recent posts boxes.
Warning: Cannot modify header information - headers already sent by (output started at /home/lastmach/public_html/forum/login.php:2) in /home/lastmach/public_html/forum/inc/functions.php on line 1133

Any ideas?

EDIT: Getting error code 3 times after another, per frame, per load/refresh.
EDIT2: No 3 time error; just once now.

Make sure you've added the MyBB Include code (like the database/forum dictionary info etc.) at the way beginning of your PHP page.
What am I doing wrong? Whenever I try any of these "integration" codes, all I get are errors. Here's the code I'm working with.
<?php
$rel = "/public_html/forums"; // The directory to your forum--relative to this file's location; include ending slash
chdir($rel);
require("./global.php");
?>

<?php
if($mybb->user["uid"])
{
?>
&nbsp;• <a href="<?php echo $rel; ?>search.php?action=getnew">View new posts</a><br>
&nbsp;• <a href="<?php echo $rel; ?>private.php">View new PM's</a><br>
&nbsp;• <a href="<?php echo $rel; ?>usercp.php">User CP</a><br>
&nbsp;&nbsp;&nbsp;&nbsp; <b>·</b> <a href="<?php echo $rel; ?>usercp.php?action=editsig">Edit Signature</a><br>
&nbsp;&nbsp;&nbsp;&nbsp; <b>·</b><a href="<?php echo $rel; ?>usercp.php?action=avatar">Edit Avatar</a><br>
&nbsp;• <a href="<?php echo $rel; ?>member.php?action=profile&uid=<?php echo $mybb->user["uid"]; ?>">My Profile</a><br>
&nbsp;• <a href="<?php echo $rel; ?>search.php?action=finduser&uid=<?php echo $mybb->user["uid"]; ?>">My Posts</a>
<?php
}
else
{
?>
<table>
 <form method="POST" action="<?php echo $rel; ?>member.php" onsubmit="return submitted();">
  <input type="hidden" name="action" value="do_login">
  <input type="hidden" name="url" value="">
  <tr>
   <td>Username</td>
   <td><input type="text" name="username" size="15"></td>
  </tr>
  <tr>
   <td>Password</td>
   <td><input type="password" name="password" size="15"></td>
  </tr>
  <tr>
   <td colspan="2"><center><input type="submit" value="Login" name="submit"></center></td>
  </tr>
  <tr>
   <td colspan="2"><center><a href="<?php echo $rel; ?>member.php?action=register">Not a member? Register now!</a></center></td>
 </form>
</table>
<?php
}
?>
First of all get rid of the "public_html" in the 2nd line, as that is not the relative directory to your forums from the file.
Pages: 1 2 3 4 5 6 7