| View previous topic :: View next topic |
| Author |
Message |
Tblue Hooked :)

Joined: 16 Mar 2008 Posts: 292
  votes: 9
|
Posted: Tue Nov 18, 2008 13:32 Post subject: [Plugin] Login box widget |
|
|
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 |
|
 |
tilqicom Guru

Joined: 14 Nov 2007 Posts: 1624
       votes: 20
|
Posted: Sat Nov 22, 2008 16:20 Post subject: |
|
|
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  |
|
| Back to top |
|
 |
fugfuggy New Poster

Joined: 18 Nov 2008 Posts: 27
  
|
Posted: Wed Nov 26, 2008 11:43 Post subject: |
|
|
| nice little widget for a multi user site. How hard would it be to include a "remember me" checkbox? |
|
| Back to top |
|
 |
¥åßßå Blonde Bimbo
 Joined: 07 Jan 2005 Posts: 6579
    votes: 115
|
Posted: Wed Nov 26, 2008 11:47 Post subject: |
|
|
evo will remember you for years .... unless you log out
¥ _________________ 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 |
|
 |
krao69 New Poster

Joined: 25 Aug 2008 Posts: 20
 
|
Posted: Sun Feb 01, 2009 9:06 Post subject: |
|
|
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_host( regenerate_url( '', '', '', '&' ), $htsrv_url_sensitive );
echo '<a href="'.$Blog->get('url').'?disp='.'profile&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 |
|
 |
pansygal2 New Poster

Joined: 11 Sep 2009 Posts: 4  
|
Posted: Fri Sep 11, 2009 15:51 Post subject: |
|
|
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!  |
|
| Back to top |
|
 |
wowgold365 New Poster

Joined: 15 Sep 2009 Posts: 1  
|
Posted: Tue Sep 15, 2009 3:17 Post subject: |
|
|
| Nick off Spammer |
|
| Back to top |
|
 |
krao69 New Poster

Joined: 25 Aug 2008 Posts: 20
 
|
Posted: Tue Sep 15, 2009 6:21 Post subject: |
|
|
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 |
|
 |
pansygal2 New Poster

Joined: 11 Sep 2009 Posts: 4  
|
Posted: Tue Sep 15, 2009 14:26 Post subject: |
|
|
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 |
|
 |
John the uncertain
Joined: 22 Jun 2004 Posts: 2147
     votes: 27
|
Posted: Tue Sep 15, 2009 14:38 Post subject: |
|
|
@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 |
|
 |
EdB /bb|[^b]{2}/
Joined: 05 Jan 2004 Posts: 7123
  votes: 90
|
Posted: Wed Sep 16, 2009 9:13 Post subject: |
|
|
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 |
|
 |
ferevo New Poster

Joined: 15 Jan 2008 Posts: 18
  
|
Posted: Thu Sep 17, 2009 19:10 Post subject: Login box widget in b2evolution 3.3 |
|
|
| Does anybody know Where can I find Login box widget for b2evolution 3.3? |
|
| Back to top |
|
 |
krao69 New Poster

Joined: 25 Aug 2008 Posts: 20
 
|
Posted: Fri Sep 18, 2009 4:21 Post subject: |
|
|
| I don't know if there is a 3.3 compatible version of this widget. |
|
| Back to top |
|
 |
springhot New Poster

Joined: 22 Jan 2010 Posts: 2  
|
Posted: Fri Jan 22, 2010 6:44 Post subject: |
|
|
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 |
|
 |
jmcausing Hooked :)

Joined: 12 Mar 2010 Posts: 165
      votes: 3
|
|
| Back to top |
|
 |
|