Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2002, 10:03 PM
Littlebit's Avatar
Littlebit Littlebit is offline
 
Join Date: Nov 2001
Posts: 313
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default User Option Post Listing Order

I'm searching to see if there is already a hack created that provides the members with being able to choose for themselves in user options which order they prefer the posts to be listed. I prefer latest post first, but a few of my members would like the first post at the beginning. I ran a few searches but maybe I'm not using the right keywords? Or maybe there isn't a hack for this yet? If not would this be relatively easy to implement?
Reply With Quote
  #2  
Old 07-21-2002, 03:58 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i don't know if such a hack exists, but it wouldn't be hard to implement it

you have to add one field to usertable
edit member.php and one user-cp template to allow a user to change the value
and one really small change to showthread.php

lets say you add the field postorder to your usertable, you have to change this in showthread.php:
PHP Code:
// oldest first or newest first
if ($postorder==0) {
  
$postorder="";
} else {
  
$postorder="DESC";

into this:
PHP Code:
// oldest first or newest first
if ($bbuserinfo[postorder]==0) {
  
$postorder="";
} else {
  
$postorder="DESC";

Reply With Quote
  #3  
Old 07-21-2002, 06:51 PM
Littlebit's Avatar
Littlebit Littlebit is offline
 
Join Date: Nov 2001
Posts: 313
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Those file changes are more then some of the hacks here have. You should post your new hack so I can give you credit as one of your users :banana:
(I'm not sure why I just inserted that banana...I just saw it and it made me laugh...)
Anyway, thanks for responding and for the code.
Reply With Quote
  #4  
Old 07-21-2002, 07:21 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

np

hmm, i think you're right, i should post more releases, but most of all i'm too laze to write a good installfile

also testing takes so much time, so i give more hints
Reply With Quote
  #5  
Old 10-30-2002, 06:31 PM
Littlebit's Avatar
Littlebit Littlebit is offline
 
Join Date: Nov 2001
Posts: 313
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon,
did you ever list this as a hack? I've searched, but don't see anything in releases.
Reply With Quote
  #6  
Old 10-31-2002, 10:36 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no i didn't
Reply With Quote
  #7  
Old 10-31-2002, 01:02 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If i get around to it i may release it myself.
Reply With Quote
  #8  
Old 11-05-2002, 03:31 PM
Littlebit's Avatar
Littlebit Littlebit is offline
 
Join Date: Nov 2001
Posts: 313
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would love to make this official and fine tune it with instructions, but I don't have the experience to do it efficiently.
Is anyone willing to make this a hack worthy of being released?
Reply With Quote
  #9  
Old 11-22-2002, 03:03 PM
Littlebit's Avatar
Littlebit Littlebit is offline
 
Join Date: Nov 2001
Posts: 313
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay here is my trial go at it (no laughing )
Quote:
RUN THIS QUERY:

ALTER TABLE user ADD postorder smallint(6) unsigned NOT NULL

OPEN SHOWTHREAD.PHP AND FIND AROUND LINE 111:

// oldest first or newest first
if ($postorder==0) {
$postorder="";
} else {
$postorder="DESC";
}

AND CHANGE TO THIS:

// oldest first or newest first
if ($bbuserinfo[postorder]==0) {
$postorder="";
} else {
$postorder="DESC";
}

OPEN MEMBER.PHP AND FIND AROUND LINE 637:


if ($bbuserinfo[showsignatures]) {
$showsignatureschecked="checked";
$showsignaturesnotchecked="";
} else {
$showsignatureschecked="";
$showsignaturesnotchecked="checked";
}

ADD BEFORE IT:

if ($bbuserinfo[postorder]) {
$postorderchecked="checked";
$postordernotchecked="";
} else {
$postorderchecked="";
$postordernotchecked="checked";
}

FIND AROUND LINE 841:

$options=iif($showsignatures=="yes",1,0);

ADD BEFORE IT:

$options=iif($postorder=="yes",1,0);

UPLOAD SHOWTHREAD.PHP AND MEMBER.PHP

OPEN TEMPLATE MODIFY OPTIONS AND FIND:

<tr>
<td bgcolor="#1C5780"><normalfont><b>Show user's signatures in their posts?</b></normalfont></td>
<td bgcolor="#1C5780"><normalfont>
<input type="radio" name="showsignatures" value="yes" $showsignatureschecked> yes
<input type="radio" name="showsignatures" value="no" $showsignaturesnotchecked> no
</normalfont></td>
</tr>

ADD BEFORE IT:

<tr>
<td bgcolor="#1C5780"><normalfont><b>Show posts in decending order?</b></normalfont></td>
<td bgcolor="#1C5780"><normalfont>
<input type="radio" name="postorder" value="yes" $postorderchecked> yes
<input type="radio" name="postorder" value="no" $postordernotchecked> no
</normalfont></td>
</tr>
What do I need to work on to get it working correctly?
Reply With Quote
  #10  
Old 11-22-2002, 05:46 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Littlebit a suggestion if i may... just use Xenon's edit and then run the query...

PHP Code:
ALTER TABLE user ADD postorder smallint(6unsigned NOT NULL 
and then instead of making the option in the newthread / newreply just make the option in the member.php where the user profile stuff is

but thats just what i would do don't know how Xenon would or anyone else... regards...

g-force2k2
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:28 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04361 seconds
  • Memory Usage 2,256KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete