Forums | Storyline numbering weirdness.

You must be logged in to post Login Register

Search Forums:


 






Storyline numbering weirdness.

UserPost

7:21 pm
July 13, 2008


DmL

Member

posts 12

In the first storyline, things look normal:
http://evo.dmlcorp.net/2007/03/14/first/
(1 of 11)

In the second story line, should it say 1 of 12?:
http://evo.dmlcorp.net/2007/03/14/first/
(it says part 12 of 23)

Is that correct?

David

8:24 am
July 14, 2008


Brad

Admin

posts 186

Nope, that's messed up all right. First story seems OK, subsequent stories are messed up.

If you can, put the following debugging code somewhere on one of your pages, and send me the resulting output in a private message:

<?php echo '<pre style="text-align:left">',var_dump($stripshow_story),'</pre>'; ?>

This will help me get a sense of what your storylines are supposed to look like.

6:29 pm
July 14, 2008


DmL

Member

posts 12

Sent.

8:26 pm
July 14, 2008


Brad

Admin

posts 186

Thanks. After looking over your output, I see the problem. The comics that are part of each storyline are stored in an array… I see that when it's creating the objects for storylines, it doesn't reset the numbering for each one. So the first storyline has parts 1-10, the second has 11-33, etc. Now I just need to figure out why that is.

8:32 pm
July 14, 2008


Brad

Admin

posts 186

OK, found it. It's fixed for the next version, but if you want to fix it yourself, open stripshow.php, look for:

$stripshow_story[$a]->parts = array_filter($comics,array($current_story,'is_in_story')); // get only the comics that are in this story

and replace it with:
$stripshow_story[$a]->parts = array_values(array_filter($comics,array($current_story,'is_in_story'))); // get only the comics that are in this story

The code is in the initialize_storylines() function.

Stupid mistake. I should have read the manual about the array_filter() function. It spelled out the issue for me.

2:38 am
July 15, 2008


DmL

Member

posts 12

You're a peach!  thanks!  Now I just have to figure out how I borked my lower nav images pasting that dump code in before. : )

David



  • Subscribe to Feed

    Enter your email address:

    Delivered by FeedBurner

  • Meta

  • Donate

    While I don't maintain stripShow for a living, I wouldn't say no to a little donation, if you think the plugin is worth it...

  • Advertisements