Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

YGEX

Użytkownik
  • Postów

    10
  • Dołączył

  • Ostatnia wizyta

Odpowiedzi opublikowane przez YGEX

  1. 40 minutes ago, DawPi said:

     

    I've made it...but is not working properly, it`s display only in days. I used the "if" and "elseif" to create the code but only the first part works...

     

    <div class="ipsType_center regTime" data-ipstooltip="" _title="Time Since User Registration" style="">
    {{if $date_joined = floor((strtotime("now")-strtotime("{$comment->author()->joined}"))/86400)}}
    	<li class="regTimeformat">{$date_joined} DAYS OF REGISTRATION</li>
    {{elseif $date_joined = floor((strtotime("now")-strtotime("{$comment->author()->joined}"))/2592000)}}
    	<li class="regTimeformat">{$date_joined} MONTHS OF REGISTRATION</li>
    {{elseif $date_joined = floor((strtotime("now")-strtotime("{$comment->author()->joined}"))/31536000)}}
    	<li class="regTimeformat">{$date_joined} YEARS OF REGISTRATION</li>
    {{endif}}
    </div>

     

    EDIT : I see now that i arranged the code in a wrong way, switched days with years and now works properly.

  2. Hello, i want to add this two type of badges into my postContainer. The "staff member" badge i figured out with a method, using the "{{if $comment->author()->modShowBadge()}}" code but for the time since member registred i don`t know what code to use.

    AdORxnL.png

    So far this is what i've made :

    csZfYAC.png

    Also, do you have any recommendation of what to use instead the code i`ve used for the staff one, i wanted to be automatic instead of adding the groups id.

  3. So, for example i have this code to display the stats of our teamspeak 3 server ( i said for example because i don`t have just one code, this one was the quickest got into my mind ) :

    Spoiler
    <?php
    
    <div class="ts3index-viewer" data-serverid="286203" data-style="width=100%25&height=400px&clickable"><a href="https://ts3index.com/?page=server&id=286203">TS3index.com</a></div>
    <script language="javascript">(function() {var c = document.createElement("script"),s = document.getElementsByTagName("script")[0];c.type = "text/javascript"; c.async = true;c.src = "https://ts3index.com/viewer/script.js";s.parentNode.insertBefore(c, s);})();</script>

     

     

    Normally i would add the code via template putting in it inside core-global-sidebar after this line :

     

    <div data-role='sidebarAd'>
    				{advertisement="ad_sidebar"}
    			</div>

     

    After that i`ll be forced to create an empty announce from the ACP to display my code from the template. I'll do the same steps to display our steam groups, other servers or images ( right know i installed an app to display things as widgest extern the template ).

     

    I looked over the IPS tutorial and i saw the template hook method were you add things inside the template via plugins but will be the same as i do without a plugin versions of it. I want to make it as a widget that you can move and drag from widget menu but this is the part where i get confused because i don`t know how to start.

  4. Hello, thanks in advance for everyone who will gonna read my topic and will want to help me. I want to create a few plugins for my community ( basically i want to transform into a plugin what i add now in sidebar via theme template ) but the tutorial that is available on IPS is a bit vague and i don`t really understand it. I don't understand where to add my code into developer mod plugin center so it will be displayed as a sidebar plugin ( hook ). I would be really grateful if you will share a few tips and advices with me. Thanks again for your time.

×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.