Announcement

Collapse
No announcement yet.

Call posts by date?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Call posts by date?

    Hi!
    I would like very much to be able to call posts by date (i.e. 10/01/2004) and not by time frame (i.e., last x days/weeks/etc).

    Is there any way of doing this in vB?

    Thanks! =)
    Ricardo

  • #2
    In the search form? You can search by any number of days, but the search form only has some key days listed. You can add more options by editing this template:

    Admin CP -> Styles & Templates -> Style Manager -> -> Search Templates -> search_forums

    Find this code and add more options. For example, add the red code to search for the last 2 days:

    Code:
    					<select name="searchdate" style="width:150px">
    						<option value="0" $searchdateselected[0]>$vbphrase[any_date]</option>
    						<option value="lastvisit" $searchdateselected[lastvisit]>$vbphrase[your_last_visit]</option>
    						<option value="1" $searchdateselected[1]>$vbphrase[yesterday]</option>
    						<option value="2" $searchdateselected[2]>2 Days Ago</option>
    						<option value="7" $searchdateselected[7]>$vbphrase[a_week_ago]</option>
    						<option value="14" $searchdateselected[14]><phrase 1="2">$vbphrase[x_weeks_ago]</phrase></option>
    						<option value="30" $searchdateselected[30]>$vbphrase[a_month_ago]</option>
    						<option value="90" $searchdateselected[90]><phrase 1="3">$vbphrase[x_months_ago]</phrase></option>
    						<option value="180" $searchdateselected[180]><phrase 1="6">$vbphrase[x_months_ago]</phrase></option>
    						<option value="365" $searchdateselected[365]>$vbphrase[a_year_ago]</option>
    					</select>
    That should work.

    Comment


    • #3
      Thanks Jake but that's not what I want to do =)
      Let me try to explain better.

      What vB does, is query the db for posts made within a certain timeframe, going back from now till x days/weeks/months etc ago, like your example.
      What I want to do is query the db for specific dates, like all posts made on May 10th 2003 or all posts made on November 2004.

      Hope is clearer now =)
      Thanks again!

      Ricardo

      Comment


      • #4
        There is no such option. Adding this option would require a bit of hacking. This is something you should post on www.vbulletin.org.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X