News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

First Post on Every Page [Now SMF 2.0.1 compatible]

Started by live627, October 31, 2008, 10:38:36 AM

Previous topic - Next topic

Karagül


Kermit

My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

wladymeer

It works fine on RC 1.2.

Maybe you should consider changing display.template step 2 to "add after" instead of "replacing" because it reports some unnecessary error on signature line. When I had checked it manually it seemed to me that I should just add these lines instead of replacing whole part (or maybe I'm wrong?):

if(!empty($modSettings['enableFirstPostOnEveryPage']) && $message['id']==$context['topic_first_message']) {
echo '
<h3 class="catbg headerpadding">&nbsp;</h3>';
}


And if I may suggest, instead of empty catbg field maybe you could write down something like (first post on topic - sticky) or something like that.

Also, no need to mention that having option to switch on and off sticky first post for every thread and that I'm really looking forward to it :)

Kermit

Quote from: wladymeer on November 06, 2009, 06:41:03 AM
It works fine on RC 1.2.

Maybe you should consider changing display.template step 2 to "add after" instead of "replacing" because it reports some unnecessary error on signature line. When I had checked it manually it seemed to me that I should just add these lines instead of replacing whole part (or maybe I'm wrong?):

if(!empty($modSettings['enableFirstPostOnEveryPage']) && $message['id']==$context['topic_first_message']) {
echo '
<h3 class="catbg headerpadding">&nbsp;</h3>';
}


And if I may suggest, instead of empty catbg field maybe you could write down something like (first post on topic - sticky) or something like that.

Also, no need to mention that having option to switch on and off sticky first post for every thread and that I'm really looking forward to it :)


I tested on a fresh copy,so if you previously installed another mod,very possible the other mod manipulated the part,which is changed by this mod

About the features you are requesting,i will have a look,when i have time for it  ;)
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Darkness_

Thank you duncan85 I planned the upgrade of my site for today, so it's realy just in time.

dangermouse13

Can this be used for smf2 rc2?

This mod could really be useful for some threads that are pages long.

Alpay

Quote from: dangermouse13 on November 28, 2009, 05:56:46 AM
Can this be used for smf2 rc2?

This mod could really be useful for some threads that are pages long.
Yes :) rc 2 ?

Kermit

My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Stigmartyr

Is this updated to allow targeting just sticky topics for RC2 now?  It would be nice to have an option for Stickies only vs. All Posts.  I'll even settle for manual code edits.  I just want to apply this to my sticky topics :)

Thank you in advance for carrying the torch!

Kermit

Quote from: Stigmartyr on February 04, 2010, 06:51:45 AM
Is this updated to allow targeting just sticky topics for RC2 now?  It would be nice to have an option for Stickies only vs. All Posts.  I'll even settle for manual code edits.  I just want to apply this to my sticky topics :)

Thank you in advance for carrying the torch!

Only for sticky topics,then you can do this

./Sources/Display.php

Code (find) Select

// always get post number 0 for sticky topics
if (($start > 0 || !$ascending) && !empty($modSettings['enableFirstPostOnEveryPage']))


Code (replace with) Select

// always get post number 0 for sticky topics
if (($start > 0 || !$ascending) && !empty($modSettings['enableFirstPostOnEveryPage']) && $context['is_sticky'])



./Themes/default/Display.template.php

Code (find) Select

if(!empty($modSettings['enableFirstPostOnEveryPage']) && $message['id']==$context['topic_first_message']) {


Code (replace with) Select

if(!empty($modSettings['enableFirstPostOnEveryPage']) && $message['id']==$context['topic_first_message'] && $context['is_sticky']) {
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Stigmartyr

Thanks for the update, but I am unable to find the codes you mention for Display.php or Display.template.php (attached).


Kermit

You cannot find,because you didn't install the mod yet,after installing it,you need to make the changes from above
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Stigmartyr

Quote from: Duncan85 on February 10, 2010, 07:40:34 PM
You cannot find,because you didn't install the mod yet,after installing it,you need to make the changes from above

Ah ha...  Makes sense!  I thought that was strictly a manual edit.

Les Paul

I can't do this, I got an error when I try to do this operation:

Find:


</h5> <div class="smalltext">« <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' »</div> <div id="msg_', $message['id'], '_quick_mod"></div> 


Replace:


</h5> <div class="smalltext">« <strong>', !($message['id'] == $context['topic_first_message']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' »</div> <div id="msg_', $message['id'], '_quick_mod"></div> 


Kermit

@Les Paul

Then you need to try to find a similar line in your custom theme  ;)
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Neverhurry

Hi,

Duncan85, this is a great MOD, will the version for rc2.0 support rc3.0 too? Thanks a bunch!
I am using SMF 2.0.1, curve themes.

Kermit

Quote
Changelog:

v1.3 - 10 March 2010

o Added support for SMF 2.0 RC3.
Added an option for enabling only for sticky topics.
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

sbt

Thank You for this wonderful mod.

Question please if something can be added to the display of it?

In the first post on the second or more pages, there is no notice that this is a repeated post from the first page.
Can we add something to it, like in the display file, maybe, something like
First Topic Message Reminder:
In bold, then all members would know it is a repeat post?
Then after that would be the actual repeated post?

Thank You for any replies.

Scratching my Head

Using it on 1.1.11 - Excellent Mod. Thanks so much!

flipzo

I just installed this Mod on 1.1.11, But I can't seem to see any option to activate it under "Admin > Post and topics", is it because of my theme or what? Thanks in advance...

Advertisement: