Skocz do zawartości

[IPS Blog] Starting from Scratch - Member related hooking


Rekomendowane odpowiedzi

Opublikowano

The mod I am rewriting is an upload/download system. In the mod, any board member can upload and/or download.

One of things I wanted to do with was provide as many links as possible to a member's uploads. I noticed that the IPS mods have links in 5 places. There may be more. If there are, let me know. ;)

1. In the top 20 posters you can see links to topics/posts blog and gallery

http://community.invisionpower.com/uploads/1252775777/gallery_3936_1189_4838.png

2. In the member list, similar information

http://community.invisionpower.com/uploads/1252775777/gallery_3936_1189_3482.png

3. When viewing a profile, again similar information

http://community.invisionpower.com/uploads/1252775777/gallery_3936_1189_14833.png

4. & 5. When a member has posted in a topic, and where viewing a member's vCard, just icons no text

http://community.invisionpower.com/uploads/1252775777/gallery_3936_1189_23694.png

I decided that I would try and 'hook' into those places in the skin with template hooks instead of skin edits. I wanted to it this way because:

  • I would need no skin edits and using hooking would mean that the links would appear in every skin on the board. (One of the key benefiits of hooking rather than skinning)
  • Template hooks were all that was needed, and would be trivial.

Unfortunately, neither of the above proved to be true. Because of some of the ways that data is passed into skins, it's not possible to access all the variables a modder needs to access a 'per member' hook for a template. Member lists contain more than one member, so does top 20 posters, topic views. And surprisingly, I couldn't even template hook the vCard. In the end I had to use 3 different methods:

  • Template hooks
  • Skin overloaders
  • Skin edits ;)

This part of my blog is about how I achieved all the above. I'll add more entries about this over the next few days, in the hope that it will help others who are modding.

Zobacz całą wiadomość

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ę.