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

5 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
  • 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.

am facut cum este in topic acesta am adaugat cod separat in css  . dar problema este ca cand adaug in forumrow acest cost imi spune asa image.png.448c1766b97e832aece9e4dc47e5eb99.png ce as pute-a face si nu inteleg dc imi da asta cand sau sa salvez in forumrow acest cod dat de tine @Sebastian C.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...