This is another mod created by Dite.
You have cards in your pending that are coming in but they only show up in your collecting decks, not in your regular piles.
Dite used the previous get_category mod to make pending cards appear in eTCG category piles like keeping/future.
mods.php along with Dite’s get_category mod.function show_pendcards($tcg, $category, $pendname='pending') {
$database = new Database;
$sanitize = new Sanitize;
$tcg = $sanitize->for_db($tcg);
$tcginfo = $database->get_assoc("SELECT * FROM `tcgs` WHERE `name`='$tcg' LIMIT 1");
$tcgid = $tcginfo['id'];
$cardsurl = $tcginfo['cardsurl'];
$format = $tcginfo['format'];
$cards = get_category($tcg, $category);
$cards = explode(', ',$cards);
$list = get_additional($tcg, $category);
if(empty($list)) {
$list = array();
foreach($cards as $card) {
$deck = substr($card,0,-2);
$list[] = $deck;
}
$list = array_unique($list);
sort($list);
} else {
$list = explode(', ',$list);
}
$pend = $database->query("SELECT * FROM `trades` WHERE `tcg`='$tcgid'");
$pending = array();
// Gets all pending cards
if(mysqli_num_rows($pend)>0){
while($p=mysqli_fetch_assoc($pend)) {
if(!empty($p['receivingcat'])) {
$cats = explode(', ',$p['receivingcat']);
$divide = explode('; ', $p['receiving']);
for($i=0;$i<count($cats);$i++) {
if($cats[$i]===$category) {
$pending = array_merge($pending, explode(', ',$divide[$i]));
}
}
} else {
$divide = explode(', ', $p['receiving']);
foreach($divide as $pendcard) {
if(in_array(substr($pendcard,0,-2),$list)) {
$pending[] = $pendcard;
}
}
}
}
}
array_walk($pending,'trim_value');
//Makes a deck array with cards.
$cards = array_unique($cards);
$cards = array_combine($cards, $cards);
//Adds related pending cards to category.
foreach($pending as $check) {
if(empty($cards[$check])) {
$cards[$check] = $pendname;
}
}
if ( empty($cards) ) {
echo '<p><em>There are currently no cards under this category.</em></p>';
} else {
uksort($cards, 'strcasecmp');
foreach ( $cards as $title=>$card ) if (($category=='future' OR $category=='farfuture' OR $category=='trade' OR $category=='futurePuzzle' OR $category=='farfuturePuzzle' OR $category=='tradePuzzle' OR $category=='future-sp' OR $category=='farfuture-sp' OR $category=='trade-sp') AND ($tcg=='The Works' OR $tcg=='ColorPOP' OR $tcg=='Shizen' OR $tcg=='Tracklist' OR $tcg=='Naturally' OR $tcg=='Sidequest' OR $tcg=='Literary' OR $tcg=='Frames')) {
$card = trim($card);
echo '<li><img src="'.$cardsurl.''.$card.'.'.$format.'" alt="" title="'.$title.'" /><span class="cardname">'.$title.'</span></li>';
} else {
$card = trim($card);
echo '<img src="'.$cardsurl.''.$card.'.'.$format.'" alt="" title="'.$title.'" /> ';
}
}
}
<?php show_pendcards('<TCG GAME>','<CATEGORY>'); ?>