Skocz do zawartości
Zaloguj się, aby obserwować

[] Starting from Scratch - Member related hooking

Polecane posty

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

2. In the member list, similar information

3. When viewing a profile, again similar information

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

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 Artykuł w pełnej wersji

Udostępnij ten post

Link to postu
Udostępnij na innych stronach

Bądź aktywny! Zaloguj się lub utwórz konto

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

Zaloguj się, aby obserwować  

  • Kto przegląda   0 użytkowników

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


Ważne informacje

Kontynuując przeglądanie strony, wyrażasz zgodę na używanie przez nas plików cookies.