General
Increasing number of pixels offered
Started January 9, 2011 by Robert Peterson
Hello!Can anyone point me in the right direction here? I'd like to be able to offer more than a million pixels - how can I change that setting?Thanks!bob
11 replies
You have to edit your grid in the admin area.Click Manage Grids. Under Action column click Edit.Then just change the grid width and height and if you want to make things more complex you can change the block size. You might also have to modify the background image to match.Then if you change the block size you also have to modify the script to match. You would have to edit at least the display_stats.php file and change line 47:[code]$available = ((($b_row[grid_width] * $b_row[grid_height] * (BLK_WIDTH*BLK_HEIGHT) )-$nfs ) - $sold)/100;[/code] so that it devides by a number other than 100 I believe.I think there was some place else you had to modify it as well but I am not sure where that was right now.
Hi, Ryan! Thanks for the info. I think I'm getting close. A few more questions:1. I changed the grid size, but I'm sure exactly how to modify the background image. Here's my dev site:http://billionp.bftox.com/example.htmlWhat am I missing here?2. Do I even need to change the block size? I just want to be able to sell more than a million pixels (in this case, a billion).Thanks!b
You don't need to change the block size to add more pixels.What you probably didn't do is update your iframe code and process your pixels.To process pixels you have to go to the admin under Pixel Admin > Process Pixels and click Process Girds. You might also have to adjust your PHP memory setting in the Main config if it runs out of memory.You also might have to edit the example.html file and update the size of the iframe. You can get this code from the admin under Pixel Inventory > Get HTML Code in the Grid HTML box.
Hello!OK, I'm getting close. I did what you said and went to process the pixels again, but I got that memory error you described. I pumped up the memory to 64MB in the main config, but I still got the following error:Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 128000 bytes) in /xxxxxxxx/billionp.bftox.com/include/image_functions.php on line 121Is there anything I can do to resolve this?Thank you again!
You might be using too big of a grid then. If your web server allows you could try making it use 128M Memory Limit by editing your config.php file.Change this line:[code]define('MEMORY_LIMIT', '64M');[/code]To:[code]define('MEMORY_LIMIT', '128M');[/code]
Hi, it's me again!OK, I tried editing my config file like you specified. I found these few lines: [code]if (defined('MEMORY_LIMIT')) {ini_set('memory_limit', MEMORY_LIMIT);} else {ini_set('memory_limit', '12M');}[/code]So I commented out a few lines:[code]// if (defined('MEMORY_LIMIT')) {// ini_set('memory_limit', MEMORY_LIMIT);// } else {ini_set('memory_limit', '12M');// }[/code]I think I did that right? Anyway, I then adjusted the memory up higher and higher, with the same "memory exhausted" error. I got all the way up to 500MB, and then I got an internal server error.Am I out of luck here, or do I have any other options?Thank you again!
There is a line above them that was like the one I mentioned. Those lines don't need to be edited but what you did should work still. Your PHP probably can't use 500MB. That is a lot of memory for it to use. You have to make your image smaller.It is a single PHP function which uses up all the memory trying to build the large image. I don't really understand why it has to use so much memory since the image doesn't take up that much memory but it does.The only other option I could think is simply create multiple grids. You also could modify the code to cut the grid up somehow but that would probably take a lot of work.
Just checking: Is there a way for me to make the actual graphic smaller -- as in, at the Photoshop level -- that might help with this? Or is my only option to make the multiple grids?Thanks again!
Well you can try to make the block size smaller if thats what you mean. You might be able to make the background image smaller but I don't know if that will do anything. It will be assembling users images into the grid later so it will be converting images of all sizes into your grid image.
Ryan, it's me again.OK, I've got almost all of this site working, but I still can't process these pixels. I either get the "memory exhausted" error, or I get an internal server error.Do you have any other suggestions, or could I PM you to talk about hiring you to do some custom work? Thanks!!!
Well the only way I think you could process that many pixels is to either have a whole lot of memory on your system, or divide it up into multiple grids.You can create multiple grids, then just put them side by side. Just go to Manage Grids and click the green New Grid... button.Then you can create multiple grids because when you are done adding it and you click Save Grid Settings at the bottom the green New Grid... button is now at the top of the screen and you can keep creating as many as you want.Then go to Get HTML Code and you will see all the codes. Just paste them into your example.html file by the other one and if you want to arrange them you could either put them all in tables or use CSS styles or something like that.When the user goes to order they can pick which grid they want to post on.