The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Deluxe vB User login and access control on non vB pages Details »» | |||||||||||||||||||||||||||
Deluxe vB User login and access control on non vB pages
Developer Last Online: Nov 2011
Hack Description
This is the deluxe version of the user authentication and access control system I use on the non vB pages on my website. For the simple no frills version [URL=https://vborg.vbsupport.ru/showthread.php?t=173693look here.[/URL] This uses the vB 3.7 login system to log you in and out. It allows you to move between your forums and other pages on your site while remaining logged in. It allows you to do things such as restrict pages by usergroup, display different content depending on a user being logged in or not. For example, you can have banner Adds displying to non members only, and/or let members access to specific content. It also displays the logged in users Avatar, number of unread PM's, New posts since last visit, total posts and total threads. It also allows you to specify a maximum Avatar size, and resize any avatars larger than that, while keeping their height/width ratios in proportion! Its very handy if you allow large avatars, but want a small format display on your non forum pages. If the user is not logged in, a login box is displayed, along with total posts and total threads in the forums. I will try and offer support, but work and family commitments mean I dont have much free time. This code is a mix of my own, and pieces I have used from other hacks that are floating around. This script has been confirmed as working on
Known Bugs Will not display Avatars correctly if they are kept in the file system (database avatars are fine) Change log Version 3.00 (21st March 2008)
Click on Install If you have this script installed then please click on the install link because;
Donations First of all, to be clear. This script is 100% free. However if you feel an urge to donate I'm not going to say no. Donations can be made at http://www.billspaintball.com/vb3/bd_donate.php Show Your Support
|
Comments |
#22
|
|||
|
|||
Anyone know how to make this code validate with:
http://validator.w3.org/ under XHTML 1.0 Transitional? Almost all of my errors are coming from this one mod on my non vb pages. |
#23
|
|||
|
|||
I have two tips for anyone using this system.
First, it's to change the wording of the private messages phrase to anything you want. I have it set to say "Private messages, "1 new message", and "2 new messages". Here's the code for that (it goes in the include): Code:
// Display PM Details and generate link to PM box $pmremove = array("Unread ", "<strong>", "</strong>"); $unreadPM = str_replace($pmremove,"",$vbphrase[unread_x_nav_compiled]); if ($unreadPM==1) { echo "<a id=\"unreadpm\" href=\"".$forumpath."private.php?$session[sessionurl] \">1 new message</a>"; } else { if ($unreadPM>1) { echo "<a id=\"unreadpm\" href=\"".$forumpath."private.php?$session[sessionurl] \">" . $unreadPM . " new messages"; } else { echo "<a href=\"".$forumpath."private.php?$session[sessionurl] \">Private Messages</a>"; } } Code:
// finds number of new posts $newposts = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post AS post " . iif($vbulletin->options['threadmarking'], 'LEFT JOIN ' . TABLE_PREFIX . 'threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = ' . $vbulletin->userinfo['userid'] . ')') . " WHERE dateline >= " . $vbulletin->userinfo['lastvisit'] . iif($vbulletin->options['threadmarking'], ' AND dateline > IF(threadread.readtime IS NULL, ' . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ', threadread.readtime)')); $newposts = vb_number_format($newposts['count']); if ($newposts < 1) { echo "<a href=\"".$forumpath."search.php?$session[sessionurl]do=getnew\">No new posts</a><br />";} if ($newposts == 1) { echo "<a href=\"".$forumpath."search.php?$session[sessionurl]do=getnew\">$newposts new post</a><br />";} if ($newposts > 1) { echo "<a href=\"".$forumpath."search.php?$session[sessionurl]do=getnew\">$newposts new posts</a><br />";} |
#24
|
||||
|
||||
I can't get it work.
Quote:
|
#25
|
|||
|
|||
Does anyone know how to access the profile url? It's not located in $vbulletin->userinfo and I'm sure where else to look. I'd like to link the avatar there.
|
#26
|
||||
|
||||
Quote:
I will update the next version with those improvements. |
#27
|
||||
|
||||
See item 1 in the troubleshooting guide.
https://vborg.vbsupport.ru/showpost....23&postcount=2 |
#28
|
||||
|
||||
I got file based avatars to work.
In the login_inc.php file find: PHP Code:
PHP Code:
|
#29
|
||||
|
||||
Quote:
PHP Code:
|
#30
|
|||
|
|||
What would I do if I wanted it to show friend requests in addition to private messaging?
|
#31
|
||||
|
||||
Quote:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|