Skip to main content
Topic: First topic on top in every page addon? (Read 3513 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

First topic on top in every page addon?

I love this mod back in SMF. Is there a chance this is made available by default (I don't think so) or any taker for this as an addon?

Re: First topic on top in every page addon?

Reply #1

That's just a kind of proof of concept.

It requires 2 hooks:
Code: [Select]
	$hooks = array(
array(
'integrate_display_topic',
'Pin_First_Message_Integrate::display_topic',
'SOURCEDIR/PinFirstMessage.integrate.php',
),
array(
'integrate_action_display_after',
'Pin_First_Message_Integrate::action_display_after',
'SOURCEDIR/PinFirstMessage.integrate.php',
),
);
foreach ($hooks as $hook)
add_integration_function($hook[0], $hook[1], $hook[2]);

Re: First topic on top in every page addon?

Reply #2

A few noob questions: Would this work with the current version? Where would I place the hooks?

Re: First topic on top in every page addon?

Reply #3

O_O
Did I wrote that?
I completely forgot.

Well, still a proof of concept, but now it works a bit better (it doesn't replicate the first message in the first page and it doesn't generate errors here and there).

I don't guarantee it works, but you can try the attached package.
It doesn't follow Good Coding Practice, and it may have bugs.

Re: First topic on top in every page addon?

Reply #4

I will note to look into this one too.

Re: First topic on top in every page addon?

Reply #5

I was wondering about this addon because last time and even current test, I didn't get it working. Anybody got it working as it is or by making further modifications to it?

Re: First topic on top in every page addon?

Reply #6

Not having tested it, it's very likely it doesn't work.
Maybe I mistyped something or some hook are not fired when I hope they would.
Bugs creator.
Features destroyer.
Template killer.