Ten (
adurotum) wrote in
pairings_trade2013-08-07 01:14 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Entry tags:
MOAR CODE and also trades?!
Sup Pairings!
Ten rolling through again with another batch of code for those using websites to host their cards. I have them held in a folder here, but I'll also link each set of instructions below in case you're looking for something specific! I've also updated some of the code I linked before, so if you installed any code earlier, I would recommend re-installing them and re-reading the guides to make sure you've got the most up-to-date version.
Displaying ships on your collecting page I THINK I added in selecting your ship type and fixed a spacing issue since the last time I posted this code.
Displaying all 60 cards in an OT3 on your collecting page New code, I think! Handy for OT3 collectors who want to see all the cards they need for an OT3 at once.
Displaying ships on your mastery page I literally finished this one just this morning, and unfortunately I don't have a good number of ot3s/repeated mastered decks to properly test this one out. So! If you have repeated mastered decks and/or OT3s mastered, I'd really appreciate it if you gave me feedback on this code and whether or not it runs properly. as another note to mod-types, please ignore the mastery pairing for the ot3, I needed something to test out the display and didn't have any ot3s mastered yet 8( The cards displayed here don't add to my card count and I'll take down this example ot3 in a week.)
EDIT: If you were interested in having quotes displayed with your masteries/collecting decks, I drafted up two mini guides on how to alter your code to allow for quotes.
You can see examples of almost all the code on my site! If any of the code or my guides don't make sense/break your site horribly at any point, feel free to contact me through this post and I'll help clear things up. And because this is the trading comm and all, I am always open to trades! I'm especially looking for any gangsta decks (heels, tags, pallmall) so I can have a for-real ot3 mastery and lucky dog decks (luckydog x5, maddog, smuggle, assault) for... reasons...
Coding-wise, I'm going to take a little break in order to catch up on graphics and other things, but I'll be tackling mass decks next. If there's any other code you'd be interested in having, I'm open to suggestions! Thanks for your time o7

Ten rolling through again with another batch of code for those using websites to host their cards. I have them held in a folder here, but I'll also link each set of instructions below in case you're looking for something specific! I've also updated some of the code I linked before, so if you installed any code earlier, I would recommend re-installing them and re-reading the guides to make sure you've got the most up-to-date version.
Displaying ships on your collecting page I THINK I added in selecting your ship type and fixed a spacing issue since the last time I posted this code.
Displaying all 60 cards in an OT3 on your collecting page New code, I think! Handy for OT3 collectors who want to see all the cards they need for an OT3 at once.
Displaying ships on your mastery page I literally finished this one just this morning, and unfortunately I don't have a good number of ot3s/repeated mastered decks to properly test this one out. So! If you have repeated mastered decks and/or OT3s mastered, I'd really appreciate it if you gave me feedback on this code and whether or not it runs properly. as another note to mod-types, please ignore the mastery pairing for the ot3, I needed something to test out the display and didn't have any ot3s mastered yet 8( The cards displayed here don't add to my card count and I'll take down this example ot3 in a week.)
EDIT: If you were interested in having quotes displayed with your masteries/collecting decks, I drafted up two mini guides on how to alter your code to allow for quotes.
You can see examples of almost all the code on my site! If any of the code or my guides don't make sense/break your site horribly at any point, feel free to contact me through this post and I'll help clear things up. And because this is the trading comm and all, I am always open to trades! I'm especially looking for any gangsta decks (heels, tags, pallmall) so I can have a for-real ot3 mastery and lucky dog decks (luckydog x5, maddog, smuggle, assault) for... reasons...
Coding-wise, I'm going to take a little break in order to catch up on graphics and other things, but I'll be tackling mass decks next. If there's any other code you'd be interested in having, I'm open to suggestions! Thanks for your time o7

Adding quotes to masteries
First, to add quotes to your masteries, open up pairings.php and scroll down to that giant chunk of code you add in for displaying paired masteries. You'll see two instances of the following code:
if ( $shiptype == 1 ) { $shiptype = '/'; }
else if ( $shiptype == 2 ) { $shiptype = '-'; }
else { $shiptype = '/'; }
Insert the following code after the first instance:
$masteredot3quotes = array(
"DECKID" => "QUOTETEXT",
);
And the next after the second one:
$masteredpairquotes = array(
"DECKID" => "QUOTETEXT",
"DECKID" => "QUOTETEXT",
);
For $masteredot3quotes, deckid should correspond to the 2nd deck you call in the show_masteredot3(blahblahblah) function you want this quote called for. For $masteredpairquotes, it should correspond to the 1st deck you call in show_masteredpair(blahblahblah)! You can use html tags (bold, italics, etc), but I would recommend using an unused header tag, like < h3 > or something so you can customize the look of it in your css file instead of getting all clunky here. Make sure all your quotes for your OT3s go under $masteredot3quotes and your pair quotes go under $masteredpairquotes, I don't think they'll read across each other. Here's a few examples of how your quote declarations can look, minus all the spacing in the html tags of course:
"2" => "< b >Kida Masaomi / Ryuugamine Mikado< / b > < i >Durarara!!< / i >",
"1" => "< h3 >Dino Cavallone / Hibari Kyouya< / h3 >",
"3" => "Kida get out of Mikado's pants.",
Once you've got those in, scroll down again to the following code. There'll be two instances:
echo '< h1 >mastered< / h1 >';
echo '< p align="center" >';
echo '< img src = blahblahblah >';
Insert the following code after the first instance, getting rid of the spaces around the line break (ie br):
echo ''.$masteredot3quotes[$deckid2].'< br >';
And the following code after the second, getting rid of the spaces around the line break:
echo ''.$masteredpairquotes[$deckid1].'< br >';
Now save and reupload the file and this SHOULD be all you have to do to get them to display on your masteries page. The collecting page requires a little more effort, so I'm going to write that out in a new comment.
If you have any questions re: any of these steps, feel free to ask!