Show Needed | v1.1 | etcgfm v1.0.1 | up 5.17.14

  1. ‹ Older
  2. 5 years ago

    Hi thanks for this :)

    I added it to my site and all i got was

    01/02/03/04/05/06/07/08/09/10/11/12/13/14/15.

    so i think i may have done something wrong, could anyone take a look if they have chance? I have php5.3 but can switch to php5.2

    my page coding @ http://tny.cz/b4d8751e - line 31
    my func.php @ http://tny.cz/ed59a6dc - line 546
    in practice @ http://randomflowers.co.uk/chemistry.php

  3. "Rebekah" Hi thanks for this :)

    I added it to my site and all i got was

    01/02/03/04/05/06/07/08/09/10/11/12/13/14/15.

    so i think i may have done something wrong, could anyone take a look if they have chance? I have php5.3 but can switch to php5.2

    my page coding @ http://tny.cz/b4d8751e - line 31
    my func.php @ http://tny.cz/ed59a6dc - line 546
    in practice @ http://randomflowers.co.uk/chemistry.php

    I'm not sure how much this matters. I'm sure it makes a difference. But you have:

    <?php show_needed(chemistry, collecting, 15); ?>

    Where the first letter in chemistry is lowercase. I'm assuming it should be uppercase seeing as that's how you have it on other lines i.e.:

    <?php echo get_additional('Chemistry','level'); ?>

    That should fix the issue. I don't see anything else wrong other then that.

  4. Hi Nina, thanks for looking i didnt spot that :)

    I've just edited my code, cleared cache and tested on another browser but changing to a capital C hasn't changed anything :(

    Thanks again for looking!

  5. Bloo

    8 Nov 2013 Administrator kablooey.net

    Hmm. Try adding quotes?

    <?php show_needed('Chemistry', 'collecting', 15); ?>
  6. You're welcome and try what Bloo suggested. I didn't even realize you didn't have quotes in the coding. I know that I had that problem as well using s different mod and that's all it needed.

  7. If I remember correctly, the quotes are needed to ensure what the string is (as strings can have commas, so it wouldn't know where to begin and end).
    The fact that it doesn't have any decks or anything means it's probably not grabbing the category (which it probably wouldn't with this error), so that should fix it. If it doesn't, let me know, and I'll make sure I didn't mis-copy something in the code.

  8. Edited to overwrite

    I feel so stupid right now as i have just realised instead of putting the category name in which is 'keepingnext' i inputted in the name i gave the name i orriginally had for the page those decks are on.

    sorry for wasting your time looking at this, I can only assume that as i call each collecting deck up to get my layout as is then this affects those decks showing up or that it's not possible to show these decks.

    Thanks to all of you for looking at this for me, i just can't believe it was a stupid mistake.

    <?php } elseif ($_SERVER['QUERY_STRING'] == "collecting") { ?>
    
    <?php define('VALID_INC', TRUE); include 'func.php';
    include('header.php'); ?>
    
    <p><center><h1>Chemistry</h1> <br><b>  
    <a href="http://randomflowers.co.uk/chemistry.php">Main</a> .. 
    <a href="http://randomflowers.co.uk/chemistry.php?collecting">Collecting</a> ..  <a href="http://randomflowers.co.uk/chemistry.php?future">Future Collecting</a> ..
    <a href="http://randomflowers.co.uk/chemistry.php?keeping">Keeping</a> .. 
    <a href="http://randomflowers.co.uk/chemistry.php?mc">Member Cards</a> .. 
    <a href="http://randomflowers.co.uk/chemistry.php?soulmate">Soulmates</a> .. 
    <a href="http://randomflowers.co.uk/chemistry.php?trading">Trading & Doubles</a> .. 
    <a href="http://randomflowers.co.uk/chemistry.php?pending">Pending</a> .. 
    <a href="http://randomflowers.co.uk/chemistry.php?mastered">Mastered</a> .. </center></b>
    
    <p>
    
    <a name="collecting"><h1>Collecting</a></h1></a>
    <center>
    
    <table>
    <tr>
    <td valign="top"><?php show_collecting('chemistry','','anas-dimitrianya'); ?></td>
    <td valign="top"><?php show_collecting('chemistry','','angel-gunnfred'); ?></td>
    <td valign="top"><?php show_collecting('chemistry','','batb-lumierecogsworth'); ?></td>
    </tr>
    
    <tr>
    <td valign="top"><?php show_collecting('chemistry','','bbt-pennyamy'); ?></td>
    <td valign="top"><?php show_collecting('chemistry','','gg-lukelorelai'); ?></td>
    <td valign="top"><?php show_collecting('chemistry','','ggirl-danserena'); ?></td>
    </tr>
    
    <tr>
    <td valign="top"><?php show_collecting('chemistry','','herc-herculesmeg'); ?></td>
    <td valign="top"><?php show_collecting('chemistry','','poto-phantomchristine'); ?></td>
    <td valign="top"><?php show_collecting('chemistry','','sat-zacklaney'); ?></td>
    </tr>
    
    <tr>
    <td valign="top"><?php show_collecting('chemistry','','woo-dorothytoto'); ?></td>
    <td valign="top"><?php show_collecting('chemistry','','sd-rebekah'); ?></td>
    </tr>
    </table>
    
    </center>
    <?php include('footer.php'); ?>
  9. "Rebekah" I feel so stupid right now as i have just realised instead of putting the category name in which is 'keepingnext' i inputted in the name i gave the name i orriginally had for the page those decks are on.

    sorry for wasting your time looking at this, I can only assume that as i call each collecting deck up to get my layout as is then this affects those decks showing up or that it's not possible to show these decks.

    I might be misunderstanding this, but do you mean the collecting decks not showing up in the show_needed list?
    If so, it's because it pulls a category, and there's no "Collecting" category. The code was made mainly for keeping decks. If you'd like to be able to see which cards you need for your collecting deck without accidentally putting the wrong number, I can tell you how to add the title to the filler cards in your collecting deck (so that when you hover over a filler, it tells you that missing card).

  10. thanks for the help and explanation Dite, i think its me misunderstanding the mod, its fine though i don't need to show those for the collecting decks now :) thanks for spending the time to look at this though.

  11. 4 years ago

    Just a note to let everyone know I took some time and added everything I planned to, as well as making it usable for Collecting decks.

  12. Maybe I'm missing it, but I can't seem to find the pending function any where. Is it not available anymore? I have the previous version of this mod working, but I can't get this version working because I don't have that function.

  13. @Drakmin Maybe I'm missing it, but I can't seem to find the pending function any where. Is it not available anymore? I have the previous version of this mod working, but I can't get this version working because I don't have that function.

    I've been looking for this as well but can't seem to find it anywhere.

  14. Hi Dite, really looking forward to using this mod but I'm coming up with an error: "Fatal error: Call to undefined function pending() in /home/carbonb/public_html/flashlight/func.php on line 469"

    line 469: $pending = pending($tcg, $check.$might);
    page I'm trying to use it on: link
    code on page: <?php show_needed( 'Small Screen', 'collecting', 20, $pend=0, $low=0); ?>
    and attached is my func.php

    let me know if you need to see any of my other code

  15. It's because this version of the show_needed function requires another function called pending. The pending function is not included in this one. It's completely separate from the show_needed function. A few of us are looking around to find it. If I find it before there's a reply, I'll let you guys know where it is.

  16. Oooooh okay I see, thanks.

  17. Crap. Sorry guys. I've been forgetting to check this.

    And, I didn't realize I didn't have a pending function (sometimes, when I have a function for a while, I use it and don't think about it. XP)
    Add this function before it and see if it works:

    function pending($tcg, $card){
    	$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'];
    	$pending = $database->num_rows("SELECT * FROM `trades` WHERE `tcg`='$tcgid' AND `receiving` LIKE '%$card%'");
    	return $pending;
    }
  18. Okay so I added that snippet, and I'm still getting an error, this time "Fatal error: Call to undefined function get_category() in /home/carbonb/public_html/flashlight/func.php on line 450"
    Attaching my func.php again in case it's needed

  19. That mod is here .
    It's a mod I've started using a lot (it's a function to get the list of cards in a category, so it cuts down on the coding of other mods, especially if I need to grab multiple categories.

  20. Alright so it's working great for my keeping category, but I'm getting ": 01/02/03/05/07/08/09/10/11/12/13/14/15/16/17/18/19/20" for my collecting.

  21. I'll get that fixed soon. After noticing some of my older mod coding isn't as good as it is now (and not all of it is updated for the new version), I'm going to revamp some of my mods.

  22. Newer ›

or Sign Up to reply!