Creating a Dynamic Application

May 26, 2010 at 4:07 PM
Edited May 26, 2010 at 4:28 PM

I have been working on a application to give the end user a  dynamic PowerPoint. A major hangup I have is managing the slides. My algorithm splits a working template into parts and then merges them back together.  This has not bode well as I have issues where the php arrays do not merge, and I am also having problems writing to resulting arrays to disk. I realize that these are php issues, but I am open to suggestion as to what a more effective approach might be to achieve a dynamic slide deck.

Remember, I have already sliced the working proto-types into static file-parts and parts that need string substitutions

Here is pseudo code for what I am doing:

read file-part into an array that contains the GPL PHP comment lines and write it back to disk - this works fine
read into an array the first static file-part containing the required phppowerpoint class calls
merge these - this merge is not working. I am unable to get the merge of the license part and the first static file-part to work.
    foreach (userSelections) - userSelections are images from a html-page with checkboxes with image for user to select.
       (The core function of this application is to enable users to select one image each for each powerpoint slide) 
        buildSlide - this process works. I strategically use merges, file writes and file_get_contents to customize this slice part,  then use array_pushes
        once certain user customizations are substituted in certain strings 
    end the foreach build-a-slide loop - this is working for one slide - I am still testing the stack all slides function.
    merge 'All slides' - this is not working
    merge array of all slides to array with GPL license and first static part 
create array of phparray save file and make template parts  - this is incomplete, and untested
finally merge this array with the already merged license part, first-static part, and slideDeck-stack arrays 

If my merges worked,especially the slideDeck-stack  I could then simply create link pointing to the pptx file that phppowerpoint could now create for me. 

Since php merges are not working out, does anyone have a better idea? 






May 27, 2010 at 3:48 PM
Edited May 28, 2010 at 2:28 PM

a similar operation in PERL is working a lot better. Now the issue is tying the enduser choices in PHP back to PERL phppowerpoint script builder. hmm.

Jun 10, 2010 at 5:30 PM