Don't use it on v1.3.8a; upgrade to v1.3.9h and use the latest mod version, if you can't upgrade to v1.5.0 now.
Don't use it on v1.3.8a; upgrade to v1.3.9h and use the latest mod version, if you can't upgrade to v1.5.0 now.
I have been working on the details of integrating the control improvements into the mod, and have a number of suggestions.
First, a change in the install sql, per swguy's post, to avoid a common mod bug that deletes configuration_group 0 on initial install.
Trimming completely unnecessary files from the package. Several of the files (repeated 9 times) are never used for anything. Some of the files can probably be consolidated into one middlebox_filenames.php and one middlebox_defines.php file.
I will test these changes on my development site when I have time, and will be happy to send you a full set of the proposals if you want to work on them now.
I'm glad you are working on this, as the changes you are making to improve this are necessary but a tad over my head to implement.
The SQL bug in this mod is truly as a result of "monkey see, monkey do". I copied off of someone else's homework (Fual Slimbox I believe), not knowing at the time that I was copying an error... Won't be making that mistake again.
Some of the files you see in the current version are there because frankly I did not know another way to do this other than what you see executed..I assumed that for each editable box, you would need a separate editable defined page.
It was a down and dirty solution for a site I was working on at the time, and I shared it because I thought others might want this kind of functionality as well.. I was trying to replicate a feature available in WordPress where you can create themes with "widgetized areas" located in places other than the sidebar.
I wanted to be able to show/display admin editable content along with specific sideboxes in the center content area of the homepage. I stuck with using defined pages for the centerboxes because I did not know how to get specific sideboxes to appear in the middle content area of the home page and so I used the defined pages instead to "recreate" the sideboxes I wanted to display in the center..
It would be nice if these centerboxes could display specific sideboxes as well as allow for admin editable content. (hint hint..)
I would be very interested in testing the code to if you don't mind sending me a copy.. I'll PM you my e-mail info.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
The superfluous files may be proper parts of a standard define page, but as the middleboxes are not being used that way, only the files required to allow the Define Pages Editor to handle them are needed here. I'll experiment to see for sure which ones are necessary.
For v1.5.0 compatibility, I am reading mixed signals from those who fully understand admin configurations... "Pages" are supposed to be registered, but there are also comments about using the same (corrected) SQL, presumably for current mod writers to apply. I don't know if this configuration group represents a new page that needs additional handling.
Any file upgrades will be straightforward.
My current code is all contained in one holding file, and still needs to be distributed into individual new and modified files for use.
I think lots of mod writers copied the wrong example - swguy gives a long list of mods that all have the same issue.
The "sideboxes in the center" idea would be great, but I had been thinking that it would require completely different handling. A thought just occurred to me that perhaps the define page file could be written to require/include the desired sidebox module file, which would then use the sidebox tpl_ file... It would probably be necessary to include a bunch of setting statements in the define so that the sidebox believed itself to be in the right environment, and might not be possible without widespread code changes (not practical)... we'll see:)
Cool.. I did what I thought was the right way..But I know there's always more than one way to skin a cat so to speak.. I leave it in your more than capable hands as to the correct manner of execution..
I saw that.. Also on that similar vein there are the questions on how custom product types and whether or not they should be "registered". niccol has an open question on the 1.3-1.5 topic area on how custom product types will work in the new v1.5 world. I am awaiting answers on this as I have a custom module that uses custom product types too..
Yep, and all the ones I've had my little hands in will be updated to remove the error.. I've already updated Ty Package Tracker to remove this "bug".
I wonder if the Sideboxes Anywhere code might provide some insight on how to support this..You would know better than I if this code is adaptable..
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Yes, Sidebox Anywhere may well show how to handle it. The main question is if the manual setting of variables needed to allow a sidebox to operate in the center will interfere with other sideboxes, perhaps in the right column. At any rate, I wouldn't be getting into that at this point. If this control upgrade succeeds, that will be enough for one release of the mod.
I have the files modified and updated, with a couple of improvements over the posted code, except for the SQL. That is updated for function and avoiding the config_group 0 bug, but I have still not been able to find out how to make it unequivocally work in v1.5.0.
I can't spend more time on it now, as I have to finish the graphics for a festival ad to go to the printers tomorrow (no pressure:)
I'll see if I can attach a zip (it may be too big).
Okay, found the thread with accurate and _complete_ information (post 13) on SQL for setting up and registering new configuration groups. Still not sure how it would all be done programmatically (where are there examples of the whole shebang?), but an install.sql will work.