collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Forum  (Read 10564 times)

0 Members and 1 Guest are viewing this topic.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Forum
« on: January 20, 2008, 07: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

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Forum
« Reply #1 on: January 20, 2008, 07: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: [Select]
?>
<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, 04:24:19 pm by Temar »

Offline Monery

  • BeBot User
  • **
  • Posts: 30
  • Karma: +0/-0
Re: Forum
« Reply #2 on: June 16, 2008, 08: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

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: Forum
« Reply #3 on: June 29, 2008, 09: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?

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Forum
« Reply #4 on: June 29, 2008, 11:35:33 pm »
this module currently useing direct reading of the tables

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: Forum
« Reply #5 on: June 29, 2008, 11: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.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 351
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal