DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 18, 2013, 10:56:52 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Marriage question...  (Read 665 times)
0 Members and 1 Guest are viewing this topic.
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 823


View Profile WWW
« on: May 29, 2012, 10:55:00 PM »

I know with the marriage module you can only marry one person.  But if you use the user editor you can marry multiple people.  Is there a way to change the module for the charstats and the bio to read all the peoples name said person is married too?  

For example if acctid 1 married acctid 2 and 3 the bio and charstats for acctid 1 would show the names of acctid 2 and 3.
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
Nightborn
Captain of the Guard
***
Offline Offline

Posts: 157


View Profile
« Reply #1 on: June 04, 2012, 09:07:40 AM »

Marriage in the core has exactly 1 field.

You cannot marry somebody to more than 1 number (as it is a number).

A module might handle flirting etc. differently, but the marriage modules usually use that one field for spouse - also the core functions work on that one.

And yes, of course there is a way to change a charstat display.
Logged
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 823


View Profile WWW
« Reply #2 on: June 04, 2012, 02:51:17 PM »

How would I get the display to show all the people married too.  Because I have someone whose acctid Is in my box as married too and another girls.  I want his and all players like this, charstat to say married to: Sara & Blah Blah for example...
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
Nightborn
Captain of the Guard
***
Offline Offline

Posts: 157


View Profile
« Reply #3 on: June 06, 2012, 02:06:31 PM »

As I still have no clue what module you use or how it is saved...

instead of a query checking one acctid, you should check for all.
(as "where acctid=" to "where acctid IN (" and add the comma separated list)
then go through that array and patch all names together. =)
Logged
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 823


View Profile WWW
« Reply #4 on: June 08, 2012, 09:27:43 PM »

I'm clueless and I use the marriage module the one you helped with....

"name"=>"Marriage Expanded",
"version"=>"5.21",
"author"=>"CortalUX, Oliver Brendel, expanded by DaveS",
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
Nightborn
Captain of the Guard
***
Offline Offline

Posts: 157


View Profile
« Reply #5 on: June 09, 2012, 12:32:35 PM »

I recall that one ^^ a long time ago.

then it should work as I pointed it out. some assembly required. ^^
Logged
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 823


View Profile WWW
« Reply #6 on: June 09, 2012, 10:49:01 PM »

I am sorta clueless as to how to do it as you said.  I'm still learning.
Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
Mel7x
Militia
**
Offline Offline

Posts: 25



View Profile WWW
« Reply #7 on: June 11, 2012, 03:53:07 PM »

I also think you may need to do some edits to the function file for the marriage module you are using...because in that file it has the Uh Oh! stuff in it for when you flirt with someone else.. and I don't see it working to expect all your players to flirt with all the people they want to marry, marry them all, and then want another one and end up divorcing everyone.
Logged

I'm the little engine that could.
Branching out my coding talents on Tynastera!
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 823


View Profile WWW
« Reply #8 on: July 11, 2012, 10:33:28 AM »

The other person they marry would have to be set by an admin...It would be on special requests and such.  So that can stay there I suppose.  What I want is so know how to get the bio and the charstats to check to see if you are married to more than one outside the module and display it there for you in those two areas.
« Last Edit: July 13, 2012, 11:57:15 AM by Megan|SaraBeth » Logged

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination
Stephen Kise
Codemeister
****
Offline Offline

Posts: 372



View Profile WWW
« Reply #9 on: July 11, 2012, 12:00:43 PM »

If the pref looked like:
Code:
<?php
"married"=>"Who all is this player married to?,text",
?>
Then you could do it... I do not think you can do it with int. (Correct me if I am wrong)

Then you would need the case for characterstats and biostat, with the following in your cases...
Code:
<?php
$people 
get_module_pref("married");
$marriedto=explode(",",$people);
$count count($marriedto);
for(
$i=0;$i<$count;$i++){
$m $marriedto[$i];
$sql db_query("SELECT name FROM accounts WHERE acctid = ".$m);
$row db_fetch_assoc($sql);
output($row['name']);
}
?>

I am not going to support these changes however, because if you don't want problems, you need to rewrite the entire module to support the multiple marriages..

Note: You need to modify that a bit more for your charstats. Output aint gonna work with it.
« Last Edit: July 11, 2012, 12:03:07 PM by Stephen Kise » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

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