Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2004, 08:34 PM
billstoll billstoll is offline
 
Join Date: Feb 2004
Location: Pittsfield, MA
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default search by specific date

I am preparing to construct a hack for VB3 RC 2. I need a way to search for all posts made on a specific date, excluding posts made by a particular user. I am new to VBulletin and to PHP, but have a strong unix-C programming background.

Before I start, I thought I would outline what I have in mind and 1) make sure it's not already been done, and 2) make sure I am not missing something important. I saw a tutorial here on how to apply hacks, but not a tutorial for folks about to code up their first hack!

My plan is to make changes to the Advanced Search template:
  1. add new checkbox to Search by User Name to invert the meaning - return all posts NOT made by the specified user.
  2. Add three new pulldown menus to Search Options: Month, Day, and Year.
  3. Add third option to second pulldown under Find Posts From. The existing options are "and Newer" and "and Older". I would add "only".

I would change search.php to handle the new checkbox, and to construct the start and end postline for the specified date and query based on that.

I would also have some mysql changes. The "search_forums" template and the phrase table would need some tweaking. I'm thinking of just updating the database and not touching install/vbulletin_language.xml and install/vbulletin_style.xml. Is that a dumb way to do it?

So, not a whole lot of files affected - am I missing something obvious?

Many thanks,
Bill
Reply With Quote
  #2  
Old 02-14-2004, 09:44 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

> but have a strong unix-C programming background.
If you're good in C PHP should be fairly simple, the syntax is very similar.

> I would also have some mysql changes. T
You mean you would ghave to change templates? That's correct.
But the database structure should'n need changes, right?

If you are going to do this it would be nice if you could also make it possible to just search in a specific timeframe, as this is a feature I got on my todo-list and was to lazy to code it yet

> install/vbulletin_language.xml and install/vbulletin_style.xml.
It should be never-ever necessary to touch these files - leave them alone.

If you are going to user HTL it can create custom XML files for templates and phrases automatically. If not you would have to build them manually, or write a text stating create a phrase in grop foo nemand bar with text foobar, mofify template foobar ad ... etc.
Reply With Quote
  #3  
Old 02-15-2004, 12:58 PM
billstoll billstoll is offline
 
Join Date: Feb 2004
Location: Pittsfield, MA
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Kirby - thanks for responding.

>> I would also have some mysql changes. T
> You mean you would ghave to change templates? That's correct.
> But the database structure should'n need changes, right?

Right - one template change, no db structure changes.

> If you are going to do this it would be nice if you could also make it possible to
> just search in a specific timeframe, as this is a feature I got on my todo-list and
> was to lazy to code it yet

That's a good idea. If you already have an idea of how this should appear on the screen that you think is better than pulldown menus listing the months, days and years, let me know. Otherwise, I'll just create six pulldown menus - months, days and years for "earliestdate" and "latestdate".

>> install/vbulletin_language.xml and install/vbulletin_style.xml.
> It should be never-ever necessary to touch these files - leave them alone.
>
> If you are going to user HTL it can create custom XML files for templates and
> phrases automatically. If not you would have to build them manually, or write a
> text stating create a phrase in grop foo nemand bar with text foobar, mofify
> template foobar ad ... etc.

I am not familiar with HTL. Is that a typo? It sounds like you are saying that the XML files are created from some other file(s)/utilities, and I have the choice of

1. using those or
2. changing the xml myself and reloading the database templates and phrases somehow from the xml, or
3. manually updating the template and adding phrases with mysql queries

If (1) is the best option I'd love to get a pointer to the files/tools needed. If (2) is best, I can probably figure out how to do it by studying the installation logic. (3) is easy but of course I have to do it (possibly with different keywords) every time I upgrade VBulletin.

Thanks again,
Bill
Reply With Quote
  #4  
Old 02-15-2004, 07:40 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTL (Hack Tracking Log) is a vB Major Addition created by KuraFire.
HTL can create custom XML files for phrases, templates and settings - those will only contain the new templates, phrases and options for your hack.

If you don't want to use you can either
1) Create thos XMLs manually
OR
2) Don't use XML files at all and just make a text file with instructions like this
Quote:
1) In Phrasegroup Front-End Error Messages create the two phrases
varname=foobar
text=Some foobar text

varname=foobar2
text=another foobar text
2) In Template search FIND
$vbphrase[advanced_search_options]

BELOW that ADD
<div>some foobar text or XHTML</div>
3) In file search.php FIND
if ($_REQUEST['do'] == 'process) {

BELOW that ADD
$foobar = 'My foobar codechange'
As stated above, you should never-ever touch vB's XML files.
Reply With Quote
  #5  
Old 02-15-2004, 08:09 PM
billstoll billstoll is offline
 
Join Date: Feb 2004
Location: Pittsfield, MA
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
HTL (Hack Tracking Log) is a vB Major Addition created by KuraFire.
HTL can create custom XML files for phrases, templates and settings - those will only contain the new templates, phrases and options for your hack.
HTL sounds like the way to go - I will check it out. If I get it done and it looks clean, I will come back here and learn how to submit my hack. Thanks!!

Bill
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 03:40 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.03905 seconds
  • Memory Usage 2,210KB
  • 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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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