<tr> <th><?php _e('Main Theme','gf'); ?></th> <th><?php _e('Topics','gf'); ?></th> <th><?php _e('Posts','gf'); ?></th> </tr> <?php while ( gf_forum() ) : ?> <?php global $gf_forums_loop,$gf_current_forum;?> <?php if (bb_get_forum_is_category()) : ?> <tr<?php gf_forum_class('bb-category'); ?>> <td colspan="3"><?php gf_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_permalink(); ?>"><?php forum_name(); ?></a> <br /> <?php forum_description( array( 'before' => '<small> – ', 'after' => '</small>' ) ); ?><?php bb_forum_pad( '</div>' ); ?></td> </tr> <?php continue; endif; ?> <tr<?php gf_forum_class(); ?>> <td><?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>' ); ?></td> <td class="num"><?php echo gf_get_forum_topic_count($gf_current_forum->forum_id); ?></td> <td class="num"><?php echo gf_get_forum_posts_count($gf_current_forum->forum_id); ?></td> </tr> <?php endwhile; ?> </table> <?php endif; // gf_forums() ?> <?php locate_template(array("gf/topics-loop.php"),true);?> <?php if(gf_current_user_can_create_topic())locate_template(array("gf/topic-new.php"),true);?> <div id="view-links"> <?php if(is_user_logged_in()):?>
<?php if ( gf_has_topic_posts() ) : ?> <form action="<?php gf_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form"> <div id="topic-meta"> <h3><?php gf_the_topic_title() ?> (<?php gf_the_topic_total_post_count() ?>)</h3> <a class="button" href="<?php gf_forum_permalink() ?>/">← <?php _e( 'Back to Forum', 'gf' ) ?></a> <a class="button" href="<?php echo gf_get_current_topic_permalink() ?>/"><?php _e( 'Cancel', 'gf') ?></a></span> <?php if ( gf_current_user_can_admin() || gf_current_user_can_mod() || gf_get_the_topic_is_mine() ) : ?> <div class="admin-links"><?php gf_the_topic_admin_links() ?></div> <?php endif; ?> </div> <?php if ( gf_is_edit_topic() ) : ?> <div id="edit-topic"> <?php do_action( 'gf_before_edit_forum_topic' ) ?> <p><strong><?php _e( 'Edit Topic:', 'gf' ) ?></strong></p> <label for="topic_title"><?php _e( 'Title:', 'gf' ) ?></label> <input type="text" name="topic_title" id="topic_title" value="<?php gf_the_topic_title() ?>" /> <label for="topic_text"><?php _e( 'Content:', 'gf' ) ?></label> <textarea name="topic_text" id="topic_text"><?php gf_the_topic_text() ?></textarea> <?php do_action( 'gf_after_edit_forum_topic' ) ?>
<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>