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

Reply
 
Thread Tools
[RC3] Attachments per forum for vB3 Details »»
[RC3] Attachments per forum for vB3
Version: 1.00, by Chris M Chris M is offline
Developer Last Online: Feb 2013 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-09-2004 Last Update: Never Installs: 4
Is in Beta Stage  
No support by the author.

New update - Please test

Please do the following before attempting to install:

1.) Backup your Database & Files before doing anything
2.) Be aware that although I have tested this myself, there may still be problems...If you do not backup your files or database, I cannot condone your install of this hack...

The installation file you should have in the .zip file attached (user can view own ip.zip) is:

install_attachments_per_forum_vB3_3.0_txt.php

Install Info:
Hack Version: 3.0 Beta 2
Files to edit: 5
Templates to add: 0
Templates to edit: 0
Queries to Run: 0
Time to install: Approx 4 Minutes

Credits
Requested by - Nobody
Thanks to - PitchouneN64ngc for helping me with bitfields

Support - I am offering support, but only in THIS THREAD...I unfortunately cannot be here during the coming months (Mon-Fri), so therefore you will have to rely on others for assitance, should it be urgent...If you do require assitance, please - Only reply in this thread

Hack info

What does it do? - This basically will allow you to set Attachments to be allowed or disallowed Per Forum

Live Demo/Screenshots

There are no current screenshots or Live demos - If anyone is willing to supply some, please do

[high]Latest Version[/high]

You can download 3.0 Beta 2 below!

Installed Beta 1? Please read!

If you installed the first version of this vB3 hack, you will need to revert all file changes you made previously, and run this query:

[sql]ALTER TABLE `forum` DROP `allowattachments`[/sql]

Enjoy!

Satan

Show Your Support

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

Comments
  #2  
Old 01-10-2004, 08:32 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you do a text file for this? Auto-installers scare me.
Reply With Quote
  #3  
Old 01-10-2004, 08:39 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not an auto-installer

It's just an install file in a .php extension, so that the contained template code doesn't get parsed by vB - It's an old habit from vB2 hacks

Satan
Reply With Quote
  #4  
Old 01-10-2004, 08:54 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL I forgot about that. Sorry.
Reply With Quote
  #5  
Old 01-10-2004, 09:27 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
LOL I forgot about that. Sorry.
No problems

Satan
Reply With Quote
  #6  
Old 01-10-2004, 10:46 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd recomend the use of bitfields for this option in the next realease instead of the outdated method of adding extra columns like you would have with vB2 hacks
Reply With Quote
  #7  
Old 01-10-2004, 11:38 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NTLDR
I'd recomend the use of bitfields for this option in the next realease instead of the outdated method of adding extra columns like you would have with vB2 hacks
I agree ... permission-based hacks should utilize vb's bitfield values for permissions and options. For example, you can add a new bitfield under $_FORUMOPTIONS. There is no need to modify table in this case.
Reply With Quote
  #8  
Old 01-10-2004, 11:57 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am experimenting with other methods, hence why it is still BETA

Satan
Reply With Quote
  #9  
Old 01-11-2004, 06:00 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by princeton
I agree ... permission-based hacks should utilize vb's bitfield values for permissions and options. For example, you can add a new bitfield under $_FORUMOPTIONS. There is no need to modify table in this case.
How would you do this? I'm curious to learn.
Reply With Quote
  #10  
Old 01-11-2004, 06:28 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In this case, the forum table has an options column which contains a single number which can be used to work out what options are set, like use of smilies, vBcode, HTML etc.

Adding another bitfield to the array in init.php that defines your specific option and editing the code that changes the option in forum.php will allow to to check if the bit for your option is set, for example:

PHP Code:
if ($forum['options'] & CANHAVEATTACHMENTS) {
    
// this forum can have attachments, place code here
} else {
    
// this forum can't have attachments

CANHAVEATTACHMENTS would be defined in the $_FORUMOPTIONS array in init.php and is then defined as a constant later on.

I didn't understand these at all when vB3 first came out but after reading a post on vB.com and sort of seeing how they worked and then getting them working with my vBindex hack. They save alot of time when you understand them
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:29 AM.


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.04601 seconds
  • Memory Usage 2,299KB
  • Queries Executed 23 (?)
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_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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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