Re: [MRBS-general] MRBS HELP!
Brought to you by:
jberanek
From: Anselm M. H. <an...@ho...> - 2008-07-23 10:06:18
|
Am Mittwoch, den 23.07.2008, 00:42 -0700 schrieb Megat M Hafiq: > > How to modify edit_entry.php so that I can pull out yearly options in > the repeat type options > > > Thank you in advanced > > > Hi Megat, <rant> important things first: Your mail was sent as HTML. Please do not do that again. Some mail programs (including mine) refuse to edit your text or put comments in between, I have to quote it entirely or not at all (or fiddle with copy and paste). It is a hassle. A more precise topic might attract more attention too. "repeat type: hide "yearly" option" might have been adequate. Mails on this list often ask for (or give) help, and MRBS as a topic is not quite specific on this mailing list. I sometimes just ignore mails that fail to adhere to the (widely accepted) guidelines for mailing list postings found at http://www.catb.org/~esr/faqs/smart-questions.html </rant> About your question: Take your favourite editor and open edit_entry.php. Find a code block like the following: 8<==== SCHNIPP for($i = 0; isset($vocab["rep_type_$i"]); $i++) { echo "<INPUT NAME=\"rep_type\" TYPE=\"RADIO\" VALUE=\"" . $i . "\""; if($i == $rep_type) echo " CHECKED"; echo ">" . get_vocab("rep_type_$i") . "\n"; } SCHNAPP ====>8 (about line 500 in my heavely edited version, may be different in original source code - web svn is down, so I cannot check there quickly). Insert an if clause inside the for{} like this: 8<==== SCHNIPP for($i = 0; isset($vocab["rep_type_$i"]); $i++) { if ( $i != 4 ) { echo "<INPUT NAME=\"rep_type\" TYPE=\"RADIO\" VALUE=\"" . $i . "\""; if($i == $rep_type) echo " CHECKED"; echo ">" . get_vocab("rep_type_$i") . "\n"; } } SCHNAPP ====>8 Notice the new "if" line and the matching closing brace "}" further down. This makes MRBS display all but the option no. 4 (which is yearly, if I read it correctly). There may be other places in the codebase that affect this, but you surely can track those down by grepping for "vocab.*rep_type" or the like. HTH Anselm |