Board Default Sort

Started by Anguz, October 05, 2004, 09:52:23 PM

Previous topic - Next topic

Anguz

I know I've said this many times already, "I have to update my mods to the latest SMF version" and am sorry to do it again. I have been very busy with life these weeks, I apologize. I expect to post the new files soon. Sorry for the long wait.

BTW, I'm really glad you guys liked this mod! Thanks for letting me know. It's that kind of feedback that makes me want to work on mods and release them.
Cristián Lávaque http://cristianlavaque.com

Armada

Anguz,

The alphabetical listing has been invaluable on some of the boars on our site, it's turned them from "a forum" into an alphabetical listing of resources which people can very easily look through. Keep up the good work. :) :)

Any idea which bits of (presumably) load.php and search.php (if either) to change to get mine working again? I don't want to uninstall the broken mod incase it rips down our forum.

Trystan  :)

--- SMF Rocks even more than YabbSE---

Anguz

Quote from: trystan on January 20, 2005, 05:31:16 AM
Anguz,

The alphabetical listing has been invaluable on some of the boars on our site, it's turned them from "a forum" into an alphabetical listing of resources which people can very easily look through. Keep up the good work. :) :)

That was the reason why I created it. I needed something very similar to what you describe. I'm really glad you like it. :)

Quote
Any idea which bits of (presumably) load.php and search.php (if either) to change to get mine working again? I don't want to uninstall the broken mod incase it rips down our forum.

Trystan :)

Hmm... not off the top of my head. Look inside the mod package for the .mod file and read it, it's not large. You shouldn't have much trouble finding what's missing in your files. I'm guessing probably the db queries are where the problem lies, but it's just that, a guess.
Cristián Lávaque http://cristianlavaque.com

blsilks

Are there any instructions on how to manually install this mod? 

Armada

Anguz,

There is no ".mod" file - but found modification.xml in the zip package for the modification.

The bit that alters the Load.php file is here:

<file name="$sourcedir/Load.php">

<operation>

<search position="before"><![CDATA[b.ID_THEME, b.override_theme, b.use_local_permissions]]></search>



<add><![CDATA[,

b.sort_method, b.sort_direction]]></add>

</operation>



<operation>

<search position="before"><![CDATA[$board_info = array(

]]></search>



<add><![CDATA[ 'sort_method' => $row['sort_method'],

'sort_direction' => $row['sort_direction'],

]]></add>

</operation>

</file>




I'm at a loss to understand how to modify my Load.php by hand with the above - I don't understand the [CDATA[ bit pimarily. Any ideas?
--- SMF Rocks even more than YabbSE---

Anguz

Cristián Lávaque http://cristianlavaque.com

Anguz

Quote from: trystan on January 20, 2005, 05:31:16 AM
Any idea which bits of (presumably) load.php and search.php (if either) to change to get mine working again? I don't want to uninstall the broken mod incase it rips down our forum.

PM me if you need help with that.
Cristián Lávaque http://cristianlavaque.com

vegiemite

Anguz,

This is almost exactly what i am looking for except I need it to sort the individual posts in a message as opposed to the messages in a forum. Is this a simple thing to do? I would like to sort the replies by their title.

To better explain my idea, the replies will postings of times in a 00:00:00:00 format and I want the lowest time to display first when the topic is viewed.

Possible?

Anguz

I don't really know... Everything's possible, but I just never looked into post sorting in a topic by title. Sorry. :-\
Cristián Lávaque http://cristianlavaque.com

Anguz

Cristián Lávaque http://cristianlavaque.com

bmrberlin

I have the german version of SMF 1.0.3 and installed your MOD. But where do I find the switch to change the default sort. I'm not able to locate it.

Thanks in advance
Bernd from Berlin

Anguz

It's in the page where you modify your board settings, like it's name or position, look a bit down that page and you should find it.
Cristián Lávaque http://cristianlavaque.com

nwowatcher

Could someone possibly link me to what this looks like as a working model? Thanx..

bmrberlin

Quote from: Anguz on March 30, 2005, 04:24:10 PM
It's in the page where you modify your board settings, like it's name or position, look a bit down that page and you should find it.

Thank you! The german version has no explaining text to the feature. So you have to guess - but only a little bit.

Bernd

Anguz

Ah, sorry about that. Well, you can fix it copying the language strings the mod adds to the english file, to the german one, be it as-is or translated if you prefer. :)
Cristián Lávaque http://cristianlavaque.com

RicochetPeter

Any chance of getting an updated version that will work with 1.0.3?
Upon installation of v1.23, SMF tells me
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

Anguz

1.24


  • Updated for SMF 1.0.3.
Cristián Lávaque http://cristianlavaque.com

NBK

#37
I tried to install BoardDefaultSort124.mod on SMF 1.0.3. with dutch language pack.
I manually checked all the changes in the mod-file with the files in my board and they match.
I added the same changes to $languagedir/Modifications.dutch.php as were made to $languagedir/Modifications.english.php

I keep finding the following error in my log-file

NBK   Today at 12:05:40 
192.168.1.1     ad69e3bb634a605d14240d46ea1de3fc 
http://wdevries.demon.nl/SMF/index.php?board=18.0 
8: Undefined index: sort
File: f:\http\web\smf\Sources\MessageIndex.php
Line: 89

What corrisponces with this part of the code

86 if ($sort_method == $board_info['sort_method'] && $sort_direction == $board_info['sort_direction'])
87 {
88 $context['sort_default'] = false;
89 unset($_SESSION['sort'][$board]);
90 }
91 else
92 $context['sort_default'] = true;

The log-file entry appears as soon as someone has entered a board. There is no difference between boards that still use the default sorting methode and board that have a sorting methode defined.

Can someone tell me what's wrong?

Anguz

It's my mistake cause it's trying to unset it even when it's not set. I'll fix it today, sorry for the trouble.
Cristián Lávaque http://cristianlavaque.com

Anguz

1.25

  • Fixed an error caused by trying to unset $_SESSION['sort'][$board] when it wasn't even set (MessageIndex.php).
Cristián Lávaque http://cristianlavaque.com

Advertisement: