TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 606
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 605
  • Total: 605

User Block Additions

Started by Skhilled, November 25, 2005, 06:39:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skhilled

Hi, Is there a way to add a "Forgot Password" link/function to the login portion of the user block?

Skhilled


bloc

It will show that link i think..if you miss the password enough times. Let me hunt down what the link is.

bloc

this is the reminder link: index.php?action=reminder.

It will show automatically as mentioned..but you can also set it up as a link of course. Use Login.template.php for the login screen.

Skhilled

Yes, it'll show up on the login page but I wanted to add it to the user block. I have it setup so the you can see the site but not use anything unless you're loged in. I guess I'll just have to setup the login page again. Thanks!

bloc

In the user block should work fine..just open TPortalBlocks.template and find the userblock part..you can copy any of the lines and change $txt[xxx] to your won string...and the link to that one. Need any detailed help...?

resurgence

can i have the user block count spiders (and show it) as well?

Skhilled

Ok, I know $txt[###] refers to a language file (ie. index.english.php), and $txt['something'] is for adding your own text. But what does $txt['smf##'] relate to as I couldn't file a reference in any file for them? Maybe I'm looking in the wrong dir for the same file as there are duplicates (probably slighty different) in the tinyport75 and themes dir.

I am assuming that the part of the code that I need to change is:

        // Otherwise they're a guest - so politely ask them to register or login.
        else
        {
                echo '
                                                        ', $txt['welcome_guest'], '

                                                        ', $context['current_time'], '


                                                        <form action="', $scripturl, '?action=login2" method="post" >
                                                                <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
                                                                <select name="cookielength">
                                                                        <option value="60">', $txt['smf53'], '</option>
                                                                        <option value="1440">', $txt['smf47'], '</option>
                                                                        <option value="10080">', $txt['smf48'], '</option>
                                                                        <option value="302400">', $txt['smf49'], '</option>
                                                                        <option value="-1" selected="selected">', $txt['smf50'], '</option>
                                                                </select>
                                                                <input type="submit" value="', $txt[34], '" />

                                                                ', $txt['smf52'], '
                                                        </form>';
        }

bloc

No, I think you are misunderstaning it..$txt is array variable, meaning it can contain many items. They are all referenced by the stuff inside []. That can be a number or a string or both. Strings needs 2 apostrophes, while numbers don't.

That fact that $txt is in several files(language files) is simply to avoid loading in the rather big array each time - now it only loads in what you need. The ones in index.english.php is common everywhere, while the others are specific for that function they are in ...post, profile etc.

Skhilled

Oh, DUH! I'm just so used to seeing the index.english.php and confused the 2. The quotes should have been the clue. Sometimes I think I complicate things a little more that needed!  :idiot2:

This website is proudly hosted on Crocweb Cloud Website Hosting.