News:

SMF 2.0.19 has been released! Please update. 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

AlenNS

But still in error log there is sticky sort undefinied variable.

Kermit

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

Nope there is no such an option yet,maybe in a next version

Quote from: AlenNS on December 10, 2008, 09:58:59 AM
But still in error log there is sticky sort undefinied variable.

Check your codes again through manual instrcutions...
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

AlenNS

I've used the attached Display.php you left.
There is only on last step error when I check Display.php with manual instructions.
Find:
QuoteORDER BY id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),
Replace:
QuoteORDER BY ' .$sticky_sort. ' id_msg' . (empty($options['view_newest_first']) ? '' : ' DESC'),

AlenNS


MissyNL

QuoteNope there is no such an option yet,maybe in a next version

That would be great! If you could set with permission who can make it sticky, so that my mods also have the option to use this.

And that there is an box that you can enable, in the extra options part of the post :D

If this is implemented.. this would be a great feature for me!!

Oh.. btw.. i use 1.1.7 :D
Sorry for my poor English, but i think it's probably better then your Dutch :)

edi67

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

ttuu

i using 1.1.9 and i cannot find this line:
WHERE ID_MSG IN (" . implode(',', $messages) . ")

Kermit

Quote from: ttuu on May 24, 2009, 02:01:18 PM
i using 1.1.9 and i cannot find this line:
WHERE ID_MSG IN (" . implode(',', $messages) . ")


You should look carefully in Sources/Display.php,this is a default line from the 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

Mai Pen Rai

Could this mod be altered to give the users/members the option to choose if the first post is sticky, not only an Admin setting.
Mai Pen Rai - means "No worries" in Thai

Mai Pen Rai.se

Kermit

Quote from: Mai Pen Rai on June 03, 2009, 03:55:17 PM
Could this mod be altered to give the users/members the option to choose if the first post is sticky, not only an Admin setting.

It could be made,if i have time,i'd look into this
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

Chas Large

Hi Duncan,
Installed and works great on my 1.1.9. Many thanks.

Any idea how far off the board by board option would be, that's all I need, the option to enable/disable by board rather then a global switch as now.

Thanks

Chas.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Kermit

Quote from: Chas_Large on June 06, 2009, 10:19:50 AM
Hi Duncan,
Installed and works great on my 1.1.9. Many thanks.

Any idea how far off the board by board option would be, that's all I need, the option to enable/disable by board rather then a global switch as now.

Thanks

Chas.


You can use this trick

in 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'] && in_array($context['current_board'],array(x,y,z))) {


x,y,z should be replaced with the board ids,in that the mod should be active
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

Chas Large

Hi Duncan,

Have added the code as specified, see clip below:

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div class="signature">', $message['member']['signature'], '</div>';

echo '
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
if(!empty($modSettings['enableFirstPostOnEveryPage']) && $message['id']==$context['topic_first_message'] && in_array($context['current_board'],array(1,13,7))) {
echo '<tr><td class="titlebg" style="padding: 3px 0px;">&nbsp;</td></tr>';
}

}
echo '
<tr><td style="padding: 0 0 1px 0;"></td></tr>


Have included a  bit either side for reference.

I then uploaded the template and refreshed the site. All the boards were still showing the first post on all pages so I disabled the option in Admin > Posts and then checked again. No boards then showed the first post, even those I put into the array.

Can you tell me what I'm doing wrong?

Cheers

Chas
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Kermit

Your code seems fine and actually it should work,also after that change the mod should be active just in boards with id 1,13 and 7
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

Chas Large

Thanks for the quick response Duncan. Have re-enabled it and board 6 is showing the first post on page two, so something is not right somehow. Should I use the full decimal value for the board numbers?

Like 1.0, 13.0 and 7.0
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Kermit

Sorry it was my mistake in addition to what i told you above,you should do this

in ./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']) && in_array($context['current_board'],array(1,7,13)))
{


Then it should work
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

Chas Large

Yep, that did it, thanks Duncan. Excellent support, thanks.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

saasira

Quote from: Duncan85 on December 09, 2008, 10:40:49 AM
Finally the mod is SMF 2.0 compatible  :P

Hi Duncan,

    Are there any plans to support SMF 2.0 RC 1.2?
    I like this module very much and would want to use it on my forum.
    Would really appreciate if you can share your plans about supporting SMF RC 1.2!

Thanks and Regards,
Samba

Kermit

Quote from: saasira on August 28, 2009, 04:02:09 PM
Quote from: Duncan85 on December 09, 2008, 10:40:49 AM
Finally the mod is SMF 2.0 compatible  :P

Hi Duncan,

    Are there any plans to support SMF 2.0 RC 1.2?
    I like this module very much and would want to use it on my forum.
    Would really appreciate if you can share your plans about supporting SMF RC 1.2!

Thanks and Regards,
Samba



I would have a look,when i have some free time  ;)
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_

Tried to get it working with smf2 rc1.2 but didn´t succes

When could you have updated this one?
cause I'm waiting just for this mod for having my forum an update and upgrade

Advertisement: