Order by (custom parameter) (17)

1 Name: Anonymous : 2012-02-03 10:17 ID:m5prRfp3 [Del]

I've been hacking the Wakaba.pl apart, adding my own things to the structure and I've implemented a voting system. I've gotten the front page to be able to be ordered by the amount of votes up (table structure "votes_up" so the new call is: order by votes_up instead of num) but:

the individual threads do not order by votes_up but instead order by num (default). I've tried every instance of order by num and these don't have any effect on the individual thread views (one instance of num, when changed, actually breaks the individual/front page view).

What am I missing?

2 Name: Anonymous : 2012-02-07 03:31 ID:SwabzjH7 [Del]

lets see the source?

3 Name: Anonymous : 2012-02-08 09:12 ID:m5prRfp3 [Del]

The entirety of the code is not available publicly (although if you're wondering about the rating system, it's just a reconfigured version of a free rating system.)

Maybe when I get the code in a state that is more transferable than it is now, I'll make it available.

However, this doesn't keep you from answering my question (if you have an answer, that is) as none of the core order functionality was actually changed (just what was being ordered).

4 Name: Anonymous : 2012-02-11 12:24 ID:evL/51xu [Del]

Eeew, reddit meets Wakaba?
Wtf man. That's gross.

5 Name: Anonymous : 2012-02-12 01:27 ID:m5prRfp3 [Del]

CSB- unfortunately this thread wasn't entitled "Please tell me your opinion on what I'm doing".

6 Name: Anonymous : 2012-02-12 10:59 ID:Heaven [Del]

>>4
It could be a neat idea. Keep in mind Reddit did not create that system or even popularize it. Plenty of websites have done it quite well, even with the inherent egocentricism it causes. For example Slashdot, before it turned terrible.

7 Name: Anonymous : 2012-02-12 11:20 ID:x8K74DpI [Del]

>>3 that kinda does stop me answering the question, go and read a maths book. -- http://rateitstar.com

8 Name: Anonymous : 2012-02-12 12:27 ID:m5prRfp3 [Del]

>>7
so in other words- you have no idea, and you just want to push your shitty software.

9 Name: Anonymous : 2012-02-12 22:31 ID:m5prRfp3 [Del]

Nevermind, I figured it out.

In config.pl-
use constant ORDER_BY => 'votes_up';

In wakaba.pl-
$sth=$dbh->prepare("SELECT * FROM ".SQL_TABLE." WHERE num=? OR parent=? AND replied='' ORDER BY num ASC;") or make_error(S_SQLFAIL);

became

$sth=$dbh->prepare("SELECT * FROM ".SQL_TABLE." WHERE num=? OR parent=? AND replied='' ORDER BY ".front_page_order." DESC;") or make_error(S_SQLFAIL);

This made the replies in the single thread view order by votes_up instead of the default num (it would error out if I manually put ORDER BY votes_up, but using the config call works.

10 Name: Anonymous : 2012-02-12 22:32 ID:m5prRfp3 [Del]

Oops- meant config.pl:
use constant front_page_order => 'votes_up';

11 Name: Anonymous : 2012-02-17 10:12 ID:OmsE8bxq [Del]

12 Name: Anonymous : 2012-02-24 10:40 ID:3G7rNni1 [Del]

>>8 >>10 you obviously haven't lol

13 Name: Anonymous : 2012-02-25 05:16 ID:m5prRfp3 [Del]

>>12
I obviously have (lol) because it works (lol).

14 Name: Anonymous : 2012-02-29 02:30 ID:Z9bM/o9q [Del]

>>13 go read this:

http://nitpick2011.rateitstar.com/

and tell me what you think post on the board if you wish..

15 Name: Anonymous : 2012-03-01 14:50 ID:Heaven [Del]

>>14

>HACKED BY LEETCHAN.ORG.
>LEET. TACTICAL. GAMING.

Yep, sounds like you're running very good and secure software.

16 Name: Anonymous : 2012-03-02 22:04 ID:m5prRfp3 [Del]

>>14
Nothing there.

>>15
Normally, I'd be rolling my eyes from here to Oblivion because Chan X has hacked Chan Y for some back-asswards retarded reason, but seeing as it was done to rateitstar spammer software, I find myself not really caring.

17 Name: Anonymous : 2012-03-03 03:31 ID:1mmdB6Lu [Del]

>>15

Sounds like it is from what i can see..
>>16
Well roll your eyes from here to Oblivion, haha lol

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: