The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Before I start, I just want to make sure everyone knows that this is a [request]
![]() All kidding aside, here's the dirt: How hard/easy would it be to create a hack that checks to see if a visitor to my website is a member on my forums, and if not to shoot up a pop-up window about registration? The thing is, I don't want to subject my existing members to an annoying popup window - and I'll probably set it in the cookie to only pop up once a day for visitors anyway. But what would be involved with this? Anyone want to give it a go? -jim Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
it's actually really easy, but keep in mind that it will pop up for users who are logged out.
If you turn PHP on in your header, you could say: Code:
if (!$bbuserid) {
//$bbuserid is a cookie that has the userid - hence showing that they're logged in. If it doesn't exist, they aren't.
if (!$YourCookieThatPreventsThePopUp) {
//Change that to whatever you call the checking popup, since you don't want it to popup on EVERY forum page
$loggedincheck = ''; //Fill that in with the JavaScript popup code.
}
}
|
|
#3
|
|||
|
|||
|
Cool - If I wanted to do this on my main page, would I just have to require global.php or anything like that?
|
|
#4
|
|||
|
|||
|
Quote:
|
|
#5
|
|||
|
|||
|
well, Jim - you might have to change your cookie path.
Personally, I use "/" as mine, instead of "/cpa/forums", simply because I might want to use it on my site. If you leave it as "/forums", it might not get pulled from your site. And actually, if you use forums.bronx-bombers.com, I don't know if it's possible to pull the cookie... |
![]() |
|
|