vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Username recognition & Login form on all forumdisplay, showthread pages (https://vborg.vbsupport.ru/showthread.php?t=23099)

theflow 07-18-2001 05:44 PM

I want username recognition (if logged in) or log-in form (if not logged in) in all pages of those templates. Forumhome is already done, and I thought I could just re-use that code on the other 2 templates. Not so.

1. Here's my site's "Forum Home" page: www.theflow.com/forums
This is close to how I want it to look, but I want to be able to move the positioning of "Mark All Forums Read". Seems tied to the "not-logged-in" variable state display.

Please use this username for easy access, and to help me solve the problem below:
username: test
password: test

------------------------------------------------------------
2. Here was my best attempt to use code from the FORUMHOME template and insert it into FORUMDISPLAY template.

http://www.theflow.com/forums/forumd...p?s=&forumid=4

If logged in, it's more or less working, but I can't control the spacing and font color.
If not logged in, vB is drawing from some other variable or specification I can't find, and it displays a username & password field, but no submit button. How can I fix that, and also change/control the words displayed for either state (logged-in, not logged in)?

BradC 07-19-2001 03:29 AM

you might want to take a look at a couple of other pages..

altering the templates is fine.. but what is calling those templates..?

maybe look at the root/index.php and search for "FORUMHOME" it should come up a few times...

so if you are wanting the welcometext part and everything to show on all forumdisplays and showthreads part.. you will have to set it where it is recongized as being apart of the template... dunno though

Maybe someone smart can help you out... seriously! but... take a look at this part of the code or around.

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 {
  eval(
"\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
  eval(
"\$logincode = \"".gettemplate('forumhome_logincode')."\";");


edit this out if I pasted to much code :(

theflow 07-19-2001 04:31 AM

Quote:

Originally posted by BradC
you might want to take a look at a couple of other pages..

altering the templates is fine.. but what is calling those templates..?

Excellent Brad, thanks so much for looking. You're the first person to reply to this request. I posted it a few days running on the "How do I" forum.

To answer your question, look at this thread:

http://www.vbulletin.com/forum/showt...086#post141086

and go to the post above the last one: by RC Cola. He seems to unearth the issue. Then below that, in reply, I cut & paste every relevant passage I could find by searching vB for "login" and finding 141 posts. The compendium of excerpts seems to narrow down the elements. I just don't know how to stitch them together.

BradC 07-20-2001 01:04 PM

geeze... I am at work and when I replied I was at work... sucks that I cannot look at the templates and code.. to see if I could help more..

if you still have problems.. stitching them together.. I will try when I get home.

/me emails himself @ home.

theflow 07-20-2001 06:44 PM

Thanks Brad! getting closer... I'm sure you could help drive this over goalline :) I sent you email...

----
You will see the issue if you go to any forum threadlist page on my work-in-progress site, like:
http://www.theflow.com/forums/forumd...?s=&forumid=17

I finally was able to cobble together some code from error_nopermission_loggedout and username_loggedout and put it in a table top right of screen. Partial solution. But it has problems.

(1) Once you log in from that screen, it DOES return you to same place (this is good), and it DOES display your username, (this is good), but it also continues displaying the "Login" button (bad.) I was told that a form tag is in one of those other parent templates, thus when I add form actions within my new "forumdisplay" template, there are redundant tags...

(2) I also want to control the visual display of this log in, to better match how I finally got it to show up on the ForumHome page:

www.theflow.com/forums.

(3) I want the action upon "logout" to retunt me to the page I was on, rather than the "forum index" page. I'm wondering if the codebit $scriptpath is relevant? To my untrained eye, it seems to me that that code variable is what accomplished the similar "return to where you are" when one logs-IN.

Any any help would be appreciated. I am at the end of my road.
Here's the code I inserted into forumdisplay:

Code:

<table width="300" border="0" cellpadding="2" align="right" cellspacing="0">
<tr>
        <td>
        <form action="member.php" method="post"><input type="hidden" name="s"        value="$session[sessionhash]">$logincode
        </td>
<tr>
        <td>
        <normalfont>
        <input type="hidden" name="action" value="login">
        <input type="hidden" name="url" value="$scriptpath">
        <input type="submit" class="bginput" value="Login!">
        </form>
        </normalfont>
        </td>
</tr>
</table>


BradC 07-20-2001 07:12 PM

well if it displays the person logged in and everything just fine, but also is still displaying the log in box... it might need an extra if statement made..

but.. that would change everything around..

cause if you put if logged in, don't show user login block else show login block... but unless maybe if you make the login box code into a new template and name it whatever and take that part out of the current templates... and then add it..

sorry I am not in my college nt server class... and umm sneaking away while at break hehe :)

I will look at this more tonight.. I am sure the developers know.. they are just probably busy... looking for John


All times are GMT. The time now is 02:13 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.01128 seconds
  • Memory Usage 1,748KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete