[Plugin] Login box widget
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions
View previous topic :: View next topic  
Author Message
Tblue
Hooked :)
Hooked :)

Joined: 16 Mar 2008
Posts: 292
Reputation: 111.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 9

PostPosted: Tue Nov 18, 2008 13:32    Post subject: [Plugin] Login box widget Reply with quote

This plugin provides a widget which displays a simple login box. The widget is only shown to users which are logged out.

The widget has a few options: You can set the size of the input fields; you can enter a title which is shown at the top of the widget (defaults to "Login form"); finally, you can display a "Lost password?" link after the password input field.
The widget with all features enabled looks like this:


The widget has been tested with b2evolution 2.4.x.

Get it here (and have fun).

Tip: You can remove possible borders around the fieldsets by adding the following code to your CSS file:
Code:
.widget_plugin_ax86_loginbox fieldset
{
    border: none;
}

_________________
ax86.net weblog (mostly German)
Join our IRC channel: irc://chat.freenode.net/#b2evolution (Webchat here)


Last edited by Tblue on Sat Jan 17, 2009 16:29; edited 4 times in total
Back to top
View user's profile Send private message Visit poster's website
tilqicom
Guru
Guru

Joined: 14 Nov 2007
Posts: 1624
Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8Reputation: 6.8 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 20

PostPosted: Sat Nov 22, 2008 16:20    Post subject: Reply with quote

thanks cool one, it shouldnt be needed as a plugin already i believe , useful enough though, sorry for such a late reply, i even couldnt find time to stop by for a thank you (:
_________________


.: linkback ≠ spam, yes to linkback, no to spam Shy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fugfuggy
New Poster
New Poster

Joined: 18 Nov 2008
Posts: 27
Reputation: 2.4Reputation: 2.4 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Wed Nov 26, 2008 11:43    Post subject: Reply with quote

nice little widget for a multi user site. How hard would it be to include a "remember me" checkbox?
Back to top
View user's profile Send private message
¥åßßå
Blonde Bimbo

Joined: 07 Jan 2005
Posts: 6579
Reputation: 29.5Reputation: 29.5Reputation: 29.5 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 115

PostPosted: Wed Nov 26, 2008 11:47    Post subject: Reply with quote

evo will remember you for years .... unless you log out Wink

¥

_________________
I may have opened the door but you entered of your own free will
normal life wrote:
yabba_hh: I think, I type, I read what I type, I think "fuck, what was I thinking when I typed that?!"
tuxnus: that's two more thoughts than I give you credit for
Back to top
View user's profile Send private message Visit poster's website
krao69
New Poster
New Poster

Joined: 25 Aug 2008
Posts: 20
Reputation: 14.7 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Sun Feb 01, 2009 9:06    Post subject: Reply with quote

Thanks for this plugin !!!

If somebody is interested, i have made some modification on this plugin to show avatar and Edit profil in case of the user is login :
just replace :
PHP:
if ( is_logged_in() )
{} 

by :
PHP:
        if ( is_logged_in() )
        {
            echo 
'<div class="image_block">';
            if ( isset(
$GLOBALS['avatars_Plugin']) )
            {
                
$GLOBALS['avatars_Plugin']->display_avatar( array(
                    
'type' => 'user',        // Avatar type.
                    
'id' => '',              // Optional ID. Example: 'id' => 3,
                                             // to display avatar of user/post/category/blog #3
                    
'before' => '<div>',     // Before image block.
                    
'after' => '</div>',     // After image block.
                    
'style' => '',           // Image style e.g. margin:5px.
                
));
            }
            
$redir_url url_rel_to_same_hostregenerate_url'''''''&' ), $htsrv_url_sensitive );
            echo 
'<a href="'.$Blog->get('url').'?disp='.'profile&amp;redirect_to='.rawurlencode$redir_url ).'">'.T_'Edit your profile' ).'</a>';

            echo 
'</div>';
            return;
        } 


and more simple, add a register link whan the user isn't logged :

PHP:
        echo '<div>';
        echo 
'<a href="'.$htsrv_url_sensitive.'register.php?redirect_to='.rawurlencode$redir_url ).'">'.T_'Register form' ).'</a>';
        echo 
'</div>'


You can download my version here : http://kraolil.hd.free.fr/medi...plugin.zip
Back to top
View user's profile Send private message
pansygal2
New Poster
New Poster

Joined: 11 Sep 2009
Posts: 4
add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Fri Sep 11, 2009 15:51    Post subject: Reply with quote

I'm able to get the plugin to work and even have the borders removed. But I can't get krao69's coding to work. I'm putting it in loginbox.plugin.php, is that correct? And where do you put the coding to add a register link? Thanks for any help given! Smile
Back to top
View user's profile Send private message
wowgold365
New Poster
New Poster

Joined: 15 Sep 2009
Posts: 1
add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Tue Sep 15, 2009 3:17    Post subject: Reply with quote

Nick off Spammer
Back to top
View user's profile Send private message
krao69
New Poster
New Poster

Joined: 25 Aug 2008
Posts: 20
Reputation: 14.7 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Tue Sep 15, 2009 6:21    Post subject: Reply with quote

Sorry my site is down for the moment ... that's why you can't get source code.

I use it on version 2.4 not on 3 for information.
Back to top
View user's profile Send private message
pansygal2
New Poster
New Poster

Joined: 11 Sep 2009
Posts: 4
add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Tue Sep 15, 2009 14:26    Post subject: Reply with quote

OK, thanks for the info krao69.
And what's with the Nick off Spammer? I just joined this forum and don't understand all the lingo.
Back to top
View user's profile Send private message
John
the uncertain

Joined: 22 Jun 2004
Posts: 2147
Reputation: 4.6Reputation: 4.6Reputation: 4.6Reputation: 4.6 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 27

PostPosted: Tue Sep 15, 2009 14:38    Post subject: Reply with quote

@pansygal2...
the "nick off spammer" bit replaced a post with about 75 links to nothing to do with b2evolution and everything to do with spam.

_________________
See the Sites in in Venice
Back to top
View user's profile Send private message Visit poster's website
EdB
/bb|[^b]{2}/

Joined: 05 Jan 2004
Posts: 7123
Reputation: 140.9 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 90

PostPosted: Wed Sep 16, 2009 9:13    Post subject: Reply with quote

That's why I delete 'em or move 'em to the spamhaus.

It's like if your dog craps on the floor do you put a paper towel over it and leave it there?
Back to top
View user's profile Send private message
ferevo
New Poster
New Poster

Joined: 15 Jan 2008
Posts: 18
Reputation: 20.8Reputation: 20.8 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Thu Sep 17, 2009 19:10    Post subject: Login box widget in b2evolution 3.3 Reply with quote

Does anybody know Where can I find Login box widget for b2evolution 3.3?
Back to top
View user's profile Send private message
krao69
New Poster
New Poster

Joined: 25 Aug 2008
Posts: 20
Reputation: 14.7 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Fri Sep 18, 2009 4:21    Post subject: Reply with quote

I don't know if there is a 3.3 compatible version of this widget.
Back to top
View user's profile Send private message
springhot
New Poster
New Poster

Joined: 22 Jan 2010
Posts: 2
add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Fri Jan 22, 2010 6:44    Post subject: Reply with quote

You will have to make a few changes to make it compatible with the new version.

1. Put the _loginbox.plugin.php inside your plugins folder.

2. Open the messages.pot file inside the locales folder which is included in the zip file and make a few changes. Copy and paste into the original file on your server in the same location. Code should look like this:
Code:
#: ../../../plugins/_loginbox.plugin.php:35
msgid "Provides a widget which displays a simple login box."
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:78
msgid "Lost password ?"
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:87
msgid "Login"
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:88
msgid "Password"
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:89
msgid "Log in!"
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:147
msgid "Box title"
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:148
msgid "Login form"
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:150
msgid "The title to display at the top of the box."
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:153
msgid "Display \"Lost password?\" link"
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:158
msgid "Size of username input field"
msgstr ""

#: ../../../plugins/_loginbox.plugin.php:166
msgid "Size of password input field"
msgstr ""


3. Do the same with the _global.php file inside the de_DE folder. I suggest do a find and only add the lines that are needed as a few of them are all ready included.

4. Then go to the LC_MESSAGES folder and open messages.po and only add in the changed code:
Code:
#: ../../../_loginbox.plugin.php:35
msgid "Provides a widget which displays a simple login box."
msgstr "Stellt ein Widget bereit, das eine einfache Loginbox anzeigt."

#: ../../../_loginbox.plugin.php:78
msgid "Lost password ?"
msgstr "Passwort vergessen?"

#: ../../../_loginbox.plugin.php:87
msgid "Login"
msgstr "Benutzername"

#: ../../../_loginbox.plugin.php:88
msgid "Password"
msgstr "Passwort"

#: ../../../_loginbox.plugin.php:89
msgid "Log in!"
msgstr "Einloggen"

#: ../../../_loginbox.plugin.php:147
msgid "Box title"
msgstr "Boxtitel"

#: ../../../_loginbox.plugin.php:148
msgid "Login form"
msgstr "Login"

#: ../../../_loginbox.plugin.php:150
msgid "The title to display at the top of the box."
msgstr "Der Titel, der über der Box angezeigt werden soll."

#: ../../../_loginbox.plugin.php:153
msgid "Display \"Lost password?\" link"
msgstr "\"Passwort vergessen?\"-Link anzeigen"

#: ../../../_loginbox.plugin.php:158
msgid "Size of username input field"
msgstr "Größe des Benutzername-Feldes"

#: ../../../_loginbox.plugin.php:166
msgid "Size of password input field"
msgstr "Größe des Passwortfeldes"


5. In your admin panel activate the widget and log out to see what it looks like.

6. Make additional changes to css file to make it look how you want.

I got it working this morning while trying to wake up and enjoy my coffee....so if I missed something I apologize. I'm not completely awake yet and this is the first time I've messed with this application.
Back to top
View user's profile Send private message
jmcausing
Hooked :)
Hooked :)

Joined: 12 Mar 2010
Posts: 165
Reputation: 54.1Reputation: 54.1Reputation: 54.1Reputation: 54.1Reputation: 54.1 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 3

PostPosted: Fri Mar 19, 2010 5:39    Post subject: Reply with quote

thank you
_________________
www.jmcausing.tk powered by www.b2evolution.net
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Plugins & Extensions All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
b2evolution Support Forum RSS Feed Forums powered by php Bulletin Board