Advertisement:

Author Topic: First Post on Every Page [Now SMF 2.0.1 compatible]  (Read 40936 times)

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
First Post on Every Page [Now SMF 2.0.1 compatible]
« on: October 31, 2008, 10:38:36 AM »
First Post on Every Page

Version: 1.5  Date 2011-12-09
Compatibility: SMF 1.1.13 & SMF 2.0 RC5

Based on Modification -> http://custom.simplemachines.org/mods/index.php?mod=235




Warning:Before you install this mod,you should uninstall the mode here (http://custom.simplemachines.org/mods/index.php?mod=235
).If you didn't install the other mod before,you can easily install my mod & enjoy it.




This modification gives the Admin the chance ,to show the First Post of every topics on everypage on the related topic



How can you activate it ?

Admin -> Posts and Topics -> Enable the Option to show the first post on every page




Changelog:


v1.5 - 09 December 2011

Added support to set board,in which the mod should be active.

v1.4 - 28 April 2011

o Minor bug fix,for further information see here.


v1.3 - 10 March 2010

o Added support for SMF 2.0 RC3.
Added an option for enabling only for sticky topics.

v1.1 - 9 December 2008

o Added support for SMF 2.0 BETA 4.
(Thx Blue Dream for his asistance,to make the mod compatible for SMF 2.0)

v1.0 - 22 October 2008

o Initial release. (SMF 1.1.6 Compatible)

Greetz
Duncan85
« Last Edit: December 09, 2011, 02:50:53 PM by 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

Offline Darkness_

  • Full Member
  • ***
  • Posts: 405
Re: First Post on Every Page
« Reply #1 on: November 08, 2008, 06:37:36 PM »
An update for smf 2
could that be possible?

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
Re: First Post on Every Page
« Reply #2 on: November 08, 2008, 06:41:16 PM »
An update for smf 2
could that be possible?

Yeah ,will be out shortly  ;)
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

Offline Darkness_

  • Full Member
  • ***
  • Posts: 405
Re: First Post on Every Page
« Reply #3 on: November 08, 2008, 06:44:04 PM »
Ok thanks, I tried to get it coded in Smf 2 but it didn't pack out really good.

Btw is this mod based on the sticky first with some little modification?


Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
Re: First Post on Every Page
« Reply #4 on: November 08, 2008, 06:47:18 PM »
Ok thanks, I tried to get it coded in Smf 2 but it didn't pack out really good.

Btw is this mod based on the sticky first with some little modification?




Link to Mod

First Post on Every Page

Version: 1.0 Date 2008-10-22
Compatibility: SMF 1.1.6

Based on Modification -> http://custom.simplemachines.org/mods/index.php?mod=235

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

Offline Darkness_

  • Full Member
  • ***
  • Posts: 405
Re: First Post on Every Page
« Reply #5 on: November 14, 2008, 04:48:19 PM »
Are you already working on the smf 2.0 beta 4 version of this one?

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
Re: First Post on Every Page
« Reply #6 on: November 14, 2008, 05:03:12 PM »
Are you already working on the smf 2.0 beta 4 version of this one?

Yep,but some problems with the new database functions,i'm working on 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

Offline Darkness_

  • Full Member
  • ***
  • Posts: 405
Re: First Post on Every Page
« Reply #7 on: November 14, 2008, 09:54:18 PM »
Ok, If I can help with something I would like to help.
Good luck

Offline camci70

  • Newbie
  • *
  • Posts: 4
Re: First Post on Every Page
« Reply #8 on: December 02, 2008, 06:05:39 AM »
Are you already working on the smf 2.0 beta 4 version of this one?

Yep,but some problems with the new database functions,i'm working on it...


are those problems solved ? i'm also waiting for it.. O:)

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
Re: First Post on Every Page [Now SMF 2.0 compatible]
« Reply #9 on: December 09, 2008, 10:40:49 AM »
Finally the mod is SMF 2.0 compatible  :P
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

Offline AlenNS

  • Full Member
  • ***
  • Posts: 617
  • Gender: Male
    • Baklja forum - Vaš forum
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #10 on: December 09, 2008, 12:18:01 PM »
I've enable it but first post is stickied only on first page.
Not on others.

I had problem with installation of this mod on source file Display.php on 5th step.

Quote

         ORDER BY id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),


replace with:

Quote

         ORDER BY ' .$sticky_sort. ' id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),


But I don't have that line. I have this.

Quote
ORDER BY id_msg ' . ($ascending ? '' : 'DESC') . ($context['messages_per_page'] == -1 ? '' : '

and I have replaced with this...

Quote
ORDER BY ' .$sticky_sort. ' id_msg ' . ($ascending ? '' : 'DESC') . ($context['messages_per_page'] == -1 ? '' : '

Can you tell me have I done this like it should be?

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #11 on: December 09, 2008, 12:30:30 PM »
I've enable it but first post is stickied only on first page.
Not on others.

I had problem with installation of this mod on source file Display.php on 5th step.

Quote

         ORDER BY id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),


replace with:

Quote

         ORDER BY ' .$sticky_sort. ' id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),




it's default thing by SMF 2.0 ,also i mean that line,also if you don't have this,it's really weird,attach your Display.php
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

Offline AlenNS

  • Full Member
  • ***
  • Posts: 617
  • Gender: Male
    • Baklja forum - Vaš forum
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #12 on: December 09, 2008, 12:34:14 PM »
Here it is...
I'm using default theme, SMF 2.0 Beta 4.

And I'm getting this error in error log.

Quote
http://www.baklja.com/forum/index.php?topic=548.800
8: Undefined variable: sticky_sort
File: /home/baklja/public_html/forum/Sources/Display.php
Line: 904

In that line is this:

Quote
==>904: ORDER BY ' .$sticky_sort. ' id_msg ' . ($ascending ? '' : 'DESC') . ($context['messages_per_page'] == -1 ? '' : '

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #13 on: December 09, 2008, 12:37:49 PM »
You've the related line too,also look again carefully

the line nr is 1957 in your Display.php

Code: [Select]
ORDER BY m.id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),
« Last Edit: December 09, 2008, 12:39:36 PM by Duncan85 »
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

Offline AlenNS

  • Full Member
  • ***
  • Posts: 617
  • Gender: Male
    • Baklja forum - Vaš forum
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #14 on: December 09, 2008, 12:48:11 PM »
I found it, but same error in log, just on different line.

Line 979:  ORDER BY ' .$sticky_sort. ' m.id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),

And still don't know how to sticky first post.
I've enable it in admin panel.

Offline Darkness_

  • Full Member
  • ***
  • Posts: 405
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #15 on: December 09, 2008, 07:49:45 PM »
No errors for me, finally waited so long for it

Offline AlenNS

  • Full Member
  • ***
  • Posts: 617
  • Gender: Male
    • Baklja forum - Vaš forum
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #16 on: December 09, 2008, 08:20:17 PM »
Can you show me how it looks on your forum?
On my forum there is only on first page stickied first post, not on others.

Offline AlenNS

  • Full Member
  • ***
  • Posts: 617
  • Gender: Male
    • Baklja forum - Vaš forum
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #17 on: December 09, 2008, 08:25:37 PM »
And I'm getting sticky_sort error all day. 200 pages of same error.

Offline Kermit

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #18 on: December 10, 2008, 02:19:57 AM »
Can you show me how it looks on your forum?
On my forum there is only on first page stickied first post, not on others.

it looks like so




try attached file,i hope it works without errors
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

Offline AlenNS

  • Full Member
  • ***
  • Posts: 617
  • Gender: Male
    • Baklja forum - Vaš forum
Re: First Post on Every Page [Now SMF 2.0 Beta 4 compatible]
« Reply #19 on: December 10, 2008, 09:55:48 AM »
It works. Thanks for your effort.
Just one more question.
Is there an option to choose wich topics you don't want to have first topic stickied.