Dear Drupal Community,
After digging through the Converting 4.6 modules to 4.7, the hook_nodeapi for 4.6 and 4.7 API pages, the hook_nodeapi('form x', ...) replaced by form api section, the hook_user, and a multitude of searches along the lines of “HowTo convert a 4.6 module to a 4.7 module,” I'm stumped. I've managed to learn/thieve/borrow enough other code to get the other 700-800 lines of this modified AdSense module to work as desired, but the proper method for converting these two items continues to baffle me:
- Converting "function adsense_nodeapi(&$node, $op, $teaser, $page)"
[moved to separate thread in this post as this one got long with the Form Updater tidbits.]
- Placing two form text fields on a single line.
In the example below "Version 4.6.x: foreach(range(1,200)..." , while it has all the inherent drawbacks of embedded hardcoding, it did produce two text boxes on the same screen line. Is there anyway within the regular "$form['name'] = array(..." methodology to archive the same thing?
Can I impose on some nice coder to review/fix what I tried? Even if you would post an RTFM with a link to something that gives a concrete example on what exactly should be changed, I'd be happy.
Thanks,
M.J. Taylor
(And no, I didn't write the original code...)
PS: As an aside from my questions, and mostly for anyone stumbling on this thread, the Form Updater on lullabot.com http://www.lullabot.com/formupdater is a very useful tool. A couple of notes are in order though, when it mentions you will have to wrangle with fieldsets, it's not kidding. The field set element should be placed at the top of your grouping, and there needs to be a rolling Form tagging as you go. An Example:
Version 4.6.x
foreach(range(1,200) as $channel) {
$output .= '
Adsense '
. 'ID
'"> & Readable Name #' . $channel . '' .
'