Update README.txt with simplified user synchronization instructions
| Project: | Drupal vB |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Sorry for the noob question but I'm lost in the php of it all and any help would really be appreciated.
According to the readme.txt:
* To login users concurrently in Drupal and vBulletin, you should remove the
user login form in your vBulletin template and point users to Drupal's
login page.
Could someone tell me what to remove and/or change in the following code in order to accomplish this:
(from NAVBAR template)
<!-- login form -->
<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont" style="white-space: nowrap;"><label for="navbar_username">$vbphrase[username]</label></td>
<td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
<td class="smallfont" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->Also for the logout the readme.txt says:
* To properly logout users from vBulletin and Drupal, you should replace the
logout link in your vBulletin template with a link pointing to '/logout'
(i.e. Drupal's logout URL), so the user is logged off from both systems.
Same question, with the following template what should be changed to logout users from both vb and drupal:
(from FORUMHOME template)
<!-- member logout -->
<td align="$stylevar[right]"><a href="http://www.satspeedprep.com/drupalvb/logout?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><phrase 1="$bbuserinfo[username]">$vbphrase[log_out_x]</phrase></a></td>
<!-- end member logout -->Thanks for any assistance you can provide.
Steve

#1
Anybody?
#2
As the readme says:
Replace the code between
<!-- login form --><!-- / login form -->with a link to the Drupal login page, e.g.<!-- login form --><a href="http://path_to_your_drupal_installation/user">Login</a>
<!-- / login form -->
If you want to keep the login form at vb then have a look at #380658: Login from VB Forum show a blank page in Drupal.
Replace the code between
<!-- member logout --><!-- end member logout -->with a link to the Drupal logout, e.g.<!-- member logout --><td align="$stylevar[right]"><a href="http://path_to_your_drupal_installation/logout"><phrase 1="$bbuserinfo[username]">$vbphrase[log_out_x]</phrase></a>
<!-- end member logout -->
#3
Apparently, we recently found out that it can be done much easier!
Attached patch updates the documentation accordingly. It would be great to get some feedback on whether the outlined steps are comprehensible and working for you.
#4
Thanks for reporting, reviewing, and testing! Committed to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
#5
Using Replacement Variables is a good idea and should work. However I haven't an installation of vb + Drupal anymore so I couldn't test if it actually works as intended.
#6
Thanks for the response. I've been away for a bit so I will download and implement this patch and report back as to my results. Thanks to all for the information and response!
#7
Automatically closed -- issue fixed for 2 weeks with no activity.