I want my links ordered like a forum so when someone submits a link it goes to the top of the category, but if someone comments on another link, I want that one to go to the top.
How would I order my links so they are like that?
If you can figure it out, you have $20 coming to your paypal account. And please note, I have to do everything inside PHPMYADMIN because my Settings > General doesn't work.
INSERT INTO `wsnlinks_settings` VALUES (92, 'orderlinks2', 'ORDER BY lastcomment DESC'); INSERT INTO `wsnlinks_settings` VALUES (5, 'orderlinks', 'ORDER BY lastcomment DESC');
I'm not sure the integer values (92 & 5) will be the same, these are the field ID in the wsn_settings table, but the orderlinks and orderlinks2 are surly going to be what you'll want to look for.
I reccomend you manually past the "ORDER BY lastcomment DESC" (no quotes) into the content values for name orderlinks and orderlinks2.
EG: open your database that your wsnlinks table is in, select wsn_settings from the list of tables, browse the table and look for the fields with the names orderlinks and orderlinks2 (sort by ID first might help speed up finding these) then use the edit function and change the values as noted above.
When I tried it the comments were bumping the link with the latest comment above (single column link list) the others, with the older links with comments below and those without comments below them.. Like a forum might act.
Granted I didn't try setting this via phpMyAdmin.. I'll try and see if that for whatever reason isn't working the same as the settings menu..
..tried it and it worked for me as described. Oh well. Frankly with the problems you've described previously on the forum you're installation is ate up. Good luck.
lol, I had to reinstall WSNLinks, everything was messed up.
Maybe I didn't make it clear enough what I wanted.
When someone submits a link I want it to be at the very top of the category. But if someone else comments on another link, I want that link to go to the very top of the category. But, if another person submits a new link, it would go straight to the top again.
I will try your method again using the admin panel.
You probably will have to use a combination of settings to get the new links to take priority, if it can be done. Since there are only two sorting levels it might be hard to get the new links into the mix since both (as above) are needed to keep commented & new comments leap-frogging to the top.
There may be another setting that somehow can be used to float new links to the top but it's still going to boil down to two sort levels, which is where the criteria needs to go, might not be do-able without customizing the php.
Realistically you'd save yourself time and by simply using WSN Forum. It's got much of the same features and the additional code to do what you're after without any hassles.
Nope, doesn't work either. I want it so the newest link always is on the very top. But when someone comments on another link, it will be moved to the top.
Comments on Order links like forum
Member
Usergroup: Customer
Joined: Aug 04, 2005
Total Topics: 11
Total Comments: 47
I want my links ordered like a forum so when someone submits a link it goes to the top of the category, but if someone comments on another link, I want that one to go to the top.
How would I order my links so they are like that?
If you can figure it out, you have $20 coming to your paypal account. And please note, I have to do everything inside PHPMYADMIN because my Settings > General doesn't work.
Forum Regular
Usergroup: Customer
Joined: Jan 11, 2006
Total Topics: 48
Total Comments: 166
Snip:
I'm not sure the integer values (92 & 5) will be the same, these are the field ID in the wsn_settings table, but the orderlinks and orderlinks2 are surly going to be what you'll want to look for.
I reccomend you manually past the "ORDER BY lastcomment DESC" (no quotes) into the content values for name orderlinks and orderlinks2.
EG: open your database that your wsnlinks table is in, select wsn_settings from the list of tables, browse the table and look for the fields with the names orderlinks and orderlinks2 (sort by ID first might help speed up finding these) then use the edit function and change the values as noted above.
Member
Usergroup: Customer
Joined: Aug 04, 2005
Total Topics: 11
Total Comments: 47
Nope, doesn't work. Anyone else? You will get $20
Forum Regular
Usergroup: Customer
Joined: Jan 11, 2006
Total Topics: 48
Total Comments: 166
When I tried it the comments were bumping the link with the latest comment above (single column link list) the others, with the older links with comments below and those without comments below them.. Like a forum might act.
Granted I didn't try setting this via phpMyAdmin.. I'll try and see if that for whatever reason isn't working the same as the settings menu..
..tried it and it worked for me as described. Oh well. Frankly with the problems you've described previously on the forum you're installation is ate up. Good luck.
Member
Usergroup: Customer
Joined: Aug 04, 2005
Total Topics: 11
Total Comments: 47
lol, I had to reinstall WSNLinks, everything was messed up.
Maybe I didn't make it clear enough what I wanted.
When someone submits a link I want it to be at the very top of the category. But if someone else comments on another link, I want that link to go to the very top of the category. But, if another person submits a new link, it would go straight to the top again.
I will try your method again using the admin panel.
You're da bomb Zippo
Forum Regular
Usergroup: Customer
Joined: Jan 11, 2006
Total Topics: 48
Total Comments: 166
You probably will have to use a combination of settings to get the new links to take priority, if it can be done. Since there are only two sorting levels it might be hard to get the new links into the mix since both (as above) are needed to keep commented & new comments leap-frogging to the top.
There may be another setting that somehow can be used to float new links to the top but it's still going to boil down to two sort levels, which is where the criteria needs to go, might not be do-able without customizing the php.
Realistically you'd save yourself time and by simply using WSN Forum. It's got much of the same features and the additional code to do what you're after without any hassles.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
Srs, I have just tested in WSN Links 3.3.5 and it's working:
If I understood your inquiry, the following does it:
Admin Panel -> Settings -> General:
Default Ordering:
Links order by: "By lastcomment descending" ,
then secondary order: "By timevalidated descending"
Do not forget to regenerate links after this.
Kind Regards.
Forum Regular
Usergroup: Customer
Joined: Jan 11, 2006
Total Topics: 48
Total Comments: 166
Cool, so that will put a link without comments above links that do have comments?
I figured that the primary would always kick in first and keep commented links above any that had none..
Member
Usergroup: Customer
Joined: Aug 04, 2005
Total Topics: 11
Total Comments: 47
Nope, doesn't work either. I want it so the newest link always is on the very top. But when someone comments on another link, it will be moved to the top.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
You are right, commets have priority.
We need a variable to be stablished as the maximum value from (lastcomment and timevalidated) and select to order by this variable.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You could use the above but force the lastcomment value to start off with the link's submission time, by opening classes/onelink.php and changing
to
as long as you don't mind the lastcomment being factually incorrect by reporting a last comment time when there are no comments.
Member
Usergroup: Customer
Joined: Aug 04, 2005
Total Topics: 11
Total Comments: 47
You're the man Paul, do you have a paypal email so I can leave you a nice tip?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
My paypal is support [at] webmastersite [dot] net.