Customizing SMF > Modifications and Packages

First Post on Every Page [Now SMF 2.0.1 compatible]

<< < (3/44) > >>

AlenNS:
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'),


--- End quote ---

replace with:


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


--- End quote ---

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


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

and I have replaced with this...


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

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

Kermit:

--- Quote from: AlenNS 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'),


--- End quote ---

replace with:


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


--- End quote ---



--- End quote ---

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

AlenNS:
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
--- End quote ---

In that line is this:


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

Kermit:
You've the related line too,also look again carefully

the line nr is 1957 in your Display.php


--- Code: ---ORDER BY m.id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),
--- End code ---

AlenNS:
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version