Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by RobAC RobAC is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-23-2001 Last Update: Never Installs: 15
 
No support by the author.

Ok....this is my first hack. It's small and should be very straight forward.

The source of this hack is a thread that started in the main Code Hacks forum by a user looking for a hack that would allow their members to log in from the main home page of their site. Once logged in, it would display a Welcome message when the logged in member returned to the home page.

The original source was provided by Demolition, but members were having problems with getting the hack to run.

Warning/Disclaimer: I am not a well seasoned PHP programmer. I get by as best I can, but usually learn from example and tinkering. I have changed the PHP coding around slightly, and added much more HTML in order to format the input fields etc. This hack was tested using Internet Explorer 5.5 and Netscat 4.7. I have verified that it works in both OS's several times. I am also running the latest version of PHP on my server, so I'm not sure how to help those of you that are running PHP3, but I'll do the best I can. I won't make any promises though. I plan on continuing to work on this as well as add a few more features to it as time permits.

Download the attached file and edit it using a text editor of your choice. Add the pathway to your forums directory where noted. Save the file as a PHP file to your main forums directory. If your site's home page is an HTML document you will have to call the PHP file using a server side include. If you're not sure how to do this, you should search the forums here as this topic has already been covered several times.

Show Your Support

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

Comments
  #2  
Old 07-24-2001, 05:45 AM
_
Guest
 
Posts: n/a
Default

<form action="http://www.corvetteactioncenter.com/forums/member.php" method="post" />

You should really change that

But nice hack for us html/php impaired

I'm just lazy.
Reply With Quote
  #3  
Old 07-24-2001, 05:48 AM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry.....here it is.
Reply With Quote
  #4  
Old 07-24-2001, 07:39 AM
Ruth Ruth is offline
 
Join Date: Oct 2001
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

RobAC, thanks

but i wasn't looking exactly for this, i was looking for a code to welcome the user in non-vB pages, when s/he logs in using login box in non vb pages, and this one doesnt work like this
Reply With Quote
  #5  
Old 07-24-2001, 01:10 PM
Robert Basil's Avatar
Robert Basil Robert Basil is offline
 
Join Date: Oct 2001
Location: Chandler, Arizona
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rob,

I just added this hack to our community and it works great! Thanks!
Reply With Quote
  #6  
Old 07-24-2001, 01:21 PM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Ruth
RobAC, thanks

but i wasn't looking exactly for this, i was looking for a code to welcome the user in non-vB pages, when s/he logs in using login box in non vb pages, and this one doesnt work like this
Ruth,

Can you explain further? So you want it to say "Welcome back.....member on each non forum page? You don't want the login fields?

-Rob
Reply With Quote
  #7  
Old 07-24-2001, 01:47 PM
BradC
Guest
 
Posts: n/a
Default

By Definition Rob, I think what is wanted is lets say on the index.html or index page, it welcomes them to the site.

kind of like using a very basic phpportals

that is what I get out of it.
Reply With Quote
  #8  
Old 07-24-2001, 04:19 PM
Rostor Rostor is offline
 
Join Date: Nov 2001
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Rob, i try your hack but nothing works sorry it will be for the next time
Reply With Quote
  #9  
Old 07-24-2001, 04:27 PM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Ruth
RobAC, thanks

but i wasn't looking exactly for this, i was looking for a code to welcome the user in non-vB pages, when s/he logs in using login box in non vb pages, and this one doesnt work like this
Reply With Quote
  #10  
Old 07-24-2001, 04:52 PM
Ruth Ruth is offline
 
Join Date: Oct 2001
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

smachol, thanks, but i tried that it doesn't work...

RobAC, this is what i am trying to do...

i need to do the following in non-vB pages:

(1) if the user already logged use their cookies and display a welcome $username + logout link

(2) if the user is not logged use the login form before displaying the page content.

(3) prevent access to users awaiting confirmation (3) and users awaiting moderation (4)



PHP Code:
<?

require("path-to/global.php");

if (!$bbuserinfo[userid] || $bbuserinfo[usergroupid]==3 || $bbuserinfo[usergroupid]==4) {
show_nopermission();
eval("dooutput(\"".gettemplate("error_wrongpassword")."\");");
}

if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];

echo"Welcome Back, <b>$username</b>";

} else {

?>

<table border="0" cellpadding="0" cellspacing="0" height="99">
<form action="http://path-to/forums/member3.php" method="post">
<tr>
<td nowrap height="13" colspan="2">
<p align="center"><font face="verdana,arial,helvetica" size="1" ><b>Login with username and password:</b></font></p>
</td>
</tr><tr>
<td nowrap height="25"><font size="2">User Name</font>
</td>
<td nowrap height="25"><input type="text" class="bginput" name="username" size="13">
</td>
</tr>
<tr>
<td nowrap height="27"><font size="2">Password</font></td>
<td nowrap height="27"><input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="login"><input type="password" class="bginput" name="password" size="13">
<input type="submit" class="bginput" value="Login!"></td>
</tr>
</table>

<?

}

?>
i get error almost everywhere except for the login box, there is an error on show_nopermission line, and the user is not welcomed in non-vb pages. (i changed member.php to member3.php and alreasy set the redirect to the index of my main site (non-vB) )

please help
Reply With Quote
Reply

Thread Tools

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 04:05 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.09194 seconds
  • Memory Usage 2,288KB
  • 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)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
  • (8)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