adurotum: (I am the boss. Yup.)
Ten ([personal profile] adurotum) wrote in [community profile] pairings_trade 2013-08-08 03:00 am (UTC)

Adding quotes to masteries

Awesome okay!

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!

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