Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 05-22-2003, 07:51 PM
Pezman's Avatar
Pezman Pezman is offline
 
Join Date: Aug 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adding Activation Link To Error_NoPermissions Templates

I keep running into a bug with vB 2.x.x (I have 2.3.0 currenty installed) and if the email that contains the activation link bounces from their email inbox, there is no way to send it again without manually doing so via the control panel.

I want to add it to my error_nopermission_loggedin and error_nopermission_loggedout templates, so I don't keep doing it manually.

I've tried adding this to the template: <a href="register.php?a=act"> but not matter how many attempts I can't get it or alterations of that URL to work.

Could someone here please tell me how I can have this added to the error page?

I've ran across the template named: activateform and it has EXACTLY what I need, but I can't seem to link to it properly from the error pages.

Here is an example of how people get locked out if the first activation link bounces...
Quote:
Problem:
User changes Email Address via user CP
- System sends email to user informing them of Address Change and sends activation code so they can verify the change.
- User's inbox is full so message bounces
- User's status is in limbo and set to "Awaiting Email Verification"
User is stuck so they click on "Lost My Password"
- System resends lost password verification request
- User clicks on verification link and system sends another email with the NEW password
- User clicks on the link to change the password back to something he can remember
- System blocks him with the error_nopermission screen because he is still set as "Awaiting Email Verification" from the initial email bounce.

So now the user can't ever get in because the activation code was never properly clicked on due to email failure or user error.
TLDR version:
want to add a link to the ERROR page that allows users to manually send their own ACTIVATION link again via email
Reply With Quote
  #2  
Old 05-22-2003, 08:02 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try something akin to this:
PHP Code:
if ($bbuserinfo['usergroupid'] == 3// awaiting email conf
{
    
$useractivation $DB_site->query_first("SELECT activationid FROM useractivation WHERE userid = " .
        
$bbuserinfo['userid']);
    
$extraacttext "You have not yet activated your account. To do so, click this link: <a href=\"register.php?s=" $session['sessionhash'] .
        
"&a=" $useractivation['activationid'] . "\">activate</a>";
}
else unset(
$extraacttext); 
Then add $extraacttext to the correct template. Of course it makes activation via e-mail completely useless...
Reply With Quote
  #3  
Old 05-22-2003, 08:10 PM
Pezman's Avatar
Pezman Pezman is offline
 
Join Date: Aug 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't instead I somehow link to that template called: activationform?

The solution you provided does look like it would work, however it would cut out the mail portion that I do like for security reasons.

Using the above code a user could register with a fake email, get the error page, then click on the link that would appear on the site and poof they are in.

I just need to get people to acitvationform successfully or a system that works similar to activationform template.

Heck, I can't even find a single place that directs users to that template can you?
Reply With Quote
  #4  
Old 05-22-2003, 08:29 PM
Fallout2man Fallout2man is offline
 
Join Date: Dec 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm just toing to throw out my previous try and have another go.

under this:

PHP Code:
if ($url==$HTTP_REFERER) {
   
$url=urlencode($url);
 } 
add this

PHP Code:
// ############################### start remail ############################### 
 
if ($HTTP_GET_VARS['action']=="remail") { 
      if (
$bbuserinfo[usergroupid]==3) { 
          
$userinfo=$DB_site->query_first("SELECT useractivation.userid,useractivation.activationid,user.username,user.email FROM `useractivation` LEFT JOIN `user` USING(userid) WHERE user.userid='$bbuserinfo[userid]'"); 
          
$username=$userinfo[username]; 
          
$userid=$userinfo[userid]; 
          
$activateid=$userinfo[activationid]; 
  
          eval(
"\$message = \"".gettemplate("email_activateaccount",1,0)."\";"); 
          eval(
"\$subject = \"".gettemplate("emailsubject_activateaccount",1,0)."\";"); 
          
vbmail($userinfo[email],$subject,$message); 
          eval(
"standarderror(\"".gettemplate("remail_confirmed")."\");"); 
          exit; 
      } elseif (
$bbuserinfo[userid]==0) { 
          eval(
"standarderror(\"".gettemplate("error_remailogin")."\");"); 
          exit; 
      } else { 
          eval(
"standarderror(\"".gettemplate("error_noremail")."\");"); 
          exit; 
      } 
 } 
As for the added templates

remail_confirmed:
Code:
$username, you have just resent your account activation email. Click <a href="index.php?s=$session[sessionhash]">here</a> to return to the main index.
error_remailogin:
Code:
You must be logged in to resend your account activation email.
if you
error_noremail:
Code:
Only Users Awaiting Activation can resend their activation email.
Reply With Quote
  #5  
Old 05-23-2003, 12:03 AM
Pezman's Avatar
Pezman Pezman is offline
 
Join Date: Aug 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, no go still.

Any other alternatives someone can come up with?
Reply With Quote
  #6  
Old 05-23-2003, 10:47 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 04:03 AM Pezman said this in Post #5
Nope, no go still.

Any other alternatives someone can come up with?
All you have to do is to turn off email confirmation. Because what you are trying to do is no different than turning it off alltogether, so why bother anyway?

If you don't want to turn it off, then try amykhar's hack which automatically sends activation codes Y more times in every X days until they got it.
Reply With Quote
  #7  
Old 05-23-2003, 05:32 PM
Pezman's Avatar
Pezman Pezman is offline
 
Join Date: Aug 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fallout2man

I get a parse error on line 20

That line is: $username=userinfo[username];

so I changed it to: $username=$userinfo[username];

Notice the $

Now....

The system doesn't send me an email although it says it did. And it says ", you have...l" rather then "Pezman, you have..."
Reply With Quote
  #8  
Old 05-25-2003, 05:44 PM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe I found what's going wrong in the script/hack posted above!

Try using $bbuserinfo[...] where it says $userinfo[...].
At least that's the array used by vBulletin's original templates....

Another idea:
Would an external PHP-Script be OK for you?
You could link to that (external, non vB) page which asks for the username and then sends the activation request by itself.
That could be done quite easiely....
Reply With Quote
  #9  
Old 05-27-2003, 07:18 PM
Fallout2man Fallout2man is offline
 
Join Date: Dec 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
05-23-03 at 11:32 AM Pezman said this in Post #7
Fallout2man

I get a parse error on line 20

That line is: $username=userinfo[username];

so I changed it to: $username=$userinfo[username];

Notice the $

Now....

The system doesn't send me an email although it says it did. And it says ", you have...l" rather then "Pezman, you have..."
Fixed that, also realized the main if statement was off, I was using userid instead of usergroupid like it should've been.
Reply With Quote
  #10  
Old 05-28-2003, 12:57 AM
Pezman's Avatar
Pezman Pezman is offline
 
Join Date: Aug 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok....

For anyone who wants to know how to fix this. It is as easy as pie, and I really wish someone could have answered my original question on what used the : activationform template.

I found what uses it and you can install this hack without doing jack!

Just link to register.php?action=requestemail

Easy as pie, hack is complete, install now
Reply With Quote
Reply

Thread Tools
Display Modes

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:33 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.02396 seconds
  • Memory Usage 2,275KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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_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