DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • May 18, 2013, 02:06:45 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: 1 ... 5 6 [7]   Go Down
  Print  
Author Topic: Marriage Expansion V5.21  (Read 15503 times)
0 Members and 1 Guest are viewing this topic.
Michelina
Militia
**
Offline Offline

Posts: 35


Some days being me just isn't worth it.


View Profile WWW
« Reply #90 on: October 02, 2008, 03:29:14 PM »

I find this sql line from the marriage _dohook.php:

$sql = "SELECT name FROM ".db_prefix("accounts")." WHERE acctid=".$session['user']['marriedto']." AND locked=0";

..and this sql line from the marriage_func.php:

$sql = "SELECT login,sex,name,acctid FROM ".db_prefix("accounts")." WHERE acctid=$ac ORDER BY level,login";


Which one am I to change, since neither match the one shown below?
Logged

Don't you wish you were short like me?

AlteredState RPG


White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #91 on: October 02, 2008, 03:57:33 PM »

You missed one in dohook. It should be under case "biostat":
Logged

Helping you help yourself.
Michelina
Militia
**
Offline Offline

Posts: 35


Some days being me just isn't worth it.


View Profile WWW
« Reply #92 on: October 03, 2008, 06:35:03 AM »

You missed one in dohook. It should be under case "biostat":

Thanks..but it has been changed and we still aren't seeing the spouse show up. I only have 4 married couples and have made sure all selected for it to show up in their bios...

I did find this little nugget in the bio.php inside the core:
$sql = "SELECT login, name, level, sex, title, specialty, hashorse, acctid, resurrections, bio, dragonkills, race, clanname, clanshort, clanrank, ".db_prefix("accounts").".clanid, laston, loggedin FROM " . db_prefix("accounts") . " LEFT JOIN " . db_prefix("clans") . " ON " . db_prefix("accounts") . ".clanid = " . db_prefix("clans") . ".clanid WHERE login='$char'";

Should this be changed as well?
« Last Edit: October 03, 2008, 07:40:01 AM by Michelina » Logged

Don't you wish you were short like me?

AlteredState RPG


Boris735
Mod God
*****
Offline Offline

Posts: 532


View Profile
« Reply #93 on: October 03, 2008, 08:39:34 AM »

The penny belatedly drops.  When DaveS released V5.21, he said:

Quote from: DaveS
V5.21
Updated so the Bio works for 1.1.1.

Note: This means that the Bio won't work for 1.1.0 anymore. I'm not going to maintain both versions... If you're using 1.1.0 then stick with the old version.

So, you actually need to undo that change.  Find this query in marriage/marriage_dohook.php (under the biostat hook, thanks White Knight):

Code:
$sql = "SELECT a.acctid as userid, a.marriedto as married, b.name as partnername,a.sex as gender FROM ".db_prefix('accounts')." as a LEFT JOIN ".db_prefix('accounts')." as b ON a.marriedto=b.acctid WHERE a.acctid='$char'";

and change "a.acctid" to "a.login":

Code:
$sql = "SELECT a.acctid as userid, a.marriedto as married, b.name as partnername,a.sex as gender FROM ".db_prefix('accounts')." as a LEFT JOIN ".db_prefix('accounts')." as b ON a.marriedto=b.acctid WHERE a.login='$char'";

It's possible there are other changes that may need to be made, I'm not very familiar with 1.1.0, I'm afraid.  Better would be to find a copy of v5.20 somehow, but I don't know where you could get one.
Logged
Michelina
Militia
**
Offline Offline

Posts: 35


Some days being me just isn't worth it.


View Profile WWW
« Reply #94 on: October 03, 2008, 11:10:51 AM »

Phew! That solved that problem...but I am left with a new one that is small...

Under spouse, in the bio, it now says "secret." I found this line in the marriage_dohook.php.
 line 292-294...

if ($row['married']!=0 && $row['partnername']!="") {
         if (!get_module_pref('user_bio',"marriage",$row['userid'])) $row['partnername']="`iSecret`i";
         output("`^Spouse: `2%s`n",$row['partnername']); //do it here

and
line 300-301...

if (!get_module_pref('user_bio',"marriage",$row['userid'])) $row['partnername']="`iSecret`i";
         output("`^Spouse: `2%s`n",$partner);

It is repeated twice..Is there something that can be done?
« Last Edit: October 03, 2008, 11:14:45 AM by Michelina » Logged

Don't you wish you were short like me?

AlteredState RPG


Boris735
Mod God
*****
Offline Offline

Posts: 532


View Profile
« Reply #95 on: October 03, 2008, 11:51:45 PM »

Taking the second part first... there is a bug there, that needs fixing.  Violet and Seth are never marked as secret, since that line changes $row['partnername'] instead of $partner.  This is handy, since it tells us that the problem is with the first case, but still should be fixed.  change those lines to:

Code:
  if (!get_module_pref('user_bio',"marriage",$row['userid'])) $partner="`iSecret`i";
  output("`^Spouse: `2%s`n",$partner);

Now, as for the issue you report: The spouse will be set to 'Secret' only if the preference has been set to not show up the spouse.  This is an issue with preferences, not the code.
Logged
Michelina
Militia
**
Offline Offline

Posts: 35


Some days being me just isn't worth it.


View Profile WWW
« Reply #96 on: October 04, 2008, 09:53:35 AM »

Thank you, it works great now.

I appreciate the help on this, so much!!

Miche
Logged

Don't you wish you were short like me?

AlteredState RPG


Pages: 1 ... 5 6 [7]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
21 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search