Jump to content
  • 0
Sign in to follow this  
sp33ddinamo

Subforumuri colorate + iconuri

Question

Salutare PCT :) As vrea sa adaug diferite tag-uri (sa le spunem asa) serverelor de pe forum.

Momentant am adaugat tag-ul de "official server": untitled.png.fc87175e968dad04cef477c9bad71685.png 

Dar pe langa acesta as vrea sa mai adaug inca un tag "affiliate server" dar nu stiu ce conditie trebuie sa adaug in codul php:

			{{if $forum->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $forum->children() as $subforum}}
                      <!-- Official Servers -->
                          {{if in_array($subforum->_id, array("1867", "897", "1280"))}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}} str-promoted tooltip">
                              <a href="{$subforum->url()}">{$subforum->_title} 
                                <span class="tooltiptext">OFFICIAL SERVER</span>
                                <i class="fa fa-trophy" aria-hidden="true"></i></a>
                          </li>
                          {{else}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}}">
                              <a href="{$subforum->url()}">{$subforum->_title}</a>
                          </li>
                          {{endif}}
                      <!-- Official Servers -->
					{{endforeach}}
				</ul>
			{{endif}}

Ma puteti ajuta cu codul pentru a adauga si tag-ul "affiliate server" pe langa "official server"? 

Mersi pentru ajutor :)

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

@sp33ddinamo 

{if $forum->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $forum->children() as $subforum}}
                      <!-- Official Servers -->
                          {{if in_array($subforum->_id, array("1867", "897", "1280"))}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}} str-promoted tooltip">
                              <a href="{$subforum->url()}">{$subforum->_title} 
                                <span class="tooltiptext">OFFICIAL SERVER</span>
                                <i class="fa fa-trophy" aria-hidden="true"></i></a>
                          </li>
                       <!-- Official Servers -->
                       <!-- Afiiliate Servers -->
                          {{elseif in_array($subforum->_id, array("id", "id", "id"))}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}} str-promoted tooltip">
                              <a href="{$subforum->url()}">{$subforum->_title} 
                                <span class="tooltiptext">AFILLIATE SERVER</span>
                                <i class="fa fa-trophy" aria-hidden="true"></i></a>
                          </li>
                        <!-- Afiiliate Servers -->
                          {{else}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}}">
                              <a href="{$subforum->url()}">{$subforum->_title}</a>
                          </li>
                          {{endif}}
					{{endforeach}}
				</ul>
			{{endif}}

Te joci cu sintagmele de aici pentru a reușii să aplici același cod pentru mai multe tip-uri de servicii : https://invisioncommunity.com/4guides/themes-and-customizations/template-syntax/ifelseifelse-logic-r138/, tot odată trebuie să editezi aspectul în css pentru fiecare realizând un cod separat.

  • Like 1

Share this post


Link to post
Share on other sites

  • 0
On 1/8/2021 at 12:26 AM, sp33ddinamo said:

Salutare PCT :) As vrea sa adaug diferite tag-uri (sa le spunem asa) serverelor de pe forum.

Momentant am adaugat tag-ul de "official server": untitled.png.fc87175e968dad04cef477c9bad71685.png 

Dar pe langa acesta as vrea sa mai adaug inca un tag "affiliate server" dar nu stiu ce conditie trebuie sa adaug in codul php:


			{{if $forum->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $forum->children() as $subforum}}
                      <!-- Official Servers -->
                          {{if in_array($subforum->_id, array("1867", "897", "1280"))}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}} str-promoted tooltip">
                              <a href="{$subforum->url()}">{$subforum->_title} 
                                <span class="tooltiptext">OFFICIAL SERVER</span>
                                <i class="fa fa-trophy" aria-hidden="true"></i></a>
                          </li>
                          {{else}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}}">
                              <a href="{$subforum->url()}">{$subforum->_title}</a>
                          </li>
                          {{endif}}
                      <!-- Official Servers -->
					{{endforeach}}
				</ul>
			{{endif}}

Ma puteti ajuta cu codul pentru a adauga si tag-ul "affiliate server" pe langa "official server"? 

Mersi pentru ajutor :)

link forum in privat

Share this post


Link to post
Share on other sites
  • 0
On 1/9/2021 at 6:24 PM, Sebastian C. said:

@sp33ddinamo 


{if $forum->hasChildren()}}
				<ul class="ipsDataItem_subList ipsList_inline">
					{{foreach $forum->children() as $subforum}}
                      <!-- Official Servers -->
                          {{if in_array($subforum->_id, array("1867", "897", "1280"))}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}} str-promoted tooltip">
                              <a href="{$subforum->url()}">{$subforum->_title} 
                                <span class="tooltiptext">OFFICIAL SERVER</span>
                                <i class="fa fa-trophy" aria-hidden="true"></i></a>
                          </li>
                       <!-- Official Servers -->
                       <!-- Afiiliate Servers -->
                          {{elseif in_array($subforum->_id, array("id", "id", "id"))}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}} str-promoted tooltip">
                              <a href="{$subforum->url()}">{$subforum->_title} 
                                <span class="tooltiptext">AFILLIATE SERVER</span>
                                <i class="fa fa-trophy" aria-hidden="true"></i></a>
                          </li>
                        <!-- Afiiliate Servers -->
                          {{else}}
                          <li class="{{if \IPS\forums\Topic::containerUnread( $subforum )}}ipsDataItem_unread{{endif}}">
                              <a href="{$subforum->url()}">{$subforum->_title}</a>
                          </li>
                          {{endif}}
					{{endforeach}}
				</ul>
			{{endif}}

Te joci cu sintagmele de aici pentru a reușii să aplici același cod pentru mai multe tip-uri de servicii : https://invisioncommunity.com/4guides/themes-and-customizations/template-syntax/ifelseifelse-logic-r138/, tot odată trebuie să editezi aspectul în css pentru fiecare realizând un cod separat.

mersi frumos, ma bucur ca mi-ai trimis si "explicatia" ca sa inteleg ce ai facut acolo :)

ca sa nu mai deschid alt topic poate ma ajuti aici cu inca o problema:

in profilul din posturi (postcontainer) vreau sa adaug vizualizarile pe profil, am incerc eu cateva metode dar nu a mers nici una...

- prima metoda, am folosit: {member="members_profile_views"} problema este ca toti au acelasi numar de vizualizari...

- a 2-a metoda: {lang="profile_views" pluralize="$member->members_profile_views"} aici problema e ca toti au 0 vizualizari...

Ce formula ar trebui sa foosesc ca sa arate vizualizarile reale la fiecare membru in parte?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...