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

Addding quotes to collecting
For adding quotes to your collecting decks, open up your func.php file. You'll need to go to EVERY custom show_collectingetcetc function I wrote, or at least every one you plan on using, and add in a new field ( $quote = '' ) at the end of each function. If you installed every function I wrote across the 3 docs, there should be 7 of them total (remember you're not altering any show_masteredetcetc functions)
For example:
function show_collectingpairalt($tcg, $deckname1 = '', $deckname2 = '', $shiptype = '', $breakpoint = '') {
is changed to:
function show_collectingpairalt($tcg, $deckname1 = '', $deckname2 = '', $shiptype = '', $breakpoint = '', $quote = '') {
This does mean that whenever you want to add a quote to a deck, you'll also have to add in the shiptype and the breakpoint and whatever other fields are in front of it. You could add it in before the shiptype too, if you wanted, I'm just instructing you to put it at the end because that's the easiest.
After you've added that in, scroll down to each function until you see:
< br >
< h2 >< ? php echo $row1['deck']; ? > < ? php echo $shiptype; ? > < ?php echo $row2['deck']; ? > (< ? php echo $count; ? >/< ? php echo $row1['count']+$row2['count']; ? >)< / h2 >
or something similar. The br line followed by the h2 line, essentially.
Right after these two lines, insert this bit of code:
Save and reupload and open up your pairings.php file.
Scroll down to your collecting section. You can now enter the new field into your existing code, like the following:
show_collectingpairalt('Pairings','red','blue','/','10','< b >Have you never heard of personal space< / b >');
Again I would recommend actually using h3 or something of the like instead of doing all the bold font, italics, size etc in that field because it's a lot easier to tweak things the way you want them and I also have no idea what, if any, is the string limit length in php.
After that, you should be done! Again if anything goes wrong or your code explodes because I left out a step in any of my explanations (i... i don't think i did...) drop me a line and I'll help you fix it o7