Advertisement:

Author Topic: Custom Board Sort  (Read 96750 times)

Offline hcfwesker

  • SMF Hero
  • ******
  • Posts: 2,213
  • Gender: Male
  • SMF 2.0.4
Re: Custom Board Sort
« Reply #160 on: November 15, 2012, 09:38:23 PM »
I'm getting everything passed except:

3.   Execute Modification   ./Sources/Subs-Boards.php   Test failed
   1.   Add After   ./Sources/Subs-Boards.php   Test successful
   2.   Replace   ./Sources/Subs-Boards.php   Test failed

Could be something wrong my theme, i'm not exactly sure what this means though.

You prob have a MOD for boards that affects that line.

Find
Code: [Select]
b.board_order, b.count_posts, b.member_groups, b.id_theme, b.override_theme, b.id_profile, b.redirect,
it will prob have some extra after it.  just add this at the end of the line
Code: [Select]
b.sort_order, b.sort_method,
Make the manual changes then install the MOD.

Offline say170

  • Semi-Newbie
  • *
  • Posts: 24
Re: Custom Board Sort
« Reply #161 on: November 06, 2013, 08:50:46 AM »
I've just upgraded to 2.0.6 and now I'm getting:

Field 'sort_order' doesn't have a default value
File: ...\forum\Sources\Subs-Boards.php
Line: 792

I've removed and reinstalled the 1.0.2 mod (in 2.0 emulation mode) and I still get the error (just a different line number with it uninstalled).  Any ideas anyone please.

That section of code has:

Code: [Select]
$smcFunc['db_insert']('',
'{db_prefix}boards',
array(
'id_cat' => 'int', 'name' => 'string-255', 'description' => 'string', 'board_order' => 'int',
'member_groups' => 'string', 'redirect' => 'string',
),
array(
$boardOptions['target_category'], $boardOptions['board_name'] , '', 0,
'-1,0', '',
),
array('id_board')
);


Offline say170

  • Semi-Newbie
  • *
  • Posts: 24
Re: Custom Board Sort
« Reply #162 on: December 11, 2013, 04:50:57 AM »
Can anyone help?

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Custom Board Sort
« Reply #163 on: December 11, 2013, 05:07:20 AM »
Right now, is the MOD uninstalled?

"sort_order" is NOT a column of smf_boards in a default SMF installation. So it has to be a "leftover" from the MOD, if you really uninstalled it.

So, you should *BACKUP*, then head to phpmyadmin -> table "smf_boards" -> tab "Structure" -> mark the column "sort_order" and, at the bottom of the list, With selected: Drop
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline say170

  • Semi-Newbie
  • *
  • Posts: 24
Re: Custom Board Sort
« Reply #164 on: December 11, 2013, 11:56:37 AM »
Great, dropping the column manually fixed the problem.  Yes, it was uninstalled (according to the package manager anyway)

Thanks.

Offline SirAlahn

  • Semi-Newbie
  • *
  • Posts: 24
  • Gender: Male
  • King of Characters
    • Southern Winds Weyr
Re: Custom Board Sort
« Reply #165 on: January 27, 2014, 01:56:40 AM »
When I emulate 2.0, my board tells me that this mod will install without any errors.

However, when I attempt to install I'm given this error.

Code: [Select]
Notice: Undefined index: db_insert in /home/south176/public_html/Sources/Errors.php on line 139

Fatal error: Function name must be a string in /home/south176/public_html/Sources/Errors.php on line 139

I'm... not entirely sure how to proceed from here. To any who may respond with advice, thank you in advance.

Offline 青山 素子

  • Server Team
  • SMF Super Hero
  • *
  • Posts: 17,072
  • 戦場ヶ原、蕩れ!
    • srvrguy on GitHub
    • @motokochan on Twitter
    • Nekomusume Moe
Re: Custom Board Sort
« Reply #166 on: January 27, 2014, 11:47:37 AM »
What version of SMF are you using?
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Offline SirAlahn

  • Semi-Newbie
  • *
  • Posts: 24
  • Gender: Male
  • King of Characters
    • Southern Winds Weyr
Re: Custom Board Sort
« Reply #167 on: January 29, 2014, 12:22:03 AM »
I'm using 2.0.6. Reluctant to update to 2.0.7 since I just got all of my other mods to work.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Custom Board Sort
« Reply #168 on: January 29, 2014, 04:41:23 AM »
You don't *need* to update to 2.0.7 as it isn't a security release, and if you're not running PHP 5.5.

But IF 2.0.8 comes out, then you would need to go through 2.0.7 to reach 2.0.8. Then you will have problems again...
Therefore, I advise you to backup your current forum and try the patch update. If it doesn't fail, all is good. If you get "Test errors", DON'T continue and allow us to help you figure it out.
In another topic, not in this one :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline SirAlahn

  • Semi-Newbie
  • *
  • Posts: 24
  • Gender: Male
  • King of Characters
    • Southern Winds Weyr
Re: Custom Board Sort
« Reply #169 on: January 30, 2014, 12:51:10 AM »
I successfully updated my board to 2.0.7.

However, I'm still receiving the same error when I try to install this mod while emulating 2.0.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Custom Board Sort
« Reply #170 on: January 30, 2014, 07:04:11 AM »
I have no idea what can cause that... I just installed it in my test board without issues...

Line 139 of Errors.php is this:
Code: [Select]
$smcFunc['db_insert']('',
Can you compare to yours?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline SirAlahn

  • Semi-Newbie
  • *
  • Posts: 24
  • Gender: Male
  • King of Characters
    • Southern Winds Weyr
Re: Custom Board Sort
« Reply #171 on: January 31, 2014, 02:13:43 AM »
Well, now I am well and truly baffled. My Errors.php line 139 looks just exactly the same as the one you posted.

I copied that entire chunk of code in case there was something else there that's out of order.

Code: [Select]
// Don't log the same error countless times, as we can get in a cycle of depression...
$error_info = array($user_info['id'], time(), $user_info['ip'], $query_string, $error_message, (string) $sc, $error_type, $file, $line);
if (empty($last_error) || $last_error != $error_info)
{
// Insert the error into the database.
$smcFunc['db_insert']('',
'{db_prefix}log_errors',
array('id_member' => 'int', 'log_time' => 'int', 'ip' => 'string-16', 'url' => 'string-65534', 'message' => 'string-65534', 'session' => 'string', 'error_type' => 'string', 'file' => 'string-255', 'line' => 'int'),
$error_info,
array('id_error')
);
$last_error = $error_info;
}

Offline binaymana

  • Semi-Newbie
  • *
  • Posts: 39
Re: Custom Board Sort
« Reply #172 on: January 21, 2015, 12:10:16 AM »
I need this mod badly but it does not work with my smf version.

Offline Beowulf1976

  • Jr. Member
  • **
  • Posts: 121
  • Gender: Female
  • I'm a noob, and proud.
    • Beowulf1976 on Facebook
    • @Beowulf1976 on Twitter
    • Friends of Inigo
Re: Custom Board Sort
« Reply #173 on: May 23, 2017, 04:47:01 PM »
I am running with 2.0.14 when I try to install it says the package doesn't work with my version, will you ever update to work with 2.0.14 or not?
“Them as can do has to do for them as can't. And someone has to speak up for them as has no voices.”

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Online Manual

Please do not PM me for support.

Offline tanawat

  • Semi-Newbie
  • *
  • Posts: 53
sorts boards by "last edit" ?
« Reply #175 on: August 28, 2017, 04:29:44 AM »
for prevent spam board by reply (for on top)

could you tell me variable of "last edit" ?

if i try modified mod by add "last edit". Will it be possible?

please.

Offline br360

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,398
    • GenXcommunity
Re: Custom Board Sort
« Reply #176 on: August 28, 2017, 12:43:05 PM »
This mod doesn't give you the ability to sort by last edit if that's what you are asking. If you are trying to prevent spammers, take a look at this- https://wiki.simplemachines.org/smf/Spam_-_my_forum_is_flooded_with_spam,_what_can_I_do