Jump to content
xisto Community

sarephina

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by sarephina

  1. Hey, I think just got through the same problem in phpBB (if that's what you're using). I'm guessing about a lot of things regarding your problem, Godlymoose, but I hope this will help. Godlymoose, next time you ask for help, please be more detailed about your problem. For example, in this case, tell us what product you're trying to change the code for, and what results you got from what you tried to do--like any error messages, or weird code, or something. If you got a blank space, tell us that too. In the latest release of phpBB, the variable {USERNAME} is not defined (I have no idea why). PHP code will not work on template pages, and you must do a song and a dance to integrate separate pages into the phpBB system (see part "C)" of this post). Please let me know how this works out... == TABLE OF CONTENTS: == A) WHAT YOU MUST DO WHAT I THINK WILL DISPLAY EXACTLY WHAT YOU WANT C) HOW TO PUT THIS ONTO YOUR INDEX PAGE (if it's not part of phpBB) == CONTENTS: == *** A) WHAT YOU MUST DO: *** If you want to use {USERNAME} to display the username in a template, 1. OPEN includes/page_header.php from the root dir of the phpBB installation. 2. FIND the place where there's a long list of variables--it should start like this: $template->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'SITE_DESCRIPTION' => $board_config['site_desc'], 3. And somewhere in there, before the array (the list) ends, INSERT this line: 'USERNAME' => $userdata['username'], *** WHAT I THINK WILL DISPLAY EXACTLY WHAT YOU WANT *** AFTER you make the changes in page_header.php, someone who isn't logged in will have the {USERNAME} "Anonymous," not "Guest." BUT You can go around this if you INSERT the following lines. <!-- BEGIN switch_user_logged_in -->Welcome, {USERNAME}<!-- END switch_user_logged_in --><!-- BEGIN switch_user_logged_out -->Welcome, Guest.<!-- END switch_user_logged_out --> *** C) HOW TO PUT THIS ONTO YOUR INDEX PAGE *** If you want to put this text on a page that's not part of your board, you must follow the instructions here: https://www.phpbb.com/kb/article.php?article_id=143 And then, wherever you want this text to show up on your index page, enter the code from part "".
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.