vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Confirm Correct Forum Before New Thread (AJAX) (https://vborg.vbsupport.ru/showthread.php?t=112023)

ChurchMedia 04-01-2006 10:00 PM

Confirm Correct Forum Before New Thread (AJAX)
 
There is a better version here:
https://vborg.vbsupport.ru/showthrea...hreadid=114388

NOTE: To use this mod you have to disable the WYSIWYG editor option. Go to vBulletin Options > Message Posting Interface Options and set Full Editor to "Enable Standard Controls".

This product will ask the user if they are sure that they are in the correct forum before posting a new thread. If they click "Yes" then the New Thread box will appear immediately (via AJAX).

If they are not in the correct forum, they will be able to choose a different forum from a drop-down box (similar to forum jump). When they choose a different forum it automatically takes them to a new thread in that forum, where they are asked to confirm again.

This should save a lot of headaches with people posting in the wrong forums. It reduces thread-moves.


1) Install the product

2)Find in newthread:
PHP Code:

$navbar 

BELOW Add:
PHP Code:

<div id='thread_confirm' align="center"><br /> 
<
table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" style="border-width: 1px"
<
tr class="tcat"><td><div align="left">&nbsp<img id="pi_4" title="Exclamation" onclick="rb_iconid_4.click()" alt="Exclamation" src="images/icons/icon4.gif"><b>&nbsp Confirm Forum</b></div></td></tr
<
tr

    <
td class="alt1"
<
div align="center"><br />You are about to post a new thread in the <u><b>$foruminfo[title]</b></u>  
forum.<br /> 
<
i><b>Please make sure this is the correct forum for your topic.</b></i
<
br /><br /> 
<
input type='button' class='button' value='YES, $foruminfo[title] is the correct forum!' onclick='cm_NewThread(this)' /><hr
NoI need to post in a different forum:<br
$forumjump2 
<br /> 
    </
td

    </
tr
</
table
</
div

<
script type='text/javascript'
<!-- 

function 
cm_NewThread(cButton

document.getElementById('new_thread').style.display 'block'
document.getElementById('thread_confirm').style.display 'none' 


--> 
</
script

3) Find (still in newthread):
PHP Code:

<form action="newthread.php" method="post" name="vbform"<if condition="!is_browser('webtv')"onsubmit="return vB_Editor['$editorid'].prepare_submit(this.subject.value, $vboptions[postminchars])"</if>> 

Add ABOVE:
PHP Code:

<div id='new_thread' style='display:none'

4) Find (still in newthread):
PHP Code:

$footer 

Add ABOVE:
PHP Code:

</div


Bellinis 04-02-2006 10:17 PM

Very nice!

Could this be restricted to certain groups or only for people who are about to make their first post? (or first x posts)

KTBleeding 04-02-2006 10:23 PM

Install this HERE at .org!!

ChurchMedia 04-02-2006 10:34 PM

Quote:

Originally Posted by Bellinis
Very nice!

Could this be restricted to certain groups or only for people who are about to make their first post? (or first x posts)

That should be easy with an 'if' statement before the code. Good idea!

hotwheels 04-02-2006 11:19 PM

great job man...........

COBRAws 04-03-2006 03:15 AM

Quote:

Originally Posted by ChurchMedia
That should be easy with an 'if' statement before the code. Good idea!

im happy you took my advice on making it AJAX! =D thank you!!

[high]* COBRAws installs[/high]

ChurchMedia 04-03-2006 04:13 AM

Glad to help! I've been really getting tired of moving threads on my site. :)

I think I've worked out all of the bugs. Let me know if there is something I missed.

Thanks!

thedvs 04-03-2006 11:04 AM

very nice, this might also help stop those lamer spam attack board apps too

OndaReal 04-03-2006 11:51 AM

very nice, installed :)

Barakat 04-03-2006 12:17 PM

installed thanks

mat64 04-03-2006 01:51 PM

Great work :)

treasureman 04-03-2006 02:43 PM

This still does not work in the lastest Mozilla browser 1.7.12. I don't know about Firebox but I think it is supposed to share the workings of Mozilla.

When you click on 'yes' to post to the forum the box for the message is "grayed out" and does not allow you to put your curser in it and post anything.

I just downloaded and installed the latest xml file and made the template changes as per above. Had to uninstall it.

ChurchMedia 04-03-2006 09:06 PM

Quote:

Originally Posted by treasureman
This still does not work in the lastest Mozilla browser 1.7.12. I don't know about Firebox but I think it is supposed to share the workings of Mozilla.

When you click on 'yes' to post to the forum the box for the message is "grayed out" and does not allow you to put your curser in it and post anything.

I just downloaded and installed the latest xml file and made the template changes as per above. Had to uninstall it.

I just downloaded Mozilla and the hack works fine. Double-check all of your code.

treasureman 04-03-2006 09:25 PM

Quote:

Originally Posted by ChurchMedia
I just downloaded Mozilla and the hack works fine. Double-check all of your code.


Okay I will install it for the 3rd time and let you know.

I installed it yesterday, and it didn't work. I noticed later that you stated that it didn't work in Firefox. So I uninstalled.

Today I noticed that you said the Firefox problems had been fixed. So I re-downloaded the XML file and installed the product as well as re-edited the templates. Didn't work, that's when I posted my message.

So I will try it all again and let you know later how it comes out. Perhaps the XML file I downloaded had not been updated?

Freesteyelz 04-03-2006 10:12 PM

The issue regarding Firefox is both valid and invalid. At least for Firefox, if the editor interface is "basic" or "standard" the script will work. However, if the interface is "Enhanced" it won't work. This issue seems to be quite common as I noticed other hacks have had the problem.

I'm looking into the "vbulletin_textedit.js" file for the Frame and ID bits...

Nathan2006 04-03-2006 10:28 PM

Thank you Tim

Install;)

treasureman 04-03-2006 11:09 PM

Quote:

Originally Posted by Freesteyelz
The issue regarding Firefox is both valid and invalid. At least for Firefox, if the editor interface is "basic" or "standard" the script will work. However, if the interface is "Enhanced" it won't work. This issue seems to be quite common as I noticed other hacks have had the problem.

I'm looking into the "vbulletin_textedit.js" file for the Frame and ID bits...

Aha, that explains it. I always use the "advanced" posting window so I will have the advanced editing tools available.

Guess I will wait until this issue gets fixed before I try installing this again.

ChurchMedia 04-04-2006 12:45 AM

Quote:

Originally Posted by Freesteyelz
The issue regarding Firefox is both valid and invalid. At least for Firefox, if the editor interface is "basic" or "standard" the script will work. However, if the interface is "Enhanced" it won't work. This issue seems to be quite common as I noticed other hacks have had the problem.

I'm looking into the "vbulletin_textedit.js" file for the Frame and ID bits...

Arrrr... You're right. The advanced editor doesn't work in Firefox with this hack. It works in IE. I have no idea what the problem is. On my board, I just disabled the WYSIWYG editor -- but that's not the best solution, obviously.


All times are GMT. The time now is 07:35 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.01155 seconds
  • Memory Usage 1,780KB
  • 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
  • (6)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete