need help with my plugin (bbPortal admin)
-
Well, I am trying to ad an adminpage to bbPortal. I am quite far, got the admin page, it checks the db for the table bb_portal and if it doesntexcsits, it creates the table.
Also the form is working (the looks anyway), but how do I get the forum id from <?php forum_dropdown(); ?> cause it gives the name only. And I want it that when people select the forumname using this ddlb the forum id will be written to
pforum_id
when pressing submit.Sec problem; people can fill in a number for the Number of topics on the portal in an input field, but now comes the noob question:
How the hell do I update this input to the db?
This is my form for now:
<form action="<?php echo $bb->domain. $_SERVER['REQUEST_URI']; ?>" method="post">
<?php do_action('portal_option_form_elements',''); ?>
<h3><?php _e('Portal settings'); ?></h3>
<table>
<tr><th scope="row"><?php _e('Where do you want to pull the topics from?'); ?></th>
<td><?php forum_dropdown(); ?></td>
</tr>
<tr><th scope="row"><?php _e('Number of topics on the portal:'); ?></th>
<td><input type="text" name="number-of-topics" id="number-of-topics" /></td>
</tr>
</table>
<p class="submit alignleft"><input type="submit" value="Submit" name="submit">
</form>
And this is the table where the info must be put in:
Table name: $bbdb->portal
pforum_id int(10) NOT NULL,
number_of_topics int(10) NOT NULL
Hope you guys can help me
- You must be logged in to reply to this topic.