vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Custom errors for users that cannot post! (https://vborg.vbsupport.ru/showthread.php?t=51046)

Jeepha 03-31-2003 10:00 PM

Custom errors for users that cannot post!
 
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.

joeboo 04-01-2003 12:24 AM

you should add this in a text file or something and attach it. so idiots that have illegal or cracked vB's cant use it :) its in the rules as well. Thanks for sharing though

Jadelit 04-01-2003 01:15 AM

They cant view it anyway

Thanks!

Jeepha 04-01-2003 01:38 AM

I would, but for the life of me I cant seem to figure out how to edit this post. I note that when I make changes they are reflected in the Hacks DB only, not in this forum.

ALso, there is no option to upload a file once you have submitted the thread.

Link14716 04-01-2003 01:47 AM

Hit the "edit" button, on the lower, right side of your post. It takes the place of where the report button should be.

drives fast 04-01-2003 02:51 AM

Jeepha,
what was the name of the original hack you found?

I have an older version of vbulletin and cannot find the hack you referenced in the requests forum

thanks in advance

Jeepha 04-01-2003 02:57 AM

Quote:

Today at 04:51 AM drives fast said this in Post #6
Jeepha,
what was the name of the original hack you found?

I have an older version of vbulletin and cannot find the hack you referenced in the requests forum

thanks in advance


You can find it HERE.

drives fast 04-01-2003 11:13 AM

thank you

Jadelit 04-01-2003 06:59 PM

What permissions should be used for Awaiting Email Confirm?

Jeepha 04-01-2003 08:26 PM

I'm not sure I understand your question. I think you are asking for what template to use for awaiting email confirmation.....

in that case use : error_nopermission_awaiting_moderation

Now, if you follow my instructions you really dont need to know anything except how to get into your templates section of your admin panel, it is all cut n paste from there.

Jadelit 04-01-2003 09:37 PM

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...

Jeepha 04-01-2003 10:40 PM

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.

mtha 04-05-2003 06:59 AM

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

Jeepha 04-05-2003 07:05 PM

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.

mtha 04-06-2003 07:17 AM

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>


yxboom 04-28-2003 03:57 PM

Thnx mtha, your modifications are more in line with what I need for this hack.

mtha 04-29-2003 07:02 PM

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 ;;)


All times are GMT. The time now is 03:27 AM.

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.01222 seconds
  • Memory Usage 1,784KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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