• Resolved kingteamdunet

    (@kingteamdunet)


    Hello,

    1. How to integrate a function that displays which is connected at the bottom of the forum?
    Add the function in the function.php file of the child theme?

    2. Or do I have to integrate this code here? What file

    [code]
    my_function() {
    if (admin OR moderator) {
    add_resolved_button();
    }

    if (topic == resolved) {
    echo 'Resolved!';
    }
    }

    resolved_button_handler() {
    save_resolved_flag();
    }
    [/code]

    Thank you

Viewing 8 replies - 16 through 23 (of 23 total)
  • Plugin Author Asgaros

    (@asgaros)

    Hello @kingteamdunet

    I cant give you support for third-party plugins developed by other authors. You should wait for an answer in his forum there first. Give him some days.

    Thread Starter kingteamdunet

    (@kingteamdunet)

    Hi,

    Need help, and like that?
    To see who is online

    add_action('asgarosforum_statistics_custom_element', 'my_function_footer', 10, 1);
    function my_function_footer() {
    	?>
    	<?php if (function_exists('get_most_users_online')): ?>
            <div id="statistics-body">
    		    <div class="statistics-element">
    		        <div class="element-number dashicons-before dashicons-groups">
    				    <?php echo get_most_users_online(); ?>
    				</div>
    				<div class="element-name">
    				Utilisateur en ligne
    				</div>
    			</div>
    		</div>			
        <?php endif;
    }

    Thank you

    Thread Starter kingteamdunet

    (@kingteamdunet)

    Hi,

    I would like to display?
    There are currently 1 user online: 0 Members, 0 Guests and 0 Bots.
    Not found for Guests and Bots
    Need a helping hand I’m not a developer, I’m a beginner I’m learning

    add_action('asgarosforum_statistics_custom_element', 'my_function_footer', 10, 1);
    function my_function_footer() {
    	?>
    	<?php if (function_exists('get_most_users_online')): ?>
    	<div id="statistics">
    	    <div id="statistics-header">
    		    <strong class="dashicons-before dashicons-chart-line">Qui est en ligne</strong>
    		</div>
            <div id="statistics-body">
    		    <div class="statistics-element">
    		        <div class="element-number dashicons-before dashicons-groups">
    				Il y a <?php echo get_users_online_count(); ?>					
    				</div>
    				<div class="element-name">
    				Utilisateur en ligne actuellement
    				</div>
    			</div>		
    		    <div class="statistics-element">
    		        <div class="element-number dashicons-before dashicons-groups">
    				    <?php echo get_users_online_count(); ?>					
    				</div>
    				<div class="element-name">
    				Membres en ligne
    				</div>
    			</div>
    		    <div class="statistics-element">
    		        <div class="element-number dashicons-before dashicons-groups">
    				   	<?php echo get_users_online_count(); ?>				
    				</div>
    				<div class="element-name">
    				Invités en ligne
    				</div>
    			</div>
    		    <div class="statistics-element">
    		        <div class="element-number dashicons-before dashicons-groups">
    				    <?php echo get_users_online_count(); ?>					
    				</div>
    				<div class="element-name">
    				Bots en ligne
    				</div>
    			</div>			
    		</div>
    	</div>	
        <?php endif;
    }
    
    add_action('asgarosforum_after_post_author', 'my_function', 10, 1);

    Thank you

    Plugin Author Asgaros

    (@asgaros)

    Hello @kingteamdunet

    I dont know which functions this plugin provides, if it has functions for this and how you can show those different kind of users. I cant give you support for other plugins. You should contact the developer of that plugin for that kind of information.

    Your code looks fine so far but maybe you can use the following hook instead:
    – asgarosforum_statistics_custom_content_bottom

    Thread Starter kingteamdunet

    (@kingteamdunet)

    Which one

    add_action('asgarosforum_statistics_custom_element', 'my_function_footer', 10, 1);

    or

    add_action('asgarosforum_after_post_author', 'my_function', 10, 1);

    Plugin Author Asgaros

    (@asgaros)

    I think you should replace:
    asgarosforum_statistics_custom_element

    Because on a structural view it would be better to show your kind of information outside of the existing elements – at least when you want to distinct between bots/guests/users.

    Necessary also plugin amr shortcode any widget

    Thread Starter kingteamdunet

    (@kingteamdunet)

    yes

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Function that displays which is connected’ is closed to new replies.