vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   search forum required hack? (https://vborg.vbsupport.ru/showthread.php?t=45136)

jmpsmash 10-28-2002 10:19 PM

search forum required hack?
 
i have been to one vB forum in which the users are required to click a box that says they acknowledge that they have searched the forum for the topic before starting a new thread. i wonder where i can find this hack.

i'd like the user to verify that they have 1. searched the forum for what they are trying to ask. and 2. that they are aware that they need to start the thread in the appropriate forum.

cheers...

NTLDR 10-28-2002 10:31 PM

This is a very good idea, something that should be implimented here IMO.

Xenon 10-29-2002 01:33 PM

Well, it's mostly a template modification to newthread template.

then just add a field to thread-table which contains the value..

not that hard, maybe 2 small filechanges.

should they be able to post the thread if they don't have searched?

jmpsmash 10-29-2002 10:31 PM

Hi Xenon,

i am not too familiar with the template system. can you give me some hints?

thanks...

Xenon 10-30-2002 12:35 PM

well in your newthread.template you will find lines like
<input type="checkbox" name="blabla"....>

just copy one of these lines and change the value after name into a hasdonesearch varname.

then in newthread.php you find this:
PHP Code:

      $DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')");
      
$threadid=$DB_site->insert_id(); 

change it to:
PHP Code:

      $DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach,hasdonesearch) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount','$hasdonesearch')");
      
$threadid=$DB_site->insert_id(); 

then add a field to thread table via phpmyadmin called hasdonesearch (short int would be enough) default value 0.

so whenever a user clicks on hasdonesearch this value would be 1 and you can use it for example in showthread now..

Chris M 10-30-2002 02:44 PM

Xenon - Following on from your question above...

Quote:

should they be able to post the thread if they don't have searched?
How would you make it tell if they have searched?

Satan

Xenon 10-30-2002 04:15 PM

that's why the checkbox is there.

if it's not checked, they don't have searched ;)

Chris M 10-30-2002 04:51 PM

What I meant is:

If they tick the checkbox, and they havent actually searched, is there any way of telling?

Satan

Xenon 10-30-2002 04:58 PM

no, it's as it is here:

all users have to click on the accept button when release a hack, but do they really read the rules?

but with such a checkbox, you can warn user: if you check it and it's open to see you haven't searched we'll ban...
something like this, not so drastical as i post ;)

Chris M 10-30-2002 05:33 PM

True...

That accept screen is truly cool:)

I see...So it is purely at their own risk that they check it:D Nice:)

Satan


All times are GMT. The time now is 12:39 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.01048 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_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