<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>I added a wrapper to config.php that parasites off of your Data function so that I (theoretically) wouldn't have to hack your script. </DIV><DIV><BR class="Apple-interchange-newline"><BR><DIV>function Simile () {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>global $pagename, $DataKey, $ScriptUrl, $data, $MessagesFmt;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>// save data that will be changed</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>$hold_pagename = $pagename;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>// split up data from simile on form</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>$similes = explode("\n", $_POST['Simile']);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>foreach ($similes as $value) {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>if ((trim($value)) == "") continue;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$simile = explode(" ", $value);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$firstfour="$simile[0] $simile[1] $simile[2] $simile[3]";</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>// create new page title(s)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>// Simile/BookTitle:AuthorName:FirstFourWordsOf</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$newpage = $_POST['Work'] . ":" . $_POST['Author'] . ":" . $firstfour;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>$pagename = MakePageName("Simile.HomePage", $newpage);</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>// add new pages to wiki</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>Data();</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>// reset data that changed</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>$pagename = $hold_pagename;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV>}</DIV><DIV>$HandleActions['simile'] = 'Simile';</DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>As it stands it only adds the first page sent to it. Everything up to the call to Data works just fine -- it iterates through, creates new page names, etc.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I think I need a flag for Data() that will stop it from ending the script execution and return control to the wrapper script. That allows Data to be a usable hook for similar recipes to mine. i.e. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>your definition:</DIV><DIV>function Data() {</DIV><DIV>...</DIV><DIV>}</DIV><DIV>becomes your definition:</DIV><DIV>function Data($flag=0) {</DIV><DIV>...</DIV><DIV>// check flag & if set, stop function execution; return control to the calling program</DIV><DIV>if ($flag) { break; }</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>//this is the end of the processing, so now you can refresh the page, and return the user to the browser</DIV><DIV>// this will only execute if $flag=0 or $flag is unset by the calling program</DIV><DIV>// i.e. this is what you're doing now, after the page is created, but before you refresh the page since that makes your script stop anything else from running</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>this change won't break anything already running using the Data function, but will allow more wrappers to use it. :)</DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Comic Sans MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Comic Sans MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Comic Sans MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV></SPAN></SPAN></SPAN><DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Comic Sans MS" size="3" style="font: 12.0px Comic Sans MS">Crisses</FONT></P></DIV></BODY></HTML>