Jump to content

Numbered

Members
  • Posts

    310
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    Numbered got a reaction from media in IPS 4.1 : ADVERTISEMENT inside the first post   
    Yes, you can . Just write your logic in that condition. As example:
    {{if (($comment->position - 1) % 5 === 0)}} // will show on 1, 6, 11, 16... every five post not depend on posts per page {{if (($comment->position) % 2 === 0)}} // will show on every second post: 2, 4, 6, 8, 10... {{if (true)}} // every post :D. perfect for money :) {{if (($comment->position + 1) % \IPS\Settings::i()->forums_posts_per_page === 0)}} // every last post on page (depends on number of posts per page setting) {{if (($comment->position - 1) % (\IPS\Settings::i()->forums_posts_per_page*2) === 0)}} // every fist post but only on 2, 4, 6.. pages write any condition what you want 
    {{if (\IPS\Member::loggedIn()->member_id === 123)}} // show something only for specific toxic member :D <style>body { font-family: 'Comic Sans MS'; color: pink; }</style> {{endif}}  
  2. Like
    Numbered got a reaction from media in IPS 4.1 : ADVERTISEMENT inside the first post   
    I solve some other thing, but it can help you, as i think.
    In forums-front-topics-topic i create new variable inside foreach cycle.
    before {{$postCount++;}}: 
    {{$page = (\IPS\Request::i()->page ? (\IPS\Request::i()->page - 1) * \IPS\Settings::i()->forums_posts_per_page : 0); }}
    {{$comment->position = $page + $postCount;}}
    this will add 'position' value to the comment object. it will move as a param to the forums-front-topics-post template.
    So inside post template you can get $comment->position value with values, contain number of current post from first page (23,24,25,26,27.. any). Your solution will be like {{if (($comment->position - 1) % \IPS\Settings::i()->forums_posts_per_page === 0)}} {$ads} {{endif}}
    Hope it help you 
  3. Like
    Numbered reacted to Joey_M in Leaderboard ideas   
  4. Like
    Numbered reacted to SecondSight in Leaderboard ideas   
    As for me,  I would like to have an option to choose which forums (and thus topics) can be excluded from the Leaderboard.
    In fact I have a few forums where members simply chat about everything (jokes, etc.) and I would like to exclude the topics posted in these forums from the Leadernboard...
×
×
  • Create New...