Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Pop-up window for registered users only (and vice versa) Details »»
Pop-up window for registered users only (and vice versa)
Version: , by Aaron1 Aaron1 is offline
Developer Last Online: Dec 2008 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 09-19-2003 Last Update: Never Installs: 0
 
No support by the author.

Is possible that whenever forumhome loads that a user will be checked if it's registered or not, and if that's the case, a pop-up window will appear with the content of my choice?

I already checked the database here for a similar hack, but the ones i found where done through a dhtml popup, but not the old fashion new window pop-up i want.

Wait! I found some tips from Firefly in a thread:
https://vborg.vbsupport.ru/showthread.php?t=27372

This is what he suggested:

__________________________________________________

In global.php add

if ($bbuserinfo['userid']==0) {
eval("\$headexpressreg = \"".gettemplate('head_expressreg')."\";");
}

right after

$newpmmsg=1;
eval("\$headnewpm = \"".gettemplate('head_newpm')."\";");
}

now create a new template, head_newpm, and put this in it:

<script language="javascript"><!--
window.open('http://www.yoursite.com/forum/file.php');
// --></script>

__________________________________________________ __

This could be very close to what i want, but how do i make this happen in forumhome only? Because everytime global.php is accessed that pop-up will keep appearing. And that could be irritating...

Cheers!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-19-2003, 04:27 PM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just put the above code in index.php right after require_once( './global.php' );

Should do the trick
Reply With Quote
  #3  
Old 09-19-2003, 04:35 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok cool, so when i want the popup to show for registered users only, i will need this code (modified) code below like this?
_____________________________________
if ($bbuserinfo['userid']==1) {
eval("\$popupreg = \"".gettemplate('popup_reg')."\";");
}
_____________________________________

$bbuserinfo['userid']==0 (not registered, guests)

$bbuserinfo['userid']==1 (registered)

That's correct?

Cheers!
Reply With Quote
  #4  
Old 09-19-2003, 04:38 PM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if ($bbuserinfo['userid']>=1) {
eval("\$popupreg = \"".gettemplate('popup_reg')."\";");
}

If you did

if ($bbuserinfo['userid']==1) {
eval("\$popupreg = \"".gettemplate('popup_reg')."\";");
}

Then only user with user id of 1 would get pop up.
Reply With Quote
  #5  
Old 09-19-2003, 06:36 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Insanctus!

I am going to try it!
Reply With Quote
  #6  
Old 09-19-2003, 06:45 PM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me know if it works for you
Reply With Quote
  #7  
Old 09-20-2003, 12:46 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Strange it doesn't work.

I added this piece of code in index.php right after:

--------------------------------------------------------
require('./global.php');

if ($bbuserinfo['userid']>=1) {
eval("\$headpop = \"".gettemplate('head_pop')."\";");
}
--------------------------------------------------------

And I added a template called head_pop with this inside:

--------------------------------------------------------
<script language="javascript"><!--
window.open('http://www.housequake.com/forum/test.html');
// --></script>
--------------------------------------------------------

But nothing happens.
Do you think i overlooked something?

Cheers!
Reply With Quote
  #8  
Old 09-20-2003, 09:48 PM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did you add $headpop to your forumdisplay template ?
Reply With Quote
Reply


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 05:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04023 seconds
  • Memory Usage 2,265KB
  • Queries Executed 23 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete