vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Easy Question concerning $logincode (https://vborg.vbsupport.ru/showthread.php?t=44910)

fello9 12-03-2002 06:53 AM

Quote:

Originally posted by Erwin
Add this to the bottom of your "phpinclude" template.

PHP Code:

// if user is know, then welcome
if ($bbuserinfo['userid']!=0) {
  
$username=$bbuserinfo['username'];
  eval(
"\$welcometext = \"".gettemplate('forumhome_welcometext')."\";");
  eval(
"\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
  eval(
"\$newposts = \"".gettemplate('forumhome_newposts')."\";");

} else {
  
$welcometext "";
  eval(
"\$logincode = \"".gettemplate('forumhome_logincode')."\";");


Then put your $logincode and $logoutcode in your header (or in any template). I haven't tested it, but it should work. :)

When I add this, I'm getting an error on my message board.

The reason I was trying to add this code was because I added a $logincode to the Quick Reply hack. But when inserting a user name and password and you click reply you are not logged in. So, I'm trying to fix it. Is it the same solution?

Erwin 12-03-2002 08:02 PM

What error do you get?

Smoothie 12-03-2002 08:24 PM

Appparently you can't login and post a new message with the QRB if guests are not allowed to post. He added the QRB code to show it for all users, not just logged in.

Smoothie 12-03-2002 08:32 PM

sorry, i posted this in the wrong thread.

fello9 12-03-2002 10:01 PM

Quote:

Originally posted by Erwin
What error do you get?
Yesterday, I added your code and got an error, and removed it. But now I tried it again, and it's not throwing any error.

But it didn't help me in my situation. I wanted to add the $logincode to the Quick Reply hack, which should allow a registered user to fill in his User Name & Password, and click on "Post Reply". But currently it's not working, I'm getting the standard "You're not logged in" Vbulletin message. How can I program that when someone clicks on "Post Reply" and has entered his User Name & Passwod in the fields above, it should automatically log him in too?


All times are GMT. The time now is 01:46 AM.

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.01144 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete