vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Sortable columns for message listing (https://vborg.vbsupport.ru/showthread.php?t=77103)

Mark Wing 02-26-2005 10:00 PM

Sortable columns for message listing
 
Description
This hack changes the PM message listing to work more like most webmail type systems. The date, title and sender are separated into three columns and the current message grouping (ie today, yesterday, last week) is removed. Each of the new columns can be sorted by clicking on the column header. I have long hated the way the old message system works because I have trouble finding all messages from a particular user. By being able to sort by users, this has made things easier.

Details
Files to Modify: 1
Templates to Modify: 4
Difficulty: Easy

Support
I will be checking this thread and answering questions or addressing any problems

Updates
Version 1.01
1) Updated install script. Step 12 listed wrong template
2) Corrected problem with pagination. If you have installed 1.00, just redo step 7.
3) Updated to handle the fact that not everyone uses PM icons. Steps 9 to 12 were updated to reflect this change. This change both turns off the column when not used and properly alternates the column colors. If you have installed this and are using PM Icons, don't worry about it.

bigcurt 02-27-2005 01:06 AM

Nice mod..congrats

[high]* bigcurt doesnt install because I dont use pm ;)
[/high]

FIRST POST!

Freezerator 02-27-2005 09:16 AM

Nice hack!! Installing :)

honestjohn 03-19-2005 03:26 AM

Slight correction to the install file:

Step 12 should read: In pm_messagelist_periodgroup find
(not PM_MESSAGELISTBIT_IGNORE)

And the code to search for in step 12 is:

Code:

        <tr>
                <td class="alt2" colspan="<if condition="$show['pmicons']">3<else />2</if>" style="padding-top:3px; padding-bottom:3px; border-bottom:1px outset; cursor:pointer;" ondblclick="toggle_collapse('pmf$groupid')" width="100%">
                        <div class="smallfont">
                                <span style="float:$stylevar[right]">
                                        <label for="checkall_$groupid">$vbphrase[messages]: <strong>$messagesingroup</strong></label>
                                </span>
                                <a href="#top" onclick="return toggle_collapse('pmf$groupid')"><img class="inlineimg" id="collapseimg_pmf$groupid" src="$stylevar[imgdir_button]/collapse_alt{$collapseimg_groupid}.gif" alt="" border="0" /></a>
                                &nbsp;
                                <strong>$groupname</strong>
                        </div>
                </td>
                <td class="alt2" style="padding:0px; border-bottom:1px outset" align="center"><input type="checkbox" id="checkall_$groupid" title="$vbphrase[select_deselect_all_in_time_period]" onclick="check_all_group(this, '$groupid')" /></td>
        </tr>

(You just forgot to include the <IF> for pmicons, no biggie, but might confuse someone)

I beleive that's all that was missing. Great mod, simple but powerful improvement to the private messages. Thanks Mark.

honestjohn 03-19-2005 05:28 PM

The hack goofs on pagination though, you end with page links that looks like:

"/private.php?folderid=0&pp=50&fromusername=$fromuse rname&sortorder=asc&page=2"
"/private.php?folderid=0&pp=50&=$&sortorder=desc&pag e=2"

I can guess what the problem is, but I'm still working out how this would be fixed... suggestions?

Mark Wing 03-21-2005 04:47 PM

Thanks for the input. I have corrected the problems and loaded up a new installer. Please let me know if you have any more problems.

Mark

honestjohn 03-21-2005 06:16 PM

Thanks, I should have looked there. However you pointed me in the right direction, and I found the bug I was looking for:

The code to replace in step 7 should be (change bolded, color):

Code:

$pagenav = construct_page_nav($totalmessages, "private.php?$session[sessionurl]folderid=$folderid&pp=$perpage&sort=$sortfield&sortorder=$sortorder");

And one simple improvement in step 12 (change bolded, color), allows you to click the sort on any page #, and maintain the page #:

Code:

<tr>
                <td class="thead" nowrap="nowrap"></td>               
                <if condition="$show['pmicons']">
                        <td class="thead" nowrap="nowrap"></td>       
                </if>
                <td class="thead" nowrap="nowrap"><a href="$sorturl&amp;order=DESC&amp;sort=dateline&amp;pp=$perpage&amp;folderid=$folderid&page=$pagenumber">Date</a> $sortarrow[dateline]</td>
                <td class="thead" nowrap="nowrap"><a href="$sorturl&amp;order=ASC&amp;sort=fromusername&amp;pp=$perpage&amp;folderid=$folderid&page=$pagenumber"><if condition="$folderid==-1">To<else />From</if></a> $sortarrow[fromusername]</td>
                <td class="thead" nowrap="nowrap"><a href="$sorturl&amp;order=ASC&amp;sort=title&amp;pp=$perpage&amp;folderid=$folderid&page=$pagenumber">Subject</a> $sortarrow[title]</td>
                <td class="thead" nowrap="nowrap" style="padding:0px; border-bottom:1px outset" align="center"><input type="checkbox" id="checkall_$groupid" title="$vbphrase[select_deselect_all_in_time_period]" onclick="check_all_group(this, '$groupid')" /></td>
        </tr>

After thos fixes, as far as I can tell, the mod is now working perfectly. Thanks for the mod, Mark, it's a huge improvement for alot of my users.

DivisionByZero 08-03-2005 07:17 AM

any status on 3.5.0 for this? this ROCKS on my 3.0.7 board :)

Mark Wing 08-11-2005 01:37 PM

I haven't even looked at 3.5 yet. Now that it is at "Release Candidate" status, I plan to do so soon.

Mark

DivisionByZero 09-17-2005 03:44 AM

yes, please do :)


All times are GMT. The time now is 11:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01216 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete