News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Board Default Sort

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

Previous topic - Next topic

NBK

#40
Thx :)
Works perfect

Interrested in a dutch translation?


<edit file>
$languagedir/Modifications.dutch.php
</edit file>

<search for>
?>
</search for>

<add before>
// Board default sort.
$txt['sort_default'] = 'Standaard';
$txt['first_poster'] = 'Eerste poster';
$txt['first_post'] = 'Eerst bericht';
$txt['last_poster'] = 'Laatste poster';
$txt['sort_asc'] = 'Eerste bovenaan';
$txt['sort_desc'] = 'Eerste onderaan';
$txt['mboards_sort'] = 'Sortering van board';
$txt['mboards_sort_desc'] = 'Hiermee kun je instellen op welke manier het board gesorteerd word.';

</add before>

Anguz

Quote from: NBK on May 13, 2005, 04:56:18 AM
Thx :)
Works perfect

Interrested in a dutch translation?

Glad it's fixed now, thank you for finding that bug! And for the translation! I'll package it for those that want it. :)
Cristián Lávaque http://cristianlavaque.com

SidRoberts

Quote from: NBK on May 12, 2005, 07:06:42 AM
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?

this also happened to me and i cannot use v1.2.5 or v1.2.3 because it won't apply so i had to use 1.2.2. then i worked out the solution:
in the package-info.xml file in the 1.2.5 version just rename the <install for="1.0.3"> to <install for="1.0.4">. hope this helps.

SamoanOnion

sorry for the noob-ness,

but when I goto browse packages, it only give me the options to 'List FIles' or 'Delete' the mod,
how do I go about installing it???

Anguz

It's because I haven't updated it for the last public SMF release yet. I should get around updating all my mods in the next days if all goes well.
Cristián Lávaque http://cristianlavaque.com

Isaac

Quote from: Anguz on June 23, 2005, 06:18:00 AM
It's because I haven't updated it for the last public SMF release yet. I should get around updating all my mods in the next days if all goes well.
Any word on the update?  I sure could use this mod! :)

bmrberlin

Is there a new version of this MOD for SMF 1.0.5? If so, where can I find it?

All the best from Dschermennie
Bernd

Isaac

Still no new version, and I could greatly use it. :(

HEB XI 1

Any chance this might be updated for 1.1 beta 3?

Isaac

I managed to install it myself.

1. Open the .xml file, and change 1.0.3 to 1.0.5
2. Save, upload, run the Package.
3. Modify Load.php and Manageboards.php according to the .mod file, since it doesn't work via Package Manager.

That's it.  It should work. :)

Anguz

Quote from: hebxi1 on July 20, 2005, 04:46:52 PM
Any chance this might be updated for 1.1 beta 3?

Don't think it'll happen, I'll most probably wait until Final before modding 1.1.

Quote from: Isaac on July 27, 2005, 12:26:53 AM
I managed to install it myself.

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

Mucgie

Quote from: Isaac on July 27, 2005, 12:26:53 AM
I managed to install it myself.

1. Open the .xml file, and change 1.0.3 to 1.0.5
2. Save, upload, run the Package.
3. Modify Load.php and Manageboards.php according to the .mod file, since it doesn't work via Package Manager.

That's it.  It should work. :)


wow.  is there any way you could write a quick dummy's-guide for the last step?

Mucgie

Bump!

How do you alter the files yourself? ???

tentronik

Open the .xml file, and see what gets where added or replaced.

Make a backup of every file you edited and test it afterwards.

Chan Kong-sang

#54
Sorry but i don't have time for a process like that. Anguz, i'm replying one month later? :D

*edit*
One month later... something in progress?

ltdeta

using SMF 1.0.5 and Mod version 1.25:

Mod Installation was successfully.

Each time i make a new board this message are in the error-protocol:
(only then i bush the button "New board")

8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 378

8: Undefined index: sort_direction
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 384

Anguz

Are you using a language other than english? If you are, you most probabyl are missing those language strings in your language file.
Cristián Lávaque http://cristianlavaque.com

ltdeta

@Anguz

here are the original language modifications from script:

// Board default sort.
$txt['sort_default'] = 'Default';
$txt['first_poster'] = 'First poster';
$txt['first_post'] = 'First post';
$txt['last_poster'] = 'Last poster';
$txt['sort_asc'] = 'Ascending';
$txt['sort_desc'] = 'Descending';
$txt['mboards_sort'] = 'Board Sort';
$txt['mboards_sort_desc'] = 'This allows you to change the default sorting of topics in this board.';


i have the modifications done for german language:

Modifications.german.php:

// Board default sort.
$txt['sort_default'] = 'Standard';
$txt['first_poster'] = 'erster poster';
$txt['first_post'] = 'erstes posting';
$txt['last_poster'] = 'letzter poster';
$txt['sort_asc'] = 'Aufsteigen';
$txt['sort_desc'] = 'Absteigend';
$txt['mboards_sort'] = 'Board Sort';
$txt['mboards_sort_desc'] = 'This allows you to change the default sorting of topics in this board.';


other files in the language folder are not affected

Anguz

ltdeta, thank you for the translation!

Did that solve your problem?
Cristián Lávaque http://cristianlavaque.com

ltdeta

#59
no the error's are not solved :(

here are all the errors after  push the button create new board

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 374

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 378

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 378

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 378

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 378

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 378

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 378

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_method
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 378

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_direction
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 383

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_direction
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 384

   Dramlinta (S)   Heute um 23:22:58 
195.14.221.219     d36be707eeed61b239ed48902519ff89 
http://www.p3dnow.de/akos/raid/index.php?action=manageboards;sa=newboard;ID_CAT=7 
8: Undefined index: sort_direction
Datei: /is/htdocs/wp1005029_D2DFQN8UC8/p3dnow/akos/raid/Themes/kos/ManageBoards.template.php (eval?)
Zeile: 385


here the code from ManageBoards.template.php begin line 355 end 388:

// Board default sort.
$sort_methods = array(
'subject' => $txt[70],
'starter' => $txt['first_poster'],
'first_post' => $txt['first_post'],
'replies' => $txt[110],
'views' => $txt[301],
'last_poster' => $txt['last_poster'],
'last_post' => $txt[111],
);

echo '
<tr>
<td>
<b>', $txt['mboards_sort'], '</b><br />
', $txt['mboards_sort_desc'], '<br /><br />
</td>
<td valign="top" align="right">
<select name="sort_method">
<option value=""', $context['board']['sort_method'] == '' ? ' selected="selected"' : '', '>', $txt['sort_default'], '</option>';

foreach ($sort_methods as $key => $val)
echo '
<option value="', $key, '"', $context['board']['sort_method'] == $key ? ' selected="selected"' : '', '>', $val, '</option>';

echo '
</select><br />
<select name="sort_direction">
<option value=""', $context['board']['sort_direction'] == '' ? ' selected="selected"' : '', '>', $txt['sort_default'], '</option>
<option value="asc"', $context['board']['sort_direction'] == 'asc' ? ' selected="selected"' : '', '>', $txt['sort_asc'], '</option>
<option value="desc"', $context['board']['sort_direction'] == 'desc' ? ' selected="selected"' : '', '>', $txt['sort_desc'], '</option>
</select>
</td>
</tr>';

Advertisement: