adurotum: (Helloooo Sir.)
Ten ([personal profile] adurotum) wrote in [community profile] pairings_trade 2013-08-08 04:35 am (UTC)

Addding quotes to collecting

whup okay stepped away for dinner BUT NOW I AM BACK

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

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting