vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Confirm Correct Forum Before New Thread (https://vborg.vbsupport.ru/showthread.php?t=111942)

ChurchMedia 04-01-2006 10:00 PM

Confirm Correct Forum Before New Thread
 
NOTE: There is an AJAX version with some added features here:
https://vborg.vbsupport.ru/showthrea...hreadid=114388

-------------------------------------------
This is a simple mod that will display a confirmation window, asking the user to confirm that they are posting in the correct forum. It should help prevent people from posting in the wrong forums (and then you have to move them).

If they click "Okay" it goes to the new thread page. If they click "Cancel" it goes back to the forum home page.
-------------------------------------------

In the newthread template find:
PHP Code:

$navbar 

BELOW that add:
PHP Code:

<script type="text/javascript">
<!--
var 
answer confirm ("You are about to post a new thread in the $foruminfo[title] forum. Make sure this the correct forum for your topic.")
if (!
answer)
window.location="index.php"
// -->
</script

Enjoy!

Freesteyelz 04-02-2006 02:30 AM

That's a sweet, helpful code. I've added a forumid conditional to only include specific forums:

Code:

<if condition="in_array($forumid, array(x, y, z))">
<script type="text/javascript">
<!--
var answer = confirm ("You are about to post a new thread in the $foruminfo[title] forum. Make sure it is the correct forum for your topic.")
if (!answer)
window.location="index.php"
// -->
</script>
</if>

Thanks, ChurchMedia. :) *Clicked install*

ChurchMedia 04-02-2006 02:39 AM

Quote:

Originally Posted by Freesteyelz
That's a sweet, helpful code. I've added a forumid conditional to only include specific forums:



Thanks, ChurchMedia. :) *Clicked install*

Very cool idea! Thanks for adding that! :up:

Freesteyelz 04-02-2006 03:04 AM

Np. I hope other people will find it useful as I do. :)

threat 04-02-2006 01:28 PM

thanks this should help with my boards, I really get tired of moving threads

babolo 04-02-2006 02:36 PM

Well I would install it but it'd annoy the crap out of my members thats the only problem

COBRAws 04-02-2006 04:54 PM

Could someone please convert this JS into AJAX? Would be great! Because I hate popups.

ChurchMedia 04-02-2006 07:11 PM

Quote:

Originally Posted by COBRAws
Could someone please convert this JS into AJAX? Would be great! Because I hate popups.

I'm working on it and will release it today. Great suggestion!

ChurchMedia 04-02-2006 09:46 PM

There is an AJAX version with some added features here:

https://vborg.vbsupport.ru/showthread.php?t=112023

Smiry Kin's 04-07-2006 12:51 PM

Works perfect.


All times are GMT. The time now is 07:05 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.01131 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)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