DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • October 22, 2017, 12:20:22 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: LoGD2wBB  (Read 6036 times)
0 Members and 1 Guest are viewing this topic.
Sir Freeman
Guest
« on: February 15, 2004, 05:02:02 PM »

its a mod witch will let you see player's LoGD char and view your mailbox from the woltlab's burning board. Its made for wBB1.2.

Coming soon:
x wBB private messages intergrated with LoGD Ye olde mail


ok im not gonna upload it now,  cuz im busy at the moment, but i'll do it later  Smiley
Logged
strider
Guest
« Reply #1 on: February 15, 2004, 06:38:43 PM »

I'd be interested in seeing it once you put it up here mate.
Logged
Sir Freeman
Guest
« Reply #2 on: February 16, 2004, 08:54:38 AM »

I'd be interested in seeing it once you put it up here mate.
it used to be up & working at http://portal.jaeboy.net/ but i had only 1GB of bandwidth which was used in a week so i removed it, and dont know where to stick it
the point is, it'll probably need to be remade cuz LoGD0.9.8 is gonna be a lil different

otherwise here's the guide to install v1

Mod name: LoGD2wBB
Mod version: 1
Requirements: Woltlab's Burning Board v1.2 (http://www.woltlab.de/products/burning_board_1/index_en.php), Legend of Green Dragon 0.9.7+jt (http://www.sourceforge.net/projects/lotgd)
Author: Kirill / Sir Freeman (milovidov@users.sourceforge.net)
What does it do?: Currently the mod is quite basic, it shows user's LoGD char in his/her posts. It also shows Ye olde mail

Installation guide:
You wont have to edit any LoGD file, only wBB. And you have  to add only 1 MySQL table

Code:
CREATE TABLE `logd2wbb` (
  `wbbid` bigint(99) NOT NULL default '0',
  `logdid` bigint(99) default NULL,
  PRIMARY KEY  (`wbbid`)
) TYPE=MyISAM;

editing wBB files:

open _header.php
after the <?php tag add

Code:
$logdreg=mysql_fetch_array(mysql_query("SELECT * FROM logd2wbb WHERE wbbid = '$user_id'"));
if($logdreg==true) {
$logdsql = "SELECT sum(if(seen=1,1,0)) AS seencount, sum(if(seen=0,1,0)) AS notseen FROM mail WHERE msgto='".$logdreg["logdid"]."'";
$logdresult = mysql_query($logdsql);
$logdrow = mysql_fetch_assoc($logdresult);
mysql_free_result($logdresult);
$logdrow[seencount]=(int)$logdrow[seencount];
$logdrow[notseen]=(int)$logdrow[notseen];
if ($logdrow[notseen]>0){
   $logdmail = "<a href='../logd/mail.php' target='_blank' onClick=\"window.open('../logd/mail.php','motdphp','scrollbars=yes,resizable=yes,width=550,height=300');return false;\" class='hotmotd'>Ye Olde Mail: $logdrow[notseen] new, $logdrow[seencount] old</a>";
}else{
   $logdmail = "<a href='../logd/mail.php' target='_blank' onClick=\"window.open('../logd/mail.php','motdphp','scrollbars=yes,resizable=yes,width=550,height=300');return false;\" style='color: #FF9900;'>Ye Olde Mail: $logdrow[notseen] new, $logdrow[seencount] old</a>";
}
}

open members.php
Find
Code:
if($user_info['age_m'] && $user_info['age_d'] && $user_info['age_y']) $birthday = $user_info['age_d'].". ".$user_info['age_m']." ".$user_info['age_y'];
   else eval ("\$birthday = \"".gettemplate("profile_nodeclaration")."\";");

and after add

Code:
$logdreg=mysql_fetch_array(mysql_query("SELECT * FROM logd2wbb WHERE wbbid = '".$posts["userid"]."'"));
   if($logdreg==true) {
   
      $logduser = mysql_fetch_array(mysql_query("SELECT * FROM accounts WHERE acctid = '".$logdreg["logdid"]."'"));
      
      $user_xp = $logduser["experience"];
      $user_level = $logduser["level"];
      $user_name = $logduser["name"];
      
      $logd_races=array(1=>"Troll",2=>"Elf",3=>"Human",4=>"Dwarf",0=>"Unknown",50=>"Hoversheep");
      $logd_specialties=array(0=>"Unspecified","<span class='colDkRed'>Dark Arts</span>","<span class='colLtMagenta'>Mystical Powers</span>","<span class='colLtYellow'>Thieving Skills</span>");
      
      $user_race = $logd_races[$logduser['race']];
      $user_resur = $logduser["resurrections"];
      $user_speciality = $logd_specialties[$logduser["specialty"]];
      $user_gender = $logduser[sex]?"Female":"Male";
      $user_gems = $logduser["gems"];
      $user_gold = $logduser["gold"]+$logduser["goldinbank"];
      $user_charm = $logduser["charm"];
      
      $user_gold = "<img src='images/gold.gif' border='0' alt='Gold: $user_gold'>";
      $user_gems = "<img src='images/gems.gif' border='0' alt='Gems: $user_gems'>";
      
      $user_logd_name = $logduser["name"];
      $user_logd_name = str_replace("`1","<span style='colDkBlue'>",$user_logd_name);
      
      $status = $logduser["title"];
      
      eval ("\$members_profile_logdbit = \"".gettemplate("members_profile_logdbit")."\";");
   
   }

open profile.php

find
Code:
eval("dooutput(\"".gettemplate("profile_subscripe")."\");");
   }

add after
Code:
elseif($mode=="logd")
   {   
      $logdaccount=mysql_fetch_array(mysql_query("SELECT * FROM logd2wbb WHERE wbbid = '$user_id'"));   
      if($_POST["action"]=="logout")
      {         
         mysql_query("DELETE FROM logd2wbb WHERE wbbid = '$user_id'");
         eval ("\$logd_info .= \"".gettemplate("logdaccount_logout")."\";");
      }
      if($_POST["action"]=="login") {
         $logdinfo = mysql_fetch_array(mysql_query("SELECT * FROM accounts WHERE login = '".$_POST["name"]."'"));
         $logduserid = $logdinfo["acctid"];
         if(strtolower($logdinfo["login"])==strtolower($_POST["name"]) && $logdinfo["password"]==$_POST["password"]) {
            mysql_query("INSERT INTO logd2wbb VALUES('$user_id','$logduserid')");
            eval ("\$logd_info .= \"".gettemplate("logdaccount_login_succsess")."\";");
         }
         else {
            eval ("\$logd_info .= \"".gettemplate("logdaccount_login_failed")."\";");
         }
      }
      
      if($logdaccount==true){
      
         $logdinfo = mysql_fetch_array(mysql_query("SELECT * FROM accounts WHERE acctid = '".$logdaccount["logdid"]."'"));
         
         $logd_name = $logdinfo["name"];
         $logd_username = $logdinfo["login"];
         $logd_userid = $logdinfo["acctid"];
         $logd_password = $logdinfo["password"];
         eval ("\$logd_info .= \"".gettemplate("logdaccount_true")."\";");
      }
      else {
         eval ("\$logd_info .= \"".gettemplate("logdaccount_none")."\";");
      }
   eval("dooutput(\"".gettemplate("logdaccount")."\");");
   }

open thread.php

find
Code:
if($old_time <= $posts['posttime']) $postsign = "<IMG SRC=\"$imagefolder/posticonnew.gif\" border=\"0\">";
   else $postsign = "<IMG SRC=\"$imagefolder/posticon.gif\" border=\"0\">";
   $posttime = formatdate($posts['posttime'],$longdateformat,1);

after add
Code:
$logdreg=mysql_fetch_array(mysql_query("SELECT * FROM logd2wbb WHERE wbbid = '".$posts["userid"]."'"));
   if($logdreg==true) {
   
      $logduser = mysql_fetch_array(mysql_query("SELECT * FROM accounts WHERE acctid = '".$logdreg["logdid"]."'"));
      
      $user_xp = $logduser["experience"];
      $user_level = $logduser["level"];
      $user_name = $logduser["name"];
      
      $logd_races=array(1=>"Troll",2=>"Elf",3=>"Human",4=>"Dwarf",0=>"Unknown",50=>"Hoversheep");
      $logd_specialties=array(0=>"Unspecified","<span class='colDkRed'>Dark Arts</span>","<span class='colLtMagenta'>Mystical Powers</span>","<span class='colLtYellow'>Thieving Skills</span>");
      
      $user_race = $logd_races[$logduser['race']];
      $user_resur = $logduser["resurrections"];
      $user_speciality = $logd_specialties[$logduser["specialty"]];
      $user_gender = $logduser[sex]?"Female":"Male";
      $user_gems = $logduser["gems"];
      $user_gold = $logduser["gold"]+$logduser["goldinbank"];
      $user_charm = $logduser["charm"];
      
      $user_gold = "<img src='images/gold.gif' border='0' alt='Gold: $user_gold'>";
      $user_gems = "<img src='images/gems.gif' border='0' alt='Gems: $user_gems'>";
      
      $user_logd_name = $logduser["name"];
      $user_logd_name = str_replace("`1","<span style='colDkBlue'>",$user_logd_name);
      
      $status = $logduser["title"];
      
      eval ("\$logdbit = \"".gettemplate("logdbit")."\";");
   
   }
   else {
      $user_logd_name = $posts['username'];
   }


I think that's it

here's the templates

http://www.zone.ee/kennymcc/logd/templates.gif
and the images are here: http://www.zone.ee/kennymcc/logd

but you still have to modify some default templates

open /templates/members_profile.htm and add $members_profile_logdbit to the place you want to show user's LoGD char info

open /templates/members_profile.htm and add $logdbit to the place you want to show user's LoGD char info








whuh, that's it i think
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
27 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search