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?
December 01, 2008, 10:59:53 PM

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 679 times)
0 Members and 1 Guest are viewing this topic.
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



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

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



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

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
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
****
Online Online

Gender: Male
Posts: 192



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: 877



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

this module currently useing direct reading of the tables
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
clashbot
Experienced
****
Online Online

Gender: Male
Posts: 192



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
[request] Raid timers
by Elesar1
[Today at 04:41:09 PM]

Shared DB online list
by Temar
[Today at 01:55:47 AM]

relay colors
by Temar
[Today at 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11144
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 16
Total: 17
clashbot

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