Member
Member
amucklow   2011-04-30, 15:48
#1

My theme uses album codeblock values in the next_album() loop in the index.php file. I had it working fine before I upgraded to 1.4.0.3, but now it's not working in any theme.

The values are still being stored in the database, and they are still available on album.php, so I'm thinking there's a bug limiting the scope of getCodeBlock()?

Thanks

Member
Member
amucklow   2011-04-30, 16:07
#2

Just went into template-functions.php and checked out the getCodeBlock() function. Changing this:

case 'index.php':

To this:

case 'index.php': $getcodeblock = $_zp_current_album->getCodeblock(); break;
fixes the issue I was having.

Member
Member
sbillard   2011-04-30, 16:31
#3

So, I presume that you are doing this on your index page within the next_album() loop?

Anyway, the code you have made while it works for you may well cause problems elsewhere. The getCodeblock() function is intended for pages associated with objects (album.php, news.php, etc.) and gets the codeblock of the "current" object.

What you really need to be doing is using the object model to get the album codeblock. Your theme should use

$getcodeblock = $_zp_current_album->getCodeblock(); $codeblock = unserialize($getcodeblock); @eval('/>'.$codeblock[$number]);

Member
Member
amucklow   2011-05-03, 11:59
#4

Thanks!

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.