L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 06, 2008, 09:16:49 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > 0.5.x Custom/Unofficial Modules > Topic: Forum
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Forum  (Read 613 times)
0 Members and 1 Guest are viewing this topic.
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 772



WWW
Forum
« on: January 20, 2008, 01:07:00 AM »

This module is Still under Construction, this is more of an Early Release

At the Coment this Module REQUIRES SMF
i will be making it so it isnt required but that isnt done yet
this Module will be Based on the Tables and and how SMF works
meaning its great to use with a SMF forum

at the moment you can Read and Reply but not Post New Topics

Current Commands
  • !forum - Shows Main Forum Index listing Catagories and Boards
  • !forum recent - Shows Last 10 Posts
  • !forum board <board> - Shows topics of that board
  • !forum topic <topic> - Shows messages of that topic
  • !forum reply - Shows Last 10 Posts
  • !forum reg <username> <password> - Add the Main of the Character you are on too the Account(limit 1)

The Default Prefix is smf_ if your forum has diferent prefix or isnt on same database, change in !set forum
To use a dif Database its like DB.smf_

Altho this system hasnt been done yet u can lock boards to stop viewing
there is a setting also under !set forum
the doesnt Allow access to those Ranks it Simply Locks to all
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 772



WWW
Re: Forum
« Reply #1 on: January 20, 2008, 01:18:06 AM »

Also some Users may not want to Use !forum reg as the bot Logs stuff
i made a page on my forum useing Tinyportal's articles
Code:
?>
<br>Character Registration
<br>to use ingame Forum
<br>
<br><b>
<?php
$prefix 
= "smf_";
$altprefix = "";

function select ($sql, $result_form=MYSQL_NUM)//MYSQL_ASSOC = field names
{
$data = "";
$result = mysql_query($sql);

if (!$result)
{
// echo $sql;
echo mysql_error();
return false;
}

if (empty($result))
{
return false;
}

$count = 0;

while ($row = mysql_fetch_array($result, $result_form))
{
$data[] = $row;
}

mysql_free_result($result);
return $data;
}

function query ($sql)
{
$return = mysql_query($sql);

if (!$return)
{
echo mysql_error();
return false;
}
else
{
return true;
}
}
function mainchar($name, $prefix)
{
$main = select("SELECT main FROM ".$prefix."alts WHERE alt = '".$name."'");
if(!empty($name))
$main = $main[0][0];
else
$main = ucfirst(strtolower($name));
Return $main;
}

$user = select("SELECT AOchar FROM ".$prefix."members WHERE ID_MEMBER = ".$context['user']['id']);

$char = $_POST['char'];
if(!empty($char))
{

$main = mainchar($char, $altprefix);
$check = select("SELECT AOchar FROM ".$prefix."members WHERE AOchar = '".$main."'");

if($user[0][0] != "NONE")
{
echo "You are Currently Attached to ".$user[0][0]." and alts, Code to Remove hasnt been done yet :p";
}
elseif(!empty($check))
echo "Error: That Character is Already Attached to a Forum Account.";
else
{
// create new account
query("UPDATE ".$prefix."members SET AOchar = '".$main."' WHERE ID_MEMBER = ".$context['user']['id']);
echo "Main Character ".$main." and alts has been registered to this Account.";
}
}
else
{
if($user[0][0] != "NONE")
{
echo "You are Currently Attached to ".$user[0][0]." and alts, Code to Remove hasnt been done yet :p";
}
else
{
echo '<form action="" method="post">';
echo '<input type="text" name="char" size="20" value="">';
echo '<input type="submit" name="submit" value="Register">';
echo '</form>';
}
}

echo 
"</b>";

Change
$prefix to your Forum prefix you will already be on your forum database
$altprefix to you alts table prefix default there is no prefix, if different database "DB." the . is seperator db.table
« Last Edit: January 21, 2008, 10:24:19 AM by Temar » Logged
Monery
Rookie
**
Offline Offline

Posts: 28


Re: Forum
« Reply #2 on: June 16, 2008, 01:20:10 AM »

Temar, I can't wait to figure out to install SMF so I can use it on my bot. Unless your planning a simple ready to go module in the next month or so, I will just keep en eye out here waiting for your next release
Logged
clashbot
Experienced
****
Offline Offline

Gender: Male
Posts: 191



Re: Forum
« Reply #3 on: June 29, 2008, 02:57:29 PM »

temar, I am using SMF with TP, but is being hosted on a remote server, and bebot is, of corse, local(following the advice of everyone here) could you give a little bit better pointers on how to set up this module?
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 772



WWW
Re: Forum
« Reply #4 on: June 29, 2008, 04:35:33 PM »

this module currently useing direct reading of the tables
Logged
clashbot
Experienced
****
Offline Offline

Gender: Male
Posts: 191



Re: Forum
« Reply #5 on: June 29, 2008, 04:37:10 PM »

ok, so I would have to host the smf/tp on the same machine as the bot...that was what I was afraid of.
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > 0.5.x Custom/Unofficial Modules > Topic: Forum
« previous next »
 
Jump to:  

Recent
!items database
by cthulhu
[October 05, 2008, 11:36:16 AM]

Supplies needed module
by viper
[October 05, 2008, 11:11:13 AM]

Assist
by Foxy
[October 05, 2008, 05:09:02 AM]

How's 0.5.x coming? Wonde...
by Hyde
[October 04, 2008, 04:59:20 PM]

TWC
by Elesar1
[October 04, 2008, 12:55:59 PM]

Org in AoC
by Alreadythere
[October 04, 2008, 04:50:00 AM]

OnlineOrg
by Slacklin
[October 04, 2008, 03:06:00 AM]

Learning .NET, Mono, C#, ...
by Vhab
[October 04, 2008, 02:39:03 AM]

guild taxes module for ag...
by Elesar1
[October 03, 2008, 09:06:09 AM]

MediaControl
by Elesar1
[October 03, 2008, 08:38:18 AM]
Stats
Members
Total Members: 983
Latest: Titerris
Stats
Total Posts: 10740
Total Topics: 1448
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 43
Total: 45
Sudoka
cthulhu

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.329 seconds with 28 queries. (Pretty URLs adds 0.034s, 4q)
Loading...