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

Reply
 
Thread Tools
Custom errors for users that cannot post! Details »»
Custom errors for users that cannot post!
Version: 1.00, by Jeepha Jeepha is offline
Developer Last Online: Apr 2003 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 03-31-2003 Last Update: Never Installs: 8
Is in Beta Stage  
No support by the author.

This hack will present custom errors to users explaining that they need to verify thier email, or, that they are COPPA and they need to have their parent/guardian send in the approval form.

I made this hack because I was getting 80 emails a day askining: "why cant I post?"

This hack is an improvent to the basic idea Mas*Mind had on his email verification hack. This has been updated to include coppa users and to work in vbb 2.3.0. I believe it will work in versions 2.1 and later..

Download the attached file and follow the instructions. This hack requires one cut -n- paste to functions.php and two templates (all included).

That's it! Lemmie know how it turns out.

Show Your Support

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

Comments
  #12  
Old 04-01-2003, 09:37 PM
Jadelit Jadelit is offline
 
Join Date: Feb 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, for the usergroup settings for Users Awaiting Email COnfirmation, I have everything checked to no, it works, but when when I click to change the email address, it shows the same page...
Reply With Quote
  #13  
Old 04-01-2003, 10:40 PM
Jeepha Jeepha is offline
 
Join Date: Mar 2003
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try hitting refresh.

You can set the permissions on the group to whatever you want. But if the user cannot post when they hit New Thread or Reply, then this hack will give them the reason they cannot post.
Reply With Quote
  #14  
Old 04-05-2003, 06:59 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
} else if($bbuserinfo[usergroupid] == 3) {
eval("standarderror(\"".gettemplate("error_nopermi ssion_awaiting_moderation")."\");");
} else if($bbuserinfo[usergroupid] == 4) {
eval("standarderror(\"".gettemplate("error_nopermi ssion_awaiting_coppa" )."\" );" );

this code actually
error_nopermission_awaiting_email_confirmation
and
error_nopermission_awaiting_moderation


Quote:
} else if($bbuserinfo[usergroupid] == 3) {
eval("standarderror(\"".gettemplate("error_nopermission_awaiting_email_confirmation ")."\");");
} else if($bbuserinfo[usergroupid] == 4) {
eval("standarderror(\"".gettemplate("error_nopermission_awaiting_moderation " )."\" );" );

and the templates should have the same respected names

error_nopermission_awaiting_email_confirmation
and
error_nopermission_awaiting_moderation



also, if you turn on WAITING for MODERATION option, for new members, you need to change the error_nopermission_awaiting_moderation template
Reply With Quote
  #15  
Old 04-05-2003, 07:05 PM
Jeepha Jeepha is offline
 
Join Date: Mar 2003
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WHat?

error_nopermission_awaiting_moderation is for those that have not checked email.

Why would you care to change the names of the templates? They do the exact same thing.

You are just confusing people.
Reply With Quote
  #16  
Old 04-06-2003, 07:17 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 09:05 PM Jeepha said this in Post #14
WHat?

error_nopermission_awaiting_moderation is for those that have not checked email.


Why would you care to change the names of the templates? They do the exact same thing.

You are just confusing people.
Your hack is great, and there's nothing wrong in the hack, at all.
I just want to make it more detailed, and clear, for those who have the "Moderate New Members" option turned on
People can use your hack, or make changes, of their choice . Sorry if I made anyone confuse.

here's why:

In USERGROUP list, there're two group called

(COPPA) Users Awaiting Moderation -- groupid=4
Users Awaiting Email Confirmation ---- groupid=3


Ofcouse you can use any name that you want to, (it still works with whatever name you call it).

However, "Awaiting Email Confirmation" is a little bit different from "Awaiting Moderation"

If you have your "Verify Email address in registration" option turned on, new users will have to check email before their account is activated. their groupid will be 3.
(so, you can call them "awaiting email confirmation", or "awaiting moderation", it doesnt matter)

The problem comes up when you have the "Moderate New Members" option turned on.
After a new member verify his/her email (if this option turned on) by click on the activation link, he/she will be moved to groupid4, which is (COPPA) Users Awaiting Moderation. So, this group is for both COPPA AND other members who's waiting for moderation. What should you call these members, but "awaiting moderation", as the group name is?

I'd add some more detail on the templates, and change their names, to fit my need.

My replacement code would be:
(PLEASE NOTE that, I've CHANGED the TEMPLATE names, to fit my need, DONT be confused. If you apply hacks, you should understand what you are doing )


Code:
// ###################### Start show_nopermission #######################
function show_nopermission() {
global $bbtitle,$logincode,$url,$scriptpath,$bbuserinfo,$session;

// generate 'logged in as:' box or username and pwd box
if (!$logincode) {
$logincode=makelogincode();
} else if ($bbuserinfo[userid]==0) {
eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
} else if($bbuserinfo[usergroupid] == 3) {
eval("standarderror(\"".gettemplate("error_nopermission_awaiting_email_confirmation")."\");");
} else if($bbuserinfo[usergroupid] == 4) {
eval("standarderror(\"".gettemplate("error_nopermission_awaiting_moderation" )."\" );" );
} else {
eval("standarderror(\"".gettemplate("error_nopermission_loggedin")."\");");
}
exit;
}

and, the two templates are:

template1:error_nopermission_awaiting_email_confirmation
Code:
<p align="center">ATTENTION! ACTION IS REQUIRED BEFORE YOU CAN POST:<br>

You have recently registered at $bbtitle but <b>have not activated your account.</b>

</p>

<p align="left">

<br>

When you registered, an email was automatically sent to the address $bbuserinfo[email]. That 

email  has a link you need to click on to activate your account. You will 

not be able to post until you click on the activation link within that email and enter your email address. 

If you did not received the activation email or you have already deleted it,
 <a href="register.php?s=$session[sessionhash]&action=requestemail">click here</a> 
 to receive the email again. </p>



<p>If you still don't receive your activation email, then you have probably entered an
 incorrect email address. You can correct it by editing your 
 <a href="member.php?s=$session[sessionhash]&action=editprofile">profile</a>.

</p>

template2: error_nopermission_awaiting_moderation


Code:
<p align="center"><font color=red><b>ATTENTION! YOUR ACCOUNT IS UNDER MODERATION:</b></font><br>

You have recently registered at $bbtitle. However, your account <b>have not been activated.</b>

</p>

<p align="left">

<br>

When you registered with $bbtitle, your information will be verified by $bbtitle Staff.
 $bbtitle Staff will check all the required information in your account.<br>
- If you dont have the information filled correct and clear, your account may not be activated.
 you can correct the information by editing your 
 <a href="member.php?s=$session[sessionhash]&action=editprofile">profile</a>.<br>
<br>
- If you have all the information filled correct, you may have registered at $bbtitle 
as a child under age 13. A COPPA form was sent to the email address you entered in the 
?Parent/Guardian Email Address? section.<br>
<b>You will not be able to post until your parent/guardian returns the COPPA form to $bbtitle Staff.
</b> Please have your parent/guardian check her/his email account and send in the completed
 form so you can post. 
<br>
- Otherwise, your account should be activated soon.<br>
<br>
If you have any question, please contact our $bbtitle Staff.
 </p>

<p>Thank you,<br><br>

-$bbtitle Staff </p>
Reply With Quote
  #17  
Old 04-28-2003, 03:57 PM
yxboom's Avatar
yxboom yxboom is offline
 
Join Date: Jan 2003
Location: The City
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thnx mtha, your modifications are more in line with what I need for this hack.
Reply With Quote
  #18  
Old 04-29-2003, 07:02 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oops, it's not my hack, yxboom. it's Jeepha's and I'm not going to steal it from him

dont forget to thank him, for the original one. Modifications are just for fit your customizations ;
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 10:56 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.04471 seconds
  • Memory Usage 2,290KB
  • Queries Executed 24 (?)
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
  • (3)bbcode_code
  • (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
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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