Перейти к содержанию

LoveHate

Пользователи
  • Постов

    18
  • Зарегистрирован

  • Посещение

Сообщения, опубликованные LoveHate

  1. hi

    I wanna add a select box setting in my theme so I use below code:

    <?php
    
    return new \IPS\Helpers\Form\Select("core_theme_setting_title_{$row['sc_id']}", $value ? explode(',', $value) : array(), false, array( 'options' => array (
      'activity' => 'Activity', 
      'forumtopic' => 'Forums',  
      'pages' => 'Pages', 
      'downloads' => 'Downloads', 
      'message' => 'message',
      'posts' => 'posts',
      'topics' => 'topics',
      ), 'parse' => 'normal', 'multiple' => true, 'unlimited' => '*', 'unlimitedLang' => 'all_items' ), NULL, NULL, NULL, 'theme_setting_' . $row['sc_key'] );

    and use below codes in theme editor;

    {{if theme.profile_items == 'activity'}} 
    <!--activity-->
    {{endif}} 
    {{if theme.profile_items == 'forumtopic'}} 
    <!--forumtopic-->
    {{endif}} 
    {{if theme.profile_items == 'pages'}} 
    <!--pages-->
    {{endif}} 
    {{if theme.profile_items == 'downloads'}} 
    <!--downloads-->
    {{endif}} 
    {{if theme.profile_items == 'message'}} 
    <!--message-->
    {{endif}} 
    {{if theme.profile_items == 'posts'}} 
    <!--posts-->
    {{endif}} 
    {{if theme.profile_items == 'topics'}}
    <!--topics-->
    {{endif}}

    but when I select one item it's displayed at front but when I select more than one nothing is displayed.

     

    what's the problem?

  2. hi

    I use below code to show user's rank level in postbit and everything good works:

    {{if $comment->author()->canHaveAchievements() and \IPS\core\Achievements\Rank::show() and \IPS\core\Achievements\Rank::getStore() and $rank = $comment->author()->rank()}}
               <div class="postlevel">
                  {{if $nextRank = $comment->author()->nextRank()}}
                  <div class="postlevel_content">
                    <span class="postlevel_levels">{$rank->rankPosition()['pos']} level</span>
                    <span class="postlevel_exp" ><b>{$comment->author()->achievements_points}</b> / {$nextRank->points}</span>
                  </div>
                  <div class="postlevel_progress">
                    <div class="postlevel_progress_bar" style="width: calc({expression='$comment->author()->achievements_points'} / {$nextRank->points} * 100%);"></div>
                  </div>
                  {{endif}}
               </div>
            {{endif}}

    I want to put these codes in a new HTML template file and call them using the following method in postcontainer, but I get an error.

    {template="pos_ranks" app="core" group="xxx" location="front" params=""}

    what do I do?

     

     

    thanks!

  3. hi

    I want to show user's last post date in profile header. so I use blow code but it doesn't work an display the same time for all users

     

    {{if $member->member_id == \IPS\Member::loggedIn()->member_id}}
                {{$userlastpost['lastpost'] == \IPS\Member::loggedIn()->member_last_post;}}
                <li>
                  <h4 class='ipsType_minorHeading'>{lang="activity_member_last_post"}</h4>
                    <span>{datetime="$userlastpost['lastpost']"}</span>
                </li>
    {{endif}}

     

    whats the problem?

  4. I have a payment gateway that unfortunately does not work with php8 or higher. After selecting the payment method, I get a white screen error. To check this problem, I enabled error display and saw the following error:

     Fatal error: Declaration of IPS\nexus\Gateway\_zarinpal::checkValidity(IPS\nexus\Money $amount, ?IPS\GeoLocation $billingAddress = null, ?IPS\nexus\Customer $customer = null) must be compatible with IPS\nexus\_Gateway::checkValidity(IPS\nexus\Money $amount, ?IPS\GeoLocation $billingAddress = null, ?IPS\nexus\Customer $customer = null, $recurrings = []) in /home/smooksh1/test.smook.shop/applications/nexus/sources/Gateway/zarinpal/zarinpal.php on line 26

    zarinpal.php

    how can I fix that? please help me

  5. hi

    I use these codes for make a dark-light mode:

    js:

    
    
    
      
      
            
        
    
     
            
        
           
            
     

    html:

      
    	  

    css:

     
    	 
    	 
    	
    	 
     
    	    
    		
        
        
        
        
     
    	    
    		
        
        
        
        
     
       
     
       
    
    
    	   
    	 
    	    
    	 
    	
    	
    	
    	 
    	 
    	 
    	  
    	
    	
    	
    
     
    	 
    	
    		
    	 
    	 
    
    
    	 
    	 
    	 
    	 
    	 
    	 
    
    
    	               
    	
    	 
    	 
    	 
    	 
    	
    	  
    	 
    	 
    
    
    
          
              
    
    
    	
    	
    
    
    	
    	
    
    
    
    	
    	 
    

    simple:

    
    
    

    when I put HTML code in userbar template and js in before closed body tag everything good works but when I wanna put this html code in mobilenavbar or mobilenavigation it doesn't work and in search console I got below error:

    Uncaught SyntaxError: redeclaration of const toggleSwitch

        <anonymous> http://localhost/dev/:1042
×
×
  • Создать...

Важная информация

Используя наш сайт вы соглашаетесь с нашей Политикой конфиденциальности