TinyPortal

Development => Support => Topic started by: Skhilled on November 25, 2005, 06:39:56 AM

Title: User Block Additions
Post by: Skhilled on November 25, 2005, 06:39:56 AM
Hi, Is there a way to add a "Forgot Password" link/function to the login portion of the user block?
Title: Re: User Block Additions
Post by: Skhilled on November 25, 2005, 09:52:32 AM
Hmm, maybe that was a mod...
Title: Re: User Block Additions
Post by: bloc on November 26, 2005, 07:57:42 PM
It will show that link i think..if you miss the password enough times. Let me hunt down what the link is.
Title: Re: User Block Additions
Post by: bloc on November 26, 2005, 08:01:12 PM
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.
Title: Re: User Block Additions
Post by: Skhilled on November 26, 2005, 09:28:37 PM
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!
Title: Re: User Block Additions
Post by: bloc on November 27, 2005, 01:04:19 AM
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...?
Title: Re: User Block Additions
Post by: resurgence on November 27, 2005, 02:33:12 AM
can i have the user block count spiders (and show it) as well?
Title: Re: User Block Additions
Post by: Skhilled on November 27, 2005, 07:21:59 AM
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>';
        }
Title: Re: User Block Additions
Post by: bloc on November 28, 2005, 12:20:51 AM
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.
Title: Re: User Block Additions
Post by: Skhilled on November 28, 2005, 08:12:55 PM
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:
Title: Re: User Block Additions
Post by: resurgence on November 29, 2005, 06:33:05 AM
Quote from: resurgence on November 27, 2005, 02:33:12 AM
can i have the user block count spiders (and show it) as well?
no?
Title: Re: User Block Additions
Post by: bloc on November 29, 2005, 10:52:46 AM
Sorry..forgot your question there.. :)

Yes, i think it can show spiders, but only if that mod is installed. Haven't tested it though, but Omar's spider mod allow showing it other places than on boardindex I think.

Is that what you use?
Title: Re: User Block Additions
Post by: resurgence on November 30, 2005, 05:26:11 AM
i have googlebot&spiders mod intalled on smf1.0.5

the userblock (i'm using blue101) counts spiders but down't show it. which intrigue my members when they see

users: 3
guests: 1
total: 5

xD

so how would i make it show it?
Title: Re: User Block Additions
Post by: resurgence on December 05, 2005, 05:03:16 AM
bump? this is what i mean:

there's a spider online but it won't show it.

[attachment deleted by admin]
Title: Re: User Block Additions
Post by: Ray on December 05, 2005, 06:51:00 AM
It will do this--and this is with TP

[attachment deleted by admin]
Title: Re: User Block Additions
Post by: resurgence on December 06, 2005, 10:11:46 AM
? you just have 2 users on and no spiders. whos the buddy?

h and i'm using blue101 on SMF 1.05
Title: Re: User Block Additions
Post by: resurgence on December 18, 2005, 01:33:09 PM
so... no help on this apparently.
Title: Re: User Block Additions
Post by: IchBin on December 18, 2005, 03:56:45 PM
Does it show the spiders name on the who's online in the forum section like in what Ray posted? And not in your user block?
Title: Re: User Block Additions
Post by: resurgence on December 19, 2005, 10:58:15 AM
it shows the spiders when i go to the who's online page yes.

user block? no. not at all.
Title: Re: User Block Additions
Post by: resurgence on December 25, 2005, 12:22:07 PM
hmmm... :(
Title: Re: User Block Additions
Post by: IchBin on December 25, 2005, 04:08:43 PM
I think the code needs to be applied to the BoardIndex.template.php
If you look at the install.xml file for this line:
<file name="$themedir/BoardIndex.template.php">


it will tell you all the code that needs to be added or replaced. Give it a shot it's not that hard. :)
Title: Re: User Block Additions
Post by: resurgence on December 25, 2005, 11:36:08 PM
Quote from: IchBinâââ,¬Å¾Ã,¢ on December 25, 2005, 04:08:43 PM
I think the code needs to be applied to the BoardIndex.template.php
If you look at the install.xml file for this line:
<file name="$themedir/BoardIndex.template.php">


it will tell you all the code that needs to be added or replaced. Give it a shot it's not that hard. :)


so, it'll add it to the userbox?
Title: Re: User Block Additions
Post by: WebMasterZ on December 26, 2005, 07:23:53 PM
yes the users online shows what spiders are visiting and where they are visiting

I have it instaled under TP
Title: Re: User Block Additions
Post by: resurgence on December 28, 2005, 11:56:11 AM
so do i. i want it to show in the userbox. :)
Title: Re: User Block Additions
Post by: WebMasterZ on December 28, 2005, 05:35:46 PM
Do you just want it to show the number of spiders?

You will probably need to grab the piece of code from who.template & add to
TPortalBlocks.template under //Online Users
Title: Re: User Block Additions
Post by: resurgence on December 29, 2005, 04:49:05 PM
^^ yes since it does count the spiders might as well show them. :)

and i have no idea what to do for it.