Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Yet Another vB Login on non-vB Page Details »»
Yet Another vB Login on non-vB Page
Version: 1.00, by calorie calorie is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.0 Beta 1 Rating:
Released: 06-25-2005 Last Update: Never Installs: 65
 
No support by the author.

This is not a plugin, nor is it a code modification. It is a separate script, so just configure the attached script, FTP it to wherever, and then call it from your browser. Once you test it out, you can edit the script to show whatever content you desire. Look at the code to see where to set your content. If you don't like this script, try mcahill's vB login on a non-vB page here.

If you use this script, click the install button. This allows you to receive update notices, should any be sent. It is also a nice way to say thanks!

Fine Print: Obviously, use at your own risk. Support is not guaranteed. This script may not be redistributed!

25 Jul 2005: added $session to make_page_content global list

Show Your Support

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

Comments
  #2  
Old 07-08-2005, 12:07 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neat, I like how access is so easily controlled by the user group. I did notice that I had to slightly modify how I setup the path to my forums. My forum is in a folder called forums just below my docroot. If my example file is in the docroot (ie, above the forums folder) I had to set the full path as:

PHP Code:
define('FWD','forums/'); 
That's running Suse with Apache2.
Reply With Quote
  #3  
Old 07-08-2005, 07:49 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One question on setting the usergroups. I can only seem to get it to work if that is the user's primary usergroup. Can it also check "Additional Usergroups"?

Thanks!
Reply With Quote
  #4  
Old 07-09-2005, 12:46 AM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@westpointer: try the attached...
Reply With Quote
  #5  
Old 07-11-2005, 07:44 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by calorie
@westpointer: try the attached...
Thanks! That works great.

I've modified the code a little, setting a variable depending on whether or not the user is a member of the group:

PHP Code:
if (!in_array($usergroup_id,$user_groups) AND empty($result_groups))
// RESTRICTED PAGE SETTINGS
    
$restricted 0;
    eval(
'$navbar = "' fetch_template('navbar') . '";');
    
$src_output make_page_content();

Then when the page is output:

PHP Code:
$header
$navbar
END
;
if (
$restricted == 1) {
    
$morestuff "You can see everything!";
}
$src_output .= <<<END
$morestuff
$footer 
That gives me very nice granular control for what is displayed based on the forum groups. Thanks!
Reply With Quote
  #6  
Old 07-25-2005, 10:56 AM
Snetty Snetty is offline
 
Join Date: Feb 2005
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

k, i like the look of this script. My problem is 2 fold, I don't need (or want) any usergroup support at the moment, I assume if i remove lines 95 -> 110 then this will solve that problem.

My 2nd problem is a touch more complex. I only want to display the welcome box (and be able to style it as I see fit). Looking at the code though it's calling the whole $header variable which is already made up by vb. What would I replace that with to meet my needs?
Reply With Quote
  #7  
Old 07-25-2005, 02:52 PM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Snetty: You could just set UGS to all usergroup IDs to bypass the login page. As for what you want to display, just set $src_output as shown in the script.
Reply With Quote
  #8  
Old 07-25-2005, 08:05 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How difficult would it be to expand this to something a little more complex?

What I'd like to see is something that:
  1. Writes the forum header
  2. Writes the breadcrumbs
  3. Runs any PHP script, capturing its oputput as a variable via ob_start/ob_capture/ob_stop - thus avoiding header already sent/redefinition errors
  4. Writes the script output
  5. Writes the forum footer.
Reply With Quote
  #9  
Old 08-01-2005, 12:01 AM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@FASherman: you can do all of that. I was writing another example to show but haven't finished it yet. Thought I'd better fill in this post though. :speechless:
Reply With Quote
  #10  
Old 08-02-2005, 09:33 AM
Mimoun Mimoun is offline
 
Join Date: Jul 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to only show the small box that is on the right side of the navbar.
I want to extract data from the $navbar who do I do that?
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 11:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04841 seconds
  • Memory Usage 2,299KB
  • 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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete