Skocz do zawartości
Hosting webh.pl - 20%

A few tips about creating a plugin ?

Rekomendowane odpowiedzi

Opublikowano

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.

Rozwiązane przez DawPi

Opublikowano
  • Autor

Hello, yes but not on a perfect level, somewhere around medium level just to keep me `safe` when i wanna do some edits over a script or implement it.

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

intermedia - profesjonalne rozwiązania Invision Power Board, IC5

Opublikowano
  • Autor

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

Opublikowano
  • 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, IC5

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

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Konto

Nawigacja

Szukaj

Szukaj

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.