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
Link to subscriptions page if user can not post attachments or new post Details »»
Link to subscriptions page if user can not post attachments or new post
Version: 1.00, by GilbertZ GilbertZ is offline
Developer Last Online: Jul 2007 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 11-03-2004 Last Update: Never Installs: 6
 
No support by the author.

Version: 1.0
vBulletin Version: 3.0.3
Developer: GilbertZ
Hack-Language: English
Install-difficulty: Low
File-edits: 2
Template-edits: 1
Is this hack supported: Officially, no. But I will try to keep an eye out and help where I can.

Description of the Hack:
Do you charge a subscription for users to upload files? Instead of just not showing them the attachments options, how about letting them know why they can't post attachments and giving them a link to the subscriptions page? This does that.

Files to edit:
newreply.php
newthread.php

Open newreply.php

Go to line 307 and look for:

PHP Code:
        $attachmentoption ''
replace with

PHP Code:
//HACK BEGINS
//        $attachmentoption = '';
        
eval('$attachmentoption = "' fetch_template('newpost_no_attachment') . '";');
//END HACK 
Open newthread.php

Go to line 259 and look for:

PHP Code:
        $attachmentoption ''
replace with

PHP Code:
//HACK BEGINS
//        $attachmentoption = '';
        
eval('$attachmentoption = "' fetch_template('newpost_no_attachment') . '";');
//END HACK 
Go to your AdminCP and create a new template called:
newpost_no_attachment

and put the following text in it:

HTML Code:
<fieldset class="fieldset">
 <legend>$vbphrase[attach_files]</legend>
 <div style="padding:$stylevar[formspacer]px">
  <div style="margin-bottom:$stylevar[formspacer]px">
   <div>In order to attach files you need to <a href="subscriptions.php" target="_blank">upgrade</a> your membership.</div>
  </div>
 </div>
</fieldset>
This hack is running at http://www.simstalk.com . If you want to check it out, please make sure not to actually post anything as it is a live board.

Show Your Support

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

Comments
  #2  
Old 11-04-2004, 09:41 PM
GilbertZ GilbertZ is offline
 
Join Date: Nov 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another thing I added for when users try to post in forums where posting requires a subscription, is to make the following change in the phrase manager:

Change the text in $vbphrase[nopermission_loggedin]
HTML Code:
<p>
<strong>$bbuserinfo[username]</strong>, you do not have permission to access this page. This could be due to one of several reasons:</p> 
<ol> <li>Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?</li>
<li>You may need to <a href="subscriptions.php">upgrade</a> your account in order to do this.</li>
<li>If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.</li> </ol> 
<div align="$stylevar[right]"> <a href="login.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]">Log Out</a> <a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a> </div>
Reply With Quote
  #3  
Old 11-04-2004, 09:44 PM
manguish manguish is offline
 
Join Date: Apr 2003
Location: UK
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent - works great.

Thanks bud.
Reply With Quote
  #4  
Old 11-04-2004, 10:08 PM
nexialys
Guest
 
Posts: n/a
Default

this is one of the best solution ever for subscriptions.. this will bring more people to subscribe, as they will understand the reason why...
Reply With Quote
  #5  
Old 11-05-2004, 12:15 AM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fantastic!
Reply With Quote
  #6  
Old 11-05-2004, 07:16 PM
Hades-1 Hades-1 is offline
 
Join Date: May 2004
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about over quota?

Lets say they can upload 3 files under normal membership, if a user is at max qutoa will it say "upgrade your membership" ?
Reply With Quote
  #7  
Old 11-05-2004, 07:41 PM
GilbertZ GilbertZ is offline
 
Join Date: Nov 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hades-1
What about over quota?

Lets say they can upload 3 files under normal membership, if a user is at max qutoa will it say "upgrade your membership" ?
I haven't tested that, but basically if it triggers the forumpermissions which states that the user does not have permission to upload an attachment, then it'll pop up that message. Here is the eval statement:

PHP Code:
if ($forumperms CANPOSTATTACHMENT AND $bbuserinfo['userid']) 
If the above fails, then you get the upgrade message.
Reply With Quote
  #8  
Old 11-25-2004, 10:16 PM
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 384
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome hack! thanks

Quote:
What about over quota?
I'm wondering this too, is it working for you?
Reply With Quote
  #9  
Old 06-20-2007, 09:14 AM
BarryoBrien BarryoBrien is offline
 
Join Date: Jan 2007
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will this work with vb 3.6.4?
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 04:50 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.04619 seconds
  • Memory Usage 2,288KB
  • Queries Executed 22 (?)
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
  • (2)bbcode_html
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete