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

Kermit

Mod tested on fresh installation of RC5 and if you don't have this line in your Display.php,then it can be caused by another installed modifications
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

dimiurg

Any chance to get help?

mod shows half of the first post authors as guests - but only on the not 1st pages.

it means that if we are on the first page - all ok, but when we go to 2 page and 1 post displayed ok p but author shows as guest

Example in russian forum - but nevertheless

http://www.belhunter.org/forum/index.php/topic,3771.150.html [nofollow]

hcfwesker

Quote from: dimiurg on April 18, 2011, 11:46:38 AM
Any chance to get help?

mod shows half of the first post authors as guests - but only on the not 1st pages.

it means that if we are on the first page - all ok, but when we go to 2 page and 1 post displayed ok p but author shows as guest

Example in russian forum - but nevertheless

http://www.belhunter.org/forum/index.php/topic,3771.150.html

I've mentioned something like this before, but never got an answer.  Yes, the mod does show the first post on everypage, but the poster is treated like a guest, UNLESS that member has made a post on the page being viewed, other than the first page.

This action also causes an error in the error log; but mod author assured me it wasn't cause by this mod, when everyone else says it is.


Kermit

@ dimiurg

Honestly i didn't see any problem on your link,the first is shown as it should
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

dimiurg

#104
Only on the First page

But if you go to the any different from the 1 page of post - WHERE we need First post to be shown - we have incorrect view.

Additional

Found that 1st and last page are correct - and all internal are incorrect

Kermit

I don't know what could be the problem on your site,but on my local site it works properly on every page
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

dimiurg

AS you see - I am not alone and I understand that don't want to find any bugs/issues that can influence on this.

And I understand your point - you should't do it for free.

Will try do it myself - I am just not good familliar with SMF. If you have any comments where to search  - please let us know.

Will update if find any issues.

Thanks for your patience and answers.

Kermit

Quote from: dimiurg on April 28, 2011, 05:47:53 AM
AS you see - I am not alone and I understand that don't want to find any bugs/issues that can influence on this.

And I understand your point - you should't do it for free.

Will try do it myself - I am just not good familliar with SMF. If you have any comments where to search  - please let us know.

Will update if find any issues.

Thanks for your patience and answers.

I tried to fix,hopefully fix would also work for you

http://custom.simplemachines.org/mods/index.php?action=download;mod=1472;id=174858
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

dimiurg


Neverhurry

Hi, Duncan85. A great mod you made! Very useful! But I encountered one problem, maybe it is my problem, because i use a modified curve theme. The problem is: when I enable this mod and I set every topic to show 25 posts, then when the topic has only 25 posts then it shows correct (the last post is reply #24), but as soon as the topic has more than 25 posts then there will be a page 2, and the reply #25 becomes reply #26. I don't know if this is a bug or if this is from my modified Display.template. Though not many topics have more than 25 posts in my forum but it is still a small problem. Can you have a look at that? Thanks.
I am using SMF 2.0.1, curve themes.

hcfwesker

#110
Quote from: Duncan85 on April 28, 2011, 11:05:08 AM
I tried to fix,hopefully fix would also work for you

http://custom.simplemachines.org/mods/index.php?action=download;mod=1472;id=174858

I'm hoping this works for me, too.  Do i have to unistanll the original fpoep 1.3, before uploading this "fpoep 1.4" you provided?  I'm on smf2 rc4.  Thanx

EDIT :::

Got it working, and now everything seems to be working as I first envisioned this mod.  Poster info sghows on every page, and no more "Load member contxt" errors in the error log each time a page was viewed. 

thanx for the extra effort, Duncan85. :)

Now, all that's missing is an extra option to select Board IDs that only use this feature :)




mikeymx5

Any way we can enable this for a single board and can the first post be a different color... gets confusing to members.


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

sledwreck13

I'm using 2.0 and would love to implement this mod on my board, but I only want the first post to show up in certain topics, not all of them across the board.

Would this be a possible feature enhancement?

Thanks!

(I'm aware of the older "Sticky Fist Post" mod, but it doesn't seem to want to play nicely with 2.0)


WillyP

I installed this on a board (2.0.1) to which I did not have FTP access. Since I needed to limit the boards this is on, I made a mod to mod the mod.

<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<name>First Post on every Page</name>
<id>WillyP:Limit_First_Post_on_every_Page_to_Certian_Boards</id>
<version>1.1</version>

<file name="$sourcedir/Display.php">
<operation>
<search position="replace"><![CDATA[// always get post number 0 for sticky topics
if (($start > 0 || !$ascending) && !empty($modSettings['enableFirstPostOnEveryPage']) && !empty($modSettings['enableFirstPostOnlySticky']) && $context['is_sticky'])
{]]></search>
<add><![CDATA[// always get post number 0 for sticky topics
if (($start > 0 || !$ascending) && !empty($modSettings['enableFirstPostOnEveryPage']) && in_array($context['current_board'],array(53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70)))
{]]></add>
</operation>

<operation>
<search position="replace"><![CDATA[elseif (($start > 0 || !$ascending) && !empty($modSettings['enableFirstPostOnEveryPage']) && empty($modSettings['enableFirstPostOnlySticky']))
{]]></search>
<add><![CDATA[
elseif (($start > 0 || !$ascending) && !empty($modSettings['enableFirstPostOnEveryPage']) && in_array($context['current_board'],array(53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70)))
{]]></add>
</operation>

</file>

</modification>


I couldn't get the syntax quite right with the sticky part. And I could have just made the 'ifelse' part disappear completely, I guess. Since the forum I used this on will never use this for sticky-only anyway.

The boards in question have a special theme which I made with this mod in mind, so I removed the mod for the themes anyway.

It works perfectly, I used fpoep to make a tabbed view where one tab is the first post, and the other tab is all the replies. The boards this is on are not open to the public yet, but here is my demo site: First Wiki Board

Thanks for making and sharing this great mod!

elysianhero


chinaren

Yes, please, this mod is very useful indeed.  Need it for SMF2.0.1!  Ppllleeeeeessee!
The Opus Path - The Next Generation of the Written Word

Kermit

Quote from: chinaren on October 23, 2011, 02:30:48 AM
Yes, please, this mod is very useful indeed.  Need it for SMF2.0.1!  Ppllleeeeeessee!

Last version works already with 2.0.1
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

WillyP

Someone should update the package to reflect that so people don't keep asking.

Advertisement: