|
Verify if user is logged in for non-vb pages, using Jquery
by
04 Mar 2013
1 - vbconnect.php PHP Code:
<?php
Create this file using the code from this https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js 3- jquery_vbulletin.js Change XXX with any another prefix wich do you want Code:
$(document).ready(function ()
{
$.ajax({
url:'vbconnect.php',
type:'POST',
data:'&ajax=1',
cache:false,
async:false,
dataType:'json',
success:function(result){
$.cookie('XXXuserid', result['userid'], { expires: 7, path: '/' });
$.cookie('XXXusername', result['username'], { expires: 7, path: '/' });
$.cookie('XXXuserpost', result['userpost'], { expires: 7, path: '/' });},
error:function(){
$.cookie('XXXuserid', '', { expires: 7, path: '/' });
$.cookie('XXXusername', '', { expires: 7, path: '/' });
$.cookie('XXXuserpost', '', { expires: 7, path: '/' });}
})
});
Change XXX with your prefix using in jquery_vbulletin.js file PHP Code:
<?php
Code:
<script src="http://code.jquery.com/jquery-latest.js"></script> <script src="your/path/to/javascript/directory/jquery_cookie.js"></script> <script src="your/path/to/javascript/directory/jquery_vbulletin.js"></script> <?php echo $output; ?> |
Similar Mods
| Mini Mods jQuery Accordian Module for vBAdvanced Pages | vBulletin 3.8 Add-ons |
| Mini Mods jQuery Accordian Menu for vBAdvanced Pages | vBulletin 3.8 Add-ons |
| Verify User Email Addresses | vBulletin 2.x Full Releases |