This topic has 47 replies, 16 voices, and was last updated 8 years by Abe.

  • Author
  • #17411
     guy_fraser
    Participant

    In these forums, each topic has a status icon next to it, and when viewing a topic the topic creator can set the status to resolved / not support etc… How is that done?

    Attachments:
    You must be logged in to view attached files.
    #17413
     Pedroml
    Participant

    Should be part of bootstrap http://getbootstrap.com/examples/theme/

    #17473
     guy_fraser
    Participant

    Yes, but what plugin is on the back-end that puts the UI in to the forums and manages ticket status, etc?

    #17475
     Pedroml
    Participant
    #17476
     guy_fraser
    Participant

    Awesome win! I’d dredged through dozens of plugins and not found that one, glad to see it’s by imath – he’s one of the better developers out there 🙂

    #17481
     Pedroml
    Participant
    #17483
     guy_fraser
    Participant

    Yeah, I’d come across the getshopped one but their stuff looks mostly unmaintained – most of their plugins haven’t been touched since 2011 so I’m not keen on using them.

    #17484
     guy_fraser
    Participant

    I have a hunch that the setup used on this support site is based on this: http://extras.envato.com/wordpress-plugin/supportte-bbpress-support-forum-for-envato-marketplace-authors/

    #17485
     Pedroml
    Participant

    That’s the plugin that uses seventhqueen, but the other seems the best choice.

    #17486
     Pedroml
    Participant

    Right click here > “View source code” > ctrl+f > “vip” 🙂

    #17492
     Abe
    Keymaster

    Hi guys, We are using the KLEO theme with the getshopped plugin with some small CSS adjustments and added functions. Here is our full custom CSS added to the child theme:

    COPY CODE
    
    
    .bbpress-label {
    	color: #fff;
    	padding: 2px 4px;
    	border-radius: 2px;
    	margin-right: 5px;
    	font-size: 11px;
    	text-transform:uppercase;
    }
    .bbpress-label.resolved {
    	background: #7fc379;
    }
    .bbpress-label.in-progress {
    	background: #c0bbc0;
    }
    .bbpress-label.not-resolved {
    	background: #f9ae64;
    }
    
    #bbpress-forums li.bbp-forum-freshness .bbp-topic-meta, #bbpress-forums li.bbp-topic-freshness .bbp-topic-meta { display: inline; }
    .home #bbpress-forums { margin-bottom: 0;}
    
    .aq_widget_display_forums .bbp-forum-title {font-size: 15px;line-height: 26px;}
    .aq_widget_display_forums  .bbp-forum-title.current {font-weight: bold;}
    
    *, *:before, *:after {
        -moz-box-sizing: border-box;
    }
    *, *:before, *:after {
        -moz-box-sizing: border-box;
    }
    
    #bbps-topic-status  input[type="submit"] {
        border-radius: 3px;
        border-style: solid;
        border-width: 1px;
        font-size: 12px;
        font-weight: normal;
        line-height: 1.5;
        margin: 3px 0;
        min-width: 80px;
        padding: 5px 10px;
        transition: all 0.4s ease-in-out 0s;
    	color: #444444;
    	background-color: #F7F7F7;
    }
    
    .not-logged-in-notice {
    padding: 10px;
    background: #F7F7F7;
    }
    
    #bbpress-forums .status-closed, #bbpress-forums .status-closed a {color: #777777;}
    
    #bbpress-forums .status-closed .bbpress-label.resolved + a:before {
    	content: "\E83B";font-family: Fontello;margin-right: 10px;
    }
    
    #bbp-search-form input#bbp_search {
        width: 80%;
    	float:left;
    }
    
    
    .sidebar-right .inner-content {padding-left: 15px;}
    
    .bbp-attachments ol {
    	width:100%;
    }
    .bbp-attachments li {
        width: auto !important;
    }
    
    .bbp-attachments-count { display: none !important; }
    

    And the custom functions added to kleo-child/functions.php are

    COPY CODE
    /** 
     * Modify status display in single topic
     * -------------------------------------------------------------------------------------------*/
    remove_action('bbp_template_before_single_topic', 'bbps_add_support_forum_features');
    add_action('bbp_template_before_single_topic', 'aq_add_support_forum_features');
    
    function aq_add_support_forum_features(){	
    	//only display all this stuff if the support forum option has been selected.
    	if (bbps_is_support_forum(bbp_get_forum_id())){
    		$can_edit = bbps_get_update_capabilities();
    		$topic_id = bbp_get_topic_id();
    		$status = bbps_get_topic_status($topic_id);
    		$forum_id = bbp_get_forum_id();
    		$user_id = get_current_user_id();
    
    		//get out the option to tell us who is allowed to view and update the drop down list.
    		if ( $can_edit == true ) { ?>
    
    		<div id="bbps_support_forum_options">
    			<?php bbps_generate_status_options($topic_id,$status); ?>
    		</div>
    
    		<?php 
    		}
    
    		//has the user enabled the move topic feature?
    		if( (get_option('_bbps_enable_topic_move') == 1) && (current_user_can('administrator') || current_user_can('bbp_moderator')) ) { 
    		?>
    
    		<div id ="bbps_support_forum_move">
    			<form id="bbps-topic-move" name="bbps_support_topic_move" action="" method="post">
    				<label for="bbp_forum_id">Move topic to: </label><?php bbp_dropdown(); ?>
    				<input type="submit" value="Move" name="bbps_topic_move_submit" class="btn btn-default" />
    				<input type="hidden" value="bbps_move_topic" name="bbps_action"/>
    				<input type="hidden" value="<?php echo $topic_id ?>" name="bbps_topic_id" />
    				<input type="hidden" value="<?php echo $forum_id ?>" name="bbp_old_forum_id" />
    			</form>
    		</div>
    
    		<?php
    			
    		}
    	}
    }
    
    /** 
     * Adds Status to topic title
     * -------------------------------------------------------------------------------------------*/
    remove_action('bbp_theme_before_topic_title', 'bbps_modify_title');
    add_action('bbp_theme_before_topic_title', 'aq_modify_before_title', 10, 2);
    function aq_modify_before_title($title, $topic_id = 0) {
    	$topic_id = bbp_get_topic_id( $topic_id );
    
    	$replies = bbp_get_topic_reply_count($topic_id);
    	$statuses = array (1,2,3);
    	$status_id = get_post_meta( $topic_id, '_bbps_topic_status', true );
    
    	// Let's not override default closed/sticky status
    	if(bbp_is_topic_sticky()) {
    		//echo '<span class="topic-sticky"> [Sticky] </span>';
    	} 
    	// Let's not override the default statuses
    	elseif(!in_array($status_id, $statuses)) {
    
    		if($replies >= 1) {
    
    			echo '<span class="bbpress-label in-progress">In Progress</span>';
    
    		} else {
    
    			echo '<span class="bbpress-label not-resolved">Not Resolved</span>';
    
    		}
    	// Default Statuses
    	} else {
    
    		if ($status_id == 1) // Not Resolved
    			echo '<span class="bbpress-label not-resolved">Not Resolved</span>';
    
    		if ($status_id == 2) // Not Resolved
    			echo '<span class="bbpress-label resolved">Resolved</span>';
    
    		if ($status_id == 3) { // Not Support Question (mark as resolved)
    			add_post_meta($topic_id, '_bbps_topic_status', 2);
    			echo '<span class="bbpress-label resolved">Resolved</span>';
    		}
    	}
    		
    }
    
    /** 
     * Display Topic Status
     * -------------------------------------------------------------------------------------------*/
    function aq_display_topic_status($topic_id = 0) {
    
    	$topic_id = $topic_id ? $topic_id : bbp_get_topic_id();
    
    	$statuses = array (1,2,3);
    	$status_id = get_post_meta( $topic_id, '_bbps_topic_status', true );
    
    	echo '<div class="aq-topic-status">';
    
    	if(bbp_is_topic_sticky()) {
    
    		echo '<span class="sticky">Sticky</span>';
    
    	} elseif(in_array($status_id, $statuses)) {
    
    		if ($status_id == 1) {
    			echo '<span class="not-resolved">Not Resolved</span>';
    		}
    			
    		if ($status_id == 2) {
    			echo '<span class="resolved">Resolved</span>';
    		}
    
    		if ($status_id == 3) {
    			echo '<span class="in-progress">In Progress</span>';
    		}
    
    	} elseif(bbp_is_topic_closed()) {
    
    		echo '<span class="sticky">Sticky</span>';
    		
    	} else {
    
    		echo '<span class="in-progress">In Progress</span>';
    		
    	}
    
    	echo '</div>';
    
    }

    Hope this helps.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #17494
     Pedroml
    Participant

    Perfect!
    I favorited this topic for future use.

    Thanks.

    #17496
     guy_fraser
    Participant

    Looks like the plugin by imath only works with the BP bundled forums (which are now deprecated in favour of the separate bbPress forum plugin, although in a recent interview a lead dev of BP mentioned that they might revive the BP forums module *sigh*).

    There will be a new release of the imath plugin soon, 2.0, which is designed purely for the bbPress forum plugin, with improved features: http://imathi.eu/2013/08/19/buddy-bbpress-support-topic-2-0-beta/ (in French but google translate does a good job).

    #19765
     Splendor
    Participant
    COPY CODE
    		<div id ="bbps_support_forum_move">
    			<form id="bbps-topic-move" name="bbps_support_topic_move" action="" method="post">
    				<label for="bbp_forum_id">Move topic to: </label>< ?php bbp_dropdown(); ?>
    				<input type="submit" value="Move" name="bbps_topic_move_submit" class="btn btn-default" />
    				<input type="hidden" value="bbps_move_topic" name="bbps_action"/>
    				<input type="hidden" value="<?php echo $topic_id ?/>" name="bbps_topic_id" />
    				<input type="hidden" value="<?php echo $forum_id ?/>" name="bbp_old_forum_id" />
    			</form>
    		</div>
    
    		< ?php
    			
    		}
    	}
    }
    

    Something is of here??

    #20395
     triffy
    Participant

    Thanks for the code. It seems some update recently broke the code, because I get the same error as @splendor.
    Would be great if you could provide a fix! 🙂
    Many thanks!

    #20397
     triffy
    Participant

    Seems like there is some error in the php:

    instead of

    COPY CODE
    <input type="hidden" value="<?php echo $topic_id ?/>" name="bbps_topic_id" />
                    <input type="hidden" value="<?php echo $forum_id ?/>" name="bbp_old_forum_id" />

    it should say

    COPY CODE
    <input type="hidden" value="<?php echo $topic_id ?>" name="bbps_topic_id" />
                    <input type="hidden" value="<?php echo $forum_id ?>" name="bbp_old_forum_id" />
    
    so the correct code here might be
    

    <div id =”bbps_support_forum_move”>
    <form id=”bbps-topic-move” name=”bbps_support_topic_move” action=”” method=”post”>
    <label for=”bbp_forum_id”>Move topic to: </label>< ?php bbp_dropdown(); ?>
    <input type=”submit” value=”Move” name=”bbps_topic_move_submit” class=”btn btn-default” />
    <input type=”hidden” value=”bbps_move_topic” name=”bbps_action”/>
    <input type=”hidden” value=”<?php echo $topic_id ?>” name=”bbps_topic_id” />
    <input type=”hidden” value=”<?php echo $forum_id ?>” name=”bbp_old_forum_id” />
    </form>
    </div>

    < ?php

    }
    }
    }`

    but then it still drops me an error on line 147. unexpected $end.

    #20560
     triffy
    Participant

    thank you, i found the mistakes myself.

    the error emerge from additional “/” and spaces.
    This version works for me:

    COPY CODE
    
    /** 
     * Modify status display in single topic
     * -------------------------------------------------------------------------------------------*/
    remove_action('bbp_template_before_single_topic', 'bbps_add_support_forum_features');
    add_action('bbp_template_before_single_topic', 'aq_add_support_forum_features');
    
    function aq_add_support_forum_features(){	
    	//only display all this stuff if the support forum option has been selected.
    	if (bbps_is_support_forum(bbp_get_forum_id())){
    		$can_edit = bbps_get_update_capabilities();
    		$topic_id = bbp_get_topic_id();
    		$status = bbps_get_topic_status($topic_id);
    		$forum_id = bbp_get_forum_id();
    		$user_id = get_current_user_id();
    
    		//get out the option to tell us who is allowed to view and update the drop down list.
    		if ( $can_edit == true ) { ?>
    
    		<div id="bbps_support_forum_options">
    			< ?php bbps_generate_status_options($topic_id,$status); ?>
    		</div>
    
    		<?php 
    		}
    
    		//has the user enabled the move topic feature?
    		if( (get_option('_bbps_enable_topic_move') == 1) && (current_user_can('administrator') || current_user_can('bbp_moderator')) ) { 
    		?>
    
    		<div id ="bbps_support_forum_move">
    			<form id="bbps-topic-move" name="bbps_support_topic_move" action="" method="post">
    				<label for="bbp_forum_id">Move topic to: </label>< ?php bbp_dropdown(); ?>
    				<input type="submit" value="Move" name="bbps_topic_move_submit" class="btn btn-default" />
    				<input type="hidden" value="bbps_move_topic" name="bbps_action"/>
    				<input type="hidden" value="<?php echo $topic_id ?>" name="bbps_topic_id" />
    				<input type="hidden" value="<?php echo $forum_id ?>" name="bbp_old_forum_id" />
    			</form>
    		</div>
    
    		<?php
    		}
    	}
    }
    
    /** 
     * Adds Status to topic title
     * -------------------------------------------------------------------------------------------*/
    remove_action('bbp_theme_before_topic_title', 'bbps_modify_title');
    add_action('bbp_theme_before_topic_title', 'aq_modify_before_title', 10, 2);
    function aq_modify_before_title($title, $topic_id = 0) {
    	$topic_id = bbp_get_topic_id( $topic_id );
    
    	$replies = bbp_get_topic_reply_count($topic_id);
    	$statuses = array (1,2,3);
    	$status_id = get_post_meta( $topic_id, '_bbps_topic_status', true );
    
    	// Let's not override default closed/sticky status
    	if(bbp_is_topic_sticky()) {
    		//echo '<span class="topic-sticky"> [Sticky] ';
    	} 
    	// Let's not override the default statuses
    	elseif(!in_array($status_id, $statuses)) {
    
    		if($replies >= 1) {
    
    			echo '<span class="bbpress-label in-progress">In Progress</span>';
    
    		} else {
    
    			echo '<span class="bbpress-label not-resolved">Not Resolved</span>';
    
    		}
    	// Default Statuses
    	} else {
    
    		if ($status_id == 1) // Not Resolved
    			echo '<span class="bbpress-label not-resolved">Not Resolved</span>';
    
    		if ($status_id == 2) // Not Resolved
    			echo '<span class="bbpress-label resolved">Resolved</span>';
    
    		if ($status_id == 3) { // Not Support Question (mark as resolved)
    			add_post_meta($topic_id, '_bbps_topic_status', 2);
    			echo '<span class="bbpress-label resolved">Resolved</span>';
    		}
    	}
    		
    }
    
    /** 
     * Display Topic Status
     * -------------------------------------------------------------------------------------------*/
    function aq_display_topic_status($topic_id = 0) {
    
    	$topic_id = $topic_id ? $topic_id : bbp_get_topic_id();
    
    	$statuses = array (1,2,3);
    	$status_id = get_post_meta( $topic_id, '_bbps_topic_status', true );
    
    	echo '<div class="aq-topic-status">';
    
    	if(bbp_is_topic_sticky()) {
    
    		echo '<span class="sticky">Sticky</span>';
    
    	} elseif(in_array($status_id, $statuses)) {
    
    		if ($status_id == 1) {
    			echo '<span class="not-resolved">Not Resolved</span>';
    		}
    			
    		if ($status_id == 2) {
    			echo '<span class="resolved">Resolved</span>';
    		}
    
    		if ($status_id == 3) {
    			echo '<span class="in-progress">In Progress</span>';
    		}
    
    	} elseif(bbp_is_topic_closed()) {
    
    		echo '<span class="sticky">Sticky</span>';
    		
    	} else {
    
    		echo '<span class="in-progress">In Progress</span>';
    		
    	}
    
    	echo '</div>';
    
    }
    
    #20766
     Splendor
    Participant

    What version of the plugin are you using?

    #22668
     marceldennisxp
    Participant

    Can anyone confirm the function codes works? I’m getting errors when adding to child theme. Thanks

    #22935
     bigrats
    Participant

    i got this error message!

    need help! how to fix the code , i want this kind support label so bad!!

    thanks!

    #22936
     bigrats
    Participant

    sorry the message is :

    COPY CODE
    
    Parse error: syntax error, unexpected '/' in /home/haochimu/public_html/midio.club/wp-content/themes/kleo-child/functions.php on line 47
    
    #22952
     Abe
    Keymaster

    You have copied something wrong. make sure you don’t have errors in you file. Here is the code you should use https://archived.seventhqueen.com/forums/topic/what-plugin-are-you-using-to-show-ticket-status/#post-17492

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #22963
     bigrats
    Participant

    just tried the code you gave me (#post-17492), still with no luck!

    i also use php online debug,error on line 35

    sorry to bother you, but i just spend so much time to do this!

    Attachments:
    You must be logged in to view attached files.
    #22969
     marceldennisxp
    Participant

    I also need this and can confirm that adding the code to function.php gives errors. I get an error on line 59. It may be easier for everyone it Abe can upload the code and add it to the function.php file so it can be replaced. Thanks

    #23096
     Abe
    Keymaster

    The editor messed up some code. See now

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #23104
     marceldennisxp
    Participant

    I just copied the code and added it to the function.php but got an error on line 25. What was changed?

    #23115
     Abe
    Keymaster

    Well I don’t know how you are copying it since I have successfully copied it and had no error. I must remind you that you need basic PHP knowledge to make custom changes and edit php code

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #23132
     marceldennisxp
    Participant

    I just copied and paste the code in the function.php file. Since you checked it and it works for you I will get help on this since I really don’t know PHP. Thanks for your time and confirming it works as I really want to use this great mod 🙂

    #23141
     marceldennisxp
    Participant

    Got it working! Thanks

    #23246
     bigrats
    Participant

    its working now!! thanks so much!

    #25611
     sharmstr
    Moderator

    Thank you for the code. Its working great. One thing I added was a check to see if its actually a support forum before adding the status before the title. My forums are a mix of support and general topics and I needed to remove the status from all the general forums.

    I put this in the “aq_modify_before_title” function

    `//Let’s not override default if its not a support forum
    if (!bbps_is_support_forum(bbp_get_forum_id())){
    //echo ‘<span> its a support fourm </span>’;
    }’

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #25682
     Abe
    Keymaster

    Cool. Thanks for sharing 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #25755
     marceldennisxp
    Participant

    Sorry for hijacking this thread or to anyone else in advance if this offends you. But I been using this amazing theme and was trying to configure the forums for my support for the website I’m creating but realized that I needed 9 plugins altogether to make this thing work with some plugin not being update for sometime by developers. I been searching for a support plugin for 4 months but didn’t find anything that great on codecanyon or wordpress that fitted my needs. I came across a premium wordpress plugin that you have to only pay for once ($27) that is a support ticket & knowledge base system called sonicreply by Andrew Hunter which has the best functionalities I’ve seen for a $27 plugin. I don’t work for this company but I did create an affiliate account for this plugin because I think it’s the best support plugin I’ve used with the best metric breakdown and analytic displays. This is the first product that I’ve been affiliated with which I think can benefit many others as well as myself. There is a 12min video that explains the plugins features. I posted 2 links below:

    This link is the affiliate link if you wish to purchase the plugin after seeing it in action and agreeing with me. This is totally voluntary.

    http://jvz8.com/c/252459/114742

    or you can go to http://www.sonicreply.com

    I installed the support plugin on the Kleo theme and the plugin only needed minor css changes.


    @Abe
    if this thread offends you or anyone else please take it down.
    Thanks Marcel

    #25831
     russellkhan
    Participant

    Hi, I can’t find the getshopped plugin you are reffering to.Could you post the link? Thanks

    #25832
     sharmstr
    Moderator

    http://wordpress.org/plugins/bbpress-vip-support-plugin/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #26048
     Abe
    Keymaster

    thanks for sharing @marceldennisxp

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #48634
     mjy
    Participant

    Hey guys… in the process of implementing this as a support function within the site I’m building.

    Like @sharmstr I’m only looking for certain forums to use this styling and function.
    Btw @sharmstr that mod you’ve provided… is that just placed at the top of the “aq_modify_before_title” function?

    All code and plugin installed but it appears to be failing to initialise correctly.
    The forums settings page is throwing errors in the topic status settings such as Warning: Illegal string offset ‘res’ in /wp-content/plugins/bbpress-vip-support-plugin/includes/bbps-core-options.php on line 54
    type=”checkbox” value=”1″ /> Resolved

    As these settings are not then set the forum pages are also throwing errors.

    Taking a look in the database there are a couple of options that are blank. e.g. _bbps_used_status.
    I’m not strong on the admin coding so it will take me some time to work out… hoping someone has already hit this issue and can fast track me a fix?

    #49694
     RivadeMey
    Participant

    Hi,

    I have one more problem with the plugin. I have implement the code and it is all working fine, but the only problem i have is that i only have 1 forum selected as a support forum, but the labels are showing on all the topics. Even on the topics in other forums (which are not support forums)

    Is there a solution for this?

    I have implemented the code of @sharmstr (thanks!)

    COPY CODE
    //Let’s not override default if its not a support forum
    if (!bbps_is_support_forum(bbp_get_forum_id())){
    //echo ‘<span> its a support fourm </span>';
    }

    but then in the latest topics overview the labels are gone, only visible in the forum itself.

    For the people who are interested, this is the complete code i have used:

    COPY CODE
    
    /** 
     * Modify status display in single topic
     * -------------------------------------------------------------------------------------------*/
    remove_action('bbp_template_before_single_topic', 'bbps_add_support_forum_features');
    add_action('bbp_template_before_single_topic', 'aq_add_support_forum_features');
    
    function aq_add_support_forum_features(){	
    	//only display all this stuff if the support forum option has been selected.
    	if (bbps_is_support_forum(bbp_get_forum_id())){
    		$can_edit = bbps_get_update_capabilities();
    		$topic_id = bbp_get_topic_id();
    		$status = bbps_get_topic_status($topic_id);
    		$forum_id = bbp_get_forum_id();
    		$user_id = get_current_user_id();
    
    		//get out the option to tell us who is allowed to view and update the drop down list.
    		if ( $can_edit == true ) { ?>
    
    		<div id="bbps_support_forum_options">
    			<?php bbps_generate_status_options($topic_id,$status); ?>
    		</div>
    
    		<?php 
    		}
    
    		//has the user enabled the move topic feature?
    		if( (get_option('_bbps_enable_topic_move') == 1) && (current_user_can('administrator') || current_user_can('bbp_moderator')) ) { 
    		?>
    
    		<div id ="bbps_support_forum_move">
    			<form id="bbps-topic-move" name="bbps_support_topic_move" action="" method="post">
    				<label for="bbp_forum_id">Move topic to: </label><?php bbp_dropdown(); ?>
    				<input type="submit" value="Move" name="bbps_topic_move_submit" class="btn btn-default" />
    				<input type="hidden" value="bbps_move_topic" name="bbps_action"/>
    				<input type="hidden" value="<?php echo $topic_id ?>" name="bbps_topic_id" />
    				<input type="hidden" value="<?php echo $forum_id ?>" name="bbp_old_forum_id" />
    			</form>
    		</div>
    
    		<?php
    			
    		}
    	}
    }
    
    /** 
     * Adds Status to topic title
     * -------------------------------------------------------------------------------------------*/
    remove_action('bbp_theme_before_topic_title', 'bbps_modify_title');
    add_action('bbp_theme_before_topic_title', 'aq_modify_before_title', 10, 2);
    function aq_modify_before_title($title, $topic_id = 0) {
    	$topic_id = bbp_get_topic_id( $topic_id );
    
    	$replies = bbp_get_topic_reply_count($topic_id);
    	$statuses = array (1,2,3);
    	$status_id = get_post_meta( $topic_id, '_bbps_topic_status', true );
    
    	// Let's not override default closed/sticky status
    	if(bbp_is_topic_sticky()) {
    		//echo '<span class="topic-sticky"> [Sticky] </span>';
    	} 
    	//Let’s not override default if its not a support forum
    	if (!bbps_is_support_forum(bbp_get_forum_id())){
    		//echo ‘<span> its a support forum </span>';
    	}
    	// Let's not override the default statuses
    	elseif(!in_array($status_id, $statuses)) {
    
    		if($replies >= 1) {
    
    			echo '<span class="bbpress-label in-progress">In Behandeling</span>';
    
    		} else {
    
    			echo '<span class="bbpress-label not-resolved">Nog niet opgelost</span>';
    
    		}
    	// Default Statuses
    	} else {
    
    		if ($status_id == 1) // Not Resolved
    			echo '<span class="bbpress-label not-resolved">Nog niet opgelost</span>';
    
    		if ($status_id == 2) // Not Resolved
    			echo '<span class="bbpress-label resolved">Opgelost</span>';
    
    		if ($status_id == 3) { // Not Support Question (mark as resolved)
    			add_post_meta($topic_id, '_bbps_topic_status', 2);
    			echo '<span class="bbpress-label resolved">Opgelost</span>';
    		}
    	}
    		
    }
    
    /** 
     * Display Topic Status
     * -------------------------------------------------------------------------------------------*/
    function aq_display_topic_status($topic_id = 0) {
    
    	$topic_id = $topic_id ? $topic_id : bbp_get_topic_id();
    
    	$statuses = array (1,2,3);
    	$status_id = get_post_meta( $topic_id, '_bbps_topic_status', true );
    
    	echo '<div class="aq-topic-status">';
    
    	if(bbp_is_topic_sticky()) {
    
    		echo '<span class="sticky">Sticky</span>';
    
    	} elseif(in_array($status_id, $statuses)) {
    
    		if ($status_id == 1) {
    			echo '<span class="not-resolved">Nog niet Opgelost</span>';
    		}
    			
    		if ($status_id == 2) {
    			echo '<span class="resolved">Opgelost</span>';
    		}
    
    		if ($status_id == 3) {
    			echo '<span class="in-progress">In Behandeling</span>';
    		}
    
    	} elseif(bbp_is_topic_closed()) {
    
    		echo '<span class="sticky">Sticky</span>';
    		
    	} else {
    
    		echo '<span class="in-progress">In Behandeling</span>';
    		
    	}
    
    	echo '</div>';
    
    }
    
    #50050
     Abe
    Keymaster

    I don’t know .. that could come from the plugin that adds those labels

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #59175
     valarmurugan
    Participant

    hi

    for me every thing is working fine, but could not see the drop down which helps to move forum status. request to provide your suggestion please find the attachement

    Attachments:
    You must be logged in to view attached files.
Viewing 40 posts - 1 through 40 (of 48 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?