<a name="new_form"> </a> <h3 class="post-form"><?php _e("Add New Topic","gf");?></h3> <form name="new_topic_form" action="" class="standard-form postform" method="post"> <p id="post-form-title-container"> <label for="topic"><?php _e('Title'); ?> <input type="text" name="topic_title" id="topic" size="50" maxlength="80" tabindex="1" /> </label> </p> <p id="post-form-post-container"> <label for="post_content"><?php _e('Post',"gf"); ?> <textarea name="topic_text" col="48" rows="10" tabindex="2" id="topic_text"></textarea> </label> </p> <p id="post-form-tags-container"> <label for="tags-input"><?php printf(__('Tags (comma seperated)','gf'), bb_get_tag_page_link()) ?> <input type="text" tabindex="3" value="" maxlength="100" size="50" name="topic_tags" id="tags-input" gtbfieldid="44"> </label> </p> <p id="post-form-forum-container"> <label for="forum-id"><?php _e('Forum','gf'); ?> <?php echo gf_get_forum_dropdown(gf_get_root_forum_id());?> </label> </p> <?php wp_nonce_field("gf_create_topic");?> <input type="submit" name="submit_topic" value="<?php _e('Create new topic','gf');?> "/> </form>
<?php if ( gf_current_user_can_admin()||gf_current_user_can_mod() ) : ?> <!-- mimick bbpress dashboard--> <div class="admin"> <div class="dashboard" id="dashboard-right-now"> <h3><?php _e("Right Now","gf");?></h3> <?php $forum=bb_get_forum(gf_get_root_forum_id()); ?> <div class="table"> <table cellspacing="0" cellpadding="0"> <thead> <tr> <th>Totals</th> <th>Per Day</th> </tr> </thead> <tbody> <tr> <td><a href="<?php echo gf_get_forum_manage_link();?>"><span> <?php echo gf_get_total_forums_count();?></span> <?php _e("forums","gf");?></a></td> <td>N/A</td> </tr> <tr> <td><span><?php echo gf_get_total_topic_count();?></span> topics</td> <td><span>N/A</span> </td> </tr> <tr> <td><span><?php echo gf_get_total_posts_count();?></span> posts</td> <td><span>N/A</span> </td> </tr> <tr> <td><span><?php echo gf_get_total_tags();?></span> tags</td>
<div class="forums"> <!--list forums--> <?php if ( gf_has_forums('child_of='.gf_get_root_forum_id()) ) : ?> <h2><?php _e('Manage Forums','gf'); ?></h2> <ul id="forumlist"> <?php while ( gf_forum() ) : ?> <?php global $gf_forums_loop,$gf_current_forum;//print_r($bb_forums_loop);echo "breakkkk<br/><br />";?> <?php if (bb_get_forum_is_category()) : ?> <li <?php gf_forum_class('bb-category'); ?>> <?php gf_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a> <br /><?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?> <div class="row-actions"><a href="<?php echo gf_get_forum_permalink($gf_current_forum->forum_id);?>"><?php _e("View","gf");?></a>|<a href="<?php echo gf_get_forum_edit_link($gf_current_forum->forum_id);?>"><?php _e("Edit","gf");?></a>|<a href="<?php echo gf_get_forum_delete_link($gf_current_forum->forum_id);?>"><?php _e("Delete","gf");?></a></div> </li> <?php continue; endif; ?> <li <?php gf_forum_class(); ?>> <?php gf_forum_pad( '<div class="nest">' ); ?><a href="<?php gf_forum_permalink(); ?>"><?php gf_forum_name(); ?></a> <br /> <?php gf_forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?> <div class="row-actions"><a href="<?php echo gf_get_forum_permalink($gf_current_forum->forum_id);?>"><?php _e("View","gf");?></a>|<a href="<?php echo gf_get_forum_edit_link($gf_current_forum->forum_id);?>"><?php _e("Edit","gf");?></a>|<a href="<?php echo gf_get_forum_delete_link($gf_current_forum->forum_id);?>"><?php _e("Delete","gf");?></a></div> </li> <?php endwhile; ?> </ul> <?php endif; //gf_forums() ?> <!-- Load the Create forum form--> <?php locate_template(array("gf/admin/create-forum.php"),true);?> </div>