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

A few tips about creating a plugin ?


YGEX
Przejdź do rozwiązania Rozwiązane przez DawPi,

Rekomendowane odpowiedzi

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.

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

That's cool!

20 godzin temu, YGEX napisał(a):

but the tutorial that is available on IPS is a bit vague and i don`t really understand it

Let's begin from this part - show us the code which you've done so far and tell us what you don't understand well. Then we'll be more than happy to try help you.

  • Lubię to 1

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

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.

Edytowane przez YGEX
i tryed to explain as good as i can
Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager
  • Rozwiązanie
52 minuty temu, YGEX napisał(a):

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.

The best way and future proof would be do it as an application. You need to enable developer mode, add your app and use widgets feature.

 

Sorry, there is no step by step instruction - you need to explore and digg code yourself and ask us with any particular problem, not a general "how to create plugin app with widget". It's way too general question.

 

https://invisioncommunity.com/developers/docs/development/applications/creating-a-simple-hello-world-application-r184/

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • 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ę.