Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Quick Thread hack (like quick reply, on forumdisplay!) Details »»
Quick Thread hack (like quick reply, on forumdisplay!)
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-12-2004 Last Update: Never Installs: 49
 
No support by the author.

This hack is like the quick reply hack but on forumdisplay, so when viewing a forum, if the user has proper permissions to make a new thread then this quick thread box will show up for them.

Also view the screenshot to see how it looks

Features
  • Shows the user's signature if they have one!
  • subscribes to the thread according to what the user specified in their user options!

AdditionsInstructions

OPEN forumdisplay.php AND FIND
PHP Code:
$phrasegroups = array('forumdisplay'); 
REPLACE WITH
PHP Code:
$phrasegroups = array('forumdisplay','posting'); 
Find
PHP Code:
require_once('./includes/functions_forumdisplay.php'); 
Add below
PHP Code:
require_once('./includes/functions_newpost.php'); 
FIND
PHP Code:
// check if there is a forum password and if so, ensure the user has it set 
ABOVE, ADD
PHP Code:
$foruminfo fetch_foruminfo($forumid);

if (!(
$foruminfo['allowposting']==or !($forumperms CANVIEW) or !($forumperms CANPOSTNEW)))
{
    require_once(
'./includes/functions_editor.php');

    
// get the checked option for auto subscription
    
$emailchecked fetch_emailchecked($threadinfo$bbuserinfo$newpost);

    if (
$emailchecked[9999])
    {
        
$emailupdate '9999';
    }
    if (
$emailchecked[0])
    {
        
$emailupdate '0';
    }
    if (
$emailchecked[1])
    {
        
$emailupdate '1';
    }
    if (
$emailchecked[2])
    {
        
$emailupdate '2';
    }
    if (
$emailchecked[3])
    {
        
$emailupdate '3';
    }

    
$textareacols fetch_textarea_width();
    eval(
"\$quickthread = \"" fetch_template('forumdisplay_quickthread')."\";");

CREATE A NEW TEMPLATE CALLED forumdisplay_quickthread
WITH THE FOLLOWING CONTENT
HTML Code:
<form action="newthread.php" method="post" name="vbform">
<input type="hidden" name="s" value="$session[sessionurl]" />
<input type="hidden" name="forumid" value="$forumid" />
<input type="hidden" name="do" value="postthread" />
<input type="hidden" name="parseurl" value="1" />

<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0"  width="100%">
<tr>
	<td class="thead" colspan="2">$vbphrase[quick_new_thread]</td>
</tr>
<tr>
	<td class="alt1" colspan="2"><span class="smallfont"><phrase 1="$session[sessionurl]" 2="$foruminfo[forumid]">$vbphrase[more_options_newthread]</phrase></span></td>
</tr>
<tr class="alt2">
	<td class="alt2"><b>$vbphrase[subject]:</b></td>
	<td class="alt2"><input type="text" class="bginput" name="subject" value="$subject" size="40" maxlength="85" tabindex="1" /></td>
</tr>
<tr>
	<td class="alt1" valign="top" nowrap="nowrap"><b>$vbphrase[message]:</b></td>
	<td class="alt1">
		<table cellpadding="0" cellspacing="0" border="0">
		<tr valign="top">
			<td><textarea name="message" rows="7" cols="$textareacols" tabindex="2">$message</textarea></td>
		</tr>
		</table>
	</td>
</tr>
</table>
</td></tr></table>

<br />

<table cellpadding="2" cellspacing="0" border="0" width="95%"  align="center">
<tr>
	<td align="center">
	<input type="submit" class="bginput" name="submit" value="$vbphrase[submit_new_thread]" accesskey="s" tabindex="3" />
	<input type="submit" class="bginput" name="preview" value="$vbphrase[preview_post]" accesskey="p" tabindex="4" />
	</td>
</tr>
</table>
<input type="hidden" name="signature" value="1" />
<input type="hidden" name="emailupdate" value="$emailupdate" />
</form>



OPEN forumdisplay TEMPLATE AND FIND
HTML Code:
<!-- / controls below thread list -->
BELOW ADD
HTML Code:
<br />$quickthread
CREATE THE FOLLOWING PHRASES
(They're in the form of 'phrase_name' / 'phrase_content')
(ALL IN 'Forum Display' CATEGORY!):
Code:
quick_new_thread / Quick New Thread
more_options_newthread / <a href="newthread.php?{1}do=newthread&amp;f={2}">Click here</a> for more posting options.
THE HACK IS NOW INSTALLED, ENJOY!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 03-28-2004, 06:14 PM
MGM MGM is offline
 
Join Date: Jan 2003
Location: Michigan
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey Gary, there's a small problem... whenever we use the Quick Thread, it automatically adds that thread to the subscribed threads list for the user who created it..... any way to stop this?

MGM out
Reply With Quote
  #33  
Old 03-28-2004, 08:52 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add this before </form>:
HTML Code:
<input type="hidden" name="emailupdate" value="9999" />
Reply With Quote
  #34  
Old 03-29-2004, 04:48 AM
Chris Blount Chris Blount is offline
 
Join Date: Mar 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice Hack Gary! Installed with no problems. Thanks!

One question. Is there a way to get the signature to work when posting with the quick thread box?
Reply With Quote
  #35  
Old 03-29-2004, 07:03 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chris Blount
Very nice Hack Gary! Installed with no problems. Thanks!

One question. Is there a way to get the signature to work when posting with the quick thread box?
Add this before </form>:
HTML Code:
<input type="hidden" name="signature" value="1" />
Reply With Quote
  #36  
Old 03-29-2004, 08:27 PM
Chris Blount Chris Blount is offline
 
Join Date: Mar 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary W
Add this before </form>:
HTML Code:
<input type="hidden" name="signature" value="1" />
That did the trick! Thanks again!
Reply With Quote
  #37  
Old 04-01-2004, 11:30 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have updated this hack! HUGE changes made, including visual enhancements (text changes, made things look better) and also I added support for signatures and email updates / notifications, depending on what the user's options are in his user cp!
Reply With Quote
  #38  
Old 04-02-2004, 12:28 AM
Steve123 Steve123 is offline
 
Join Date: Sep 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is no update instuctions?

I tried to update and now im getting no output and this in error logs..

[Fri Apr 2 12:21:32 2004] [error] PHP Parse error: parse error in /path/to/forum/forumdisplay.php on line 203
[Fri Apr 2 12:22:59 2004] [error] PHP Fatal error: Call to undefined function: fetch_emailchecked() in /path/to/forum/forumdisplay.php on line 210

Which is

$emailchecked = fetch_emailchecked($threadinfo, $bbuserinfo, $newpost);

Im using vb3..
Reply With Quote
  #39  
Old 04-02-2004, 01:07 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Steve123
There is no update instuctions?

I tried to update and now im getting no output and this in error logs..

[Fri Apr 2 12:21:32 2004] [error] PHP Parse error: parse error in /path/to/forum/forumdisplay.php on line 203
[Fri Apr 2 12:22:59 2004] [error] PHP Fatal error: Call to undefined function: fetch_emailchecked() in /path/to/forum/forumdisplay.php on line 210

Which is

$emailchecked = fetch_emailchecked($threadinfo, $bbuserinfo, $newpost);

Im using vb3..
Add this code in forumdisplay.php:
PHP Code:
require_once('./includes/functions_newpost.php'); 
Reply With Quote
  #40  
Old 04-02-2004, 01:12 AM
Steve123 Steve123 is offline
 
Join Date: Sep 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heh.. i swear i added it... oh well :P works now :P ta
Reply With Quote
  #41  
Old 04-03-2004, 01:03 AM
Slave's Avatar
Slave Slave is offline
 
Join Date: Nov 2001
Posts: 439
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool .. installed ..
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 02:34 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.15886 seconds
  • Memory Usage 2,345KB
  • Queries Executed 25 (?)
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)bbcode_code
  • (6)bbcode_html
  • (7)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete