Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-12-2009, 02:58 PM
funyoo funyoo is offline
 
Join Date: Feb 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Sort attachements by date and display dates

Hello,

How can we sort the attachements by date instead of default chronological order and how can we display the dates in the attachements pop-up generated when we click on the attachement icons in the threads list pages.

Exactly like on forexfactory.com :


I would be also interested to know how we can add a hide pictures option.
Reply With Quote
  #2  
Old 02-17-2009, 12:09 PM
funyoo funyoo is offline
 
Join Date: Feb 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any help ?
Reply With Quote
  #3  
Old 02-17-2009, 01:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is the pop-up you get when you click on the little paperclip? The date isn't' shown there in default vb, so you modified the code to add it. I suppose you can modify it further by doing an ORDER BY date.
Reply With Quote
  #4  
Old 02-21-2009, 08:07 AM
funyoo funyoo is offline
 
Join Date: Feb 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
That is the pop-up you get when you click on the little paperclip? The date isn't' shown there in default vb, so you modified the code to add it. I suppose you can modify it further by doing an ORDER BY date.
Hi Lynne,

Thanks for your reply,

Yes that's correct. The main question is how to write this order by date feature.
Reply With Quote
  #5  
Old 02-21-2009, 03:32 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, what is the code you added? What is the name of that variable? Did the modification have to use a plugin to grab the date? Probably the same plugin can be used to do an ORDER BY dateline (or whatever the variable is called).
Reply With Quote
  #6  
Old 02-22-2009, 03:01 PM
funyoo funyoo is offline
 
Join Date: Feb 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Well, what is the code you added? What is the name of that variable? Did the modification have to use a plugin to grab the date? Probably the same plugin can be used to do an ORDER BY dateline (or whatever the variable is called).
Hi Lynne,

I have added no code as I have not found any code to do that.

Here is the attachment code that should be modified :
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
	$headinclude
	<title>$vbphrase[attachments] - $vboptions[bbtitle]</title>
</head>
<body onload="self.focus()" style="margin:0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
	<td class="tcat" colspan="3">
		$vbphrase[attachments]
	</td>
</tr>
<tr>
	<td class="thead">$vbphrase[attachment]</td>
	<td class="thead">$vbphrase[size]</td>
	<td class="thead">$vbphrase[views]</td>
</tr>
$attachments
<tr>
	<td class="tfoot" colspan="3" align="center"><div class="smallfont">
		<a href="#" onclick="opener.location=('showthread.php?$session[sessionurl]t=$threadid'); self.close();"><strong>$vbphrase[show_thread_and_close_window]</strong></a>
	</div></td>
</tr>
</table>

</body>
</html>
Reply With Quote
  #7  
Old 02-22-2009, 03:36 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is not the correct template. No where in there does it show the date. If I'm mistaken and that *is* your template, then the date is being added via a plugin.

You need to find the query that grabs all those attachments names/ids/size/etc and add in the ORDER BY statement.

Google "mysql ORDER BY" and you'll get several ORDER BY help pages like this one - http://www.tizag.com/mysqlTutorial/mysqlorderby.php
Reply With Quote
Reply


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 11:02 PM.


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.05596 seconds
  • Memory Usage 2,221KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete