vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Login Popup - Adds a DHTML popup login form w/ forgotten password & register links (https://vborg.vbsupport.ru/showthread.php?t=158473)

Analogpoint 09-21-2007 10:00 PM

Login Popup - Adds a DHTML popup login form w/ forgotten password & register links
 
I'm releaseing another mod I made for my boards, if it's useful to anyone else, that's great!

This adds a DHTML popup menu with the login form, a link to the register form and a link to recover a password. This product degrades gracefully: if DHTML popups are not available, or you disable the product, it reverts to the default vB login form in the navbar.

http://www.analogpoint.com/static/im...screenshot.png

There are admin options to enable/disable the product, and to auto display the popup or not (auto display will only work in vB 3.6.8 +).

The product adds a phrase, two temlpates and the admin options.

Installation
- Import the XML file in the Product Manager.
- One template edit is necessary to hide the default vB login form, instructions are included in the download.

History:
v. 1.0.0 initial release.

Analogpoint 09-22-2007 04:24 PM

<font color="Red">* Analogpoint reserves</font>

muratksk 09-22-2007 04:29 PM

thanks :)

yahoooh 09-23-2007 04:47 AM

thanks

rayw 09-23-2007 06:52 AM

That is a nice idea. Might give this ago later. Thanks a lot. :)

SuperTaz 09-23-2007 07:04 AM

Nice. Installed

Triky 09-23-2007 11:05 AM

Installed. :)

yoyoyoyo 09-23-2007 11:30 AM

excellent! thanks much

Mrdby 09-23-2007 12:50 PM

Can you make a pop up messages for all guest too?

Snake 09-23-2007 09:26 PM

Thanks for this!

Bacon Butty 09-23-2007 11:42 PM

Thanks. I installed it and it works great, however would it be possible to make the pop up menu work when an image is clicked, rather than the text 'Log In'

I intend on creating an image map at the top of my forums and would be ideal if I could create a 'login' image which when clicked causes the DHTML popup login form to appear.

I'd assume I need to figure out how to image hyperlink $loginlink ?

ngham4host 09-24-2007 01:54 AM

thanks

AzaDiyaR 09-24-2007 01:56 AM

http://www.azadiyar.com/Forum/index.php?langid=1

this workin for me thank you for this :D

Smoothie 09-24-2007 02:20 AM

ok, it's me again. LOL I added this and it works great. But, since it's in my header and I need to add the | between the links and I don't want the | to show when the login popup isn't there, like when you are actually logged in. Where in the code could I add this to accomplish this? Hope you understand the jibberish I just wrote. :)

NoDRaC 09-24-2007 08:58 AM

hi thanks this is good hack for my desing i am changing header system. I will setup this hack this night.
www.arkasokak.net/forum.html

Bacon Butty 09-24-2007 01:55 PM

I've just photo shopped what it is I need to achieve because I dont think I explained it to well earlier.

http://img517.imageshack.us/img517/7...otoshopqf8.jpg

When the 'login' image is clicked i'd like the login DHTML menu to open, could anyone tell me how to achieve this?

Analogpoint 09-24-2007 02:56 PM

Quote:

Originally Posted by Mrdby (Post 1345142)
Can you make a pop up messages for all guest too?

That's not really in the scope of this modification, although if you take another stab at explaining exactly what it is you want to accomplish, I'll reconsider.

Quote:

Originally Posted by Smoothie (Post 1345624)
ok, it's me again. LOL I added this and it works great. But, since it's in my header and I need to add the | between the links and I don't want the | to show when the login popup isn't there, like when you are actually logged in. Where in the code could I add this to accomplish this? Hope you understand the jibberish I just wrote. :)

Hey, nice to see ya. Here you go: Edit the login_popup_link template, which has the following contents, the pipe is shown in red. (right after the link).
Code:

<if condition="$show[guest]">
<if condition="$vboptions[login_popup_autodisplay]">
        <td class="vbmenu_control">
</if>
                <a id="navbar_login" href="$vboptions[forumhome].php$session[sessionurl_q]">$vbphrase[log_in]</a> | <script type="text/javascript"> vbmenu_register("navbar_login"); </script>
<if condition="$vboptions[login_popup_autodisplay]">
        </td>
</if>
</if>

Quote:

Originally Posted by Bacon Butty (Post 1345522)
Thanks. I installed it and it works great, however would it be possible to make the pop up menu work when an image is clicked, rather than the text 'Log In'

I intend on creating an image map at the top of my forums and would be ideal if I could create a 'login' image which when clicked causes the DHTML popup login form to appear.

I'd assume I need to figure out how to image hyperlink $loginlink ?

Quote:

Originally Posted by Bacon Butty (Post 1346024)
I've just photo shopped what it is I need to achieve because I dont think I explained it to well earlier.

http://img517.imageshack.us/img517/7...otoshopqf8.jpg

When the 'login' image is clicked i'd like the login DHTML menu to open, could anyone tell me how to achieve this?

I think I understand what you want...

#1 - Add a div element to your header or navbar template, wherever you have the image that says register in the middle and login on the right. The div element you add will be something like this:

Code:

<div id="alt_login_link" style="border:1px solid red;float:right;width:300px;height:90px;">
&nbsp;
</div>

It's just an empty div that's going to float over the top of where the image says 'login'. Right now it has a red border so you can see where it is, and you can adjust the height and width to what you want so it is centered over the word 'login', then you can remove the red border by removing border:1px solid red;.

#2 - Add the following javascript the the very bottom of your footer template: This makes the above div clickable.

Code:

<script type="text/javascript">

var alt_login_link = document.getElementById('alt_login_link');
alt_login_link.onclick = function(e)
{
        var menuid = 'navbar_login';
        var menuel = document.getElementById('navbar_login');
        if(typeof do_an_e == 'function')
        {
                do_an_e(e);
                if(vBmenu.activemenu == null || vBmenu.menus[vBmenu.activemenu].controlkey != menuid)
                {
                        vBmenu.menus[menuid].show(menuel);
                }
                else
                {
                        vBmenu.menus[menuid].hide();
                }
        }
}

</script>

That should do it for you, I just tested it on a new installation of vB 3.6.8.

Bacon Butty 09-24-2007 03:38 PM

Thanks very much for trying to help but I dont seem to be having much luck.

I have inserted the footer code but I think my problem lies with the DIV code am entering. Am not entirely sure how to display it so that it covers the image correctly. At the moment the div code am using below forces the image out of place

Currently the code I have on the FORUMHOME template is;
<div id="alt_login_link" style="border:1px solid red;float:right;width:300px;height:90px;">
&nbsp;
<img src="img" border="0">
</div>

The above code causes this...

The whole image is hyperlinked and forced out, when I remove the div code the image sits comfortably at the top.
http://img523.imageshack.us/img523/332/94371542bv8.jpg

When the red square/image is clicked, the login box appears below the login text rather than below the red square
http://img515.imageshack.us/img515/23/65477701rj4.jpg

If its easier I could provide you with a login?

howiulf 09-24-2007 04:32 PM

another nice hack!

Thank you

Me klicks install! :up:

Smoothie 09-24-2007 08:20 PM

Analogpoint,

Thank you, works perfectly. I asked the same question regarding the pipe not showing in your other mod, the forumjump menu. Maybe when you have time you could let me know what I need to edit.

Analogpoint 09-25-2007 12:35 AM

Quote:

Originally Posted by Bacon Butty (Post 1346094)
Thanks very much for trying to help but I dont seem to be having much luck.

snip

Put the div before the image:

Code:

<div id="alt_login_link" style="border:1px solid red;float:right;width:300px;height:90px;">
&nbsp;
</div>
<img src="http://www.grandoldteam.com/images/topbar.png" border="0">

As for the login popup showing up under the navbar link, that's where it will be. Clicking the div just does the same as clicking the log in link in the navbar. Give it a try and see what you think.

Bacon Butty 09-25-2007 09:02 AM

Still no luck Analog,

http://img101.imageshack.us/img101/2118/topsx7.jpg

Hmm, all I want is for a login image (probably imagemapped) to either link to an actual login page or more ideally prompt a login box.

Thanks for helping, much appreciated.

Analogpoint 09-25-2007 01:58 PM

Quote:

Originally Posted by Bacon Butty (Post 1346665)
Still no luck Analog,

http://img101.imageshack.us/img101/2118/topsx7.jpg

Hmm, all I want is for a login image (probably imagemapped) to either link to an actual login page or more ideally prompt a login box.

Thanks for helping, much appreciated.

I haven't worked with imagemaps before, so can't give you any advice about them. What I would do for this is slice your image in 2 pieces. #1 the left 3/4 of the current image, with the register link in the middle, #2 the right 1/4 of the image with the word login. Then put them in a table:

Code:

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td>
      <img src="left-side.png" border="0" />
    </td>
  </tr>
  <tr>
    <td>
      <img src="right-side.png" border="0" id="alt_login_link" />
    </td>
  </tr>
</table>

Have the id="alt_login_link" on the right hand image, so clicking it will activate the login box.

I would also wrap the whole shebang in a conditional:

Code:

<if condition="$show[guest]">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>
        <img src="left-side.png" border="0" />
      </td>
    </tr>
    <tr>
      <td>
        <img src="right-side.png" border="0" id="alt_login_link" />
      </td>
    </tr>
  </table>
<else />
 // show a different image to logged in members
</if>

So it only gets show to people who aren't logged in. You could make another image to show to logged-in users (maybe with links to their profile or something.)

yoyoyoyo 09-25-2007 03:37 PM

I had problems with this hack in vbadvanced when trying to login from the portal index page, but I fixed it by adding my forum url to the 2 instances of login.php in the product. So, if anyone is having the same problems there is a quick fix.

Bacon Butty 09-25-2007 03:53 PM

Works a treat!, thanks a lot for your help.

Fantastic mod. *clicks to nominate for mod of the month*

Analogpoint 09-25-2007 04:34 PM

Quote:

Originally Posted by Bacon Butty (Post 1346885)
Works a treat!, thanks a lot for your help.

Fantastic mod. *clicks to nominate for mod of the month*

I just visited your forum and there's one last thing I would do. Add the following to the right hand image, so that the mouse pointer will change to a hand over the image.

Code:

style="cursor:pointer;"
Like this:
Code:

<img src="right-side.png" border="0" id="alt_login_link" style="cursor:pointer;" />

Bacon Butty 09-25-2007 07:43 PM

Thanks again Analog. Support you have provided is fantastic.

Feel free to use my site as an example of whats possible with the mod.

zero_ZX 12-30-2007 08:41 AM

cant get this to work :( now it doesnt even show the login box or the popup login :(

dartho 01-21-2008 05:28 AM

This looks good!

You should probably say "install it, test it and you will find out" (which I will likely do before you reply anyway) but what screen appears when it 'degrades' ?

jGas 03-06-2008 04:05 PM

many thanks..i'm testing it right now and it works great!

jGas 04-26-2008 02:05 PM

i have a problem with this addon and internet explorer.

running VB 3.7 RC4, internet explorer gives me an error (look at the iamge please!)

how can i fix it?

Chadi 05-15-2008 07:15 PM

Anyone know how to get an small (16x16px) image icon vertically aligned with the text?

Current code used

Code:

<if condition="$show[guest]">
<if condition="$vboptions[login_popup_autodisplay]">
    <td class="nav_menu_control">
    <img src="images/key.png" align="Member Login" />&nbsp;
</if>
        <a id="navbar_login" href="$vboptions[forumhome].php$session[sessionurl_q]">$vbphrase[log_in]</a>
        <script type="text/javascript"> vbmenu_register("navbar_login"); </script>
<if condition="$vboptions[login_popup_autodisplay]">
    </td>
</if>
</if>

The first one is the icon at 12px x 12px, the 2nd at 16px x 16px.

Notice the text is lowered when an icon is inserted. I've tried various methods, even div tag to no avail.

Chadi 06-11-2008 12:13 AM

How do I change the location of where this shows up in the navbar? I could not find the actual template (even navbar) to do this.

edgeyveggie 06-12-2008 12:21 AM

Quote:

Originally Posted by zero_ZX (Post 1411808)
cant get this to work :( now it doesnt even show the login box or the popup login :(

Same, no idea why either.. wtf..

edgeyveggie 06-12-2008 12:28 AM

Quote:

Originally Posted by yoyoyoyo (Post 1346870)
I had problems with this hack in vbadvanced when trying to login from the portal index page, but I fixed it by adding my forum url to the 2 instances of login.php in the product. So, if anyone is having the same problems there is a quick fix.

Can you explain how you did this more? I don't understand, I"m having the same problem I think.

Darkstarproject 06-12-2008 01:59 AM

*edit*

I removed the box on my forums, enabled this hack, modified my navbar to show the login, works perfect.

Chadi 06-19-2008 04:14 PM

Quote:

Originally Posted by chadi (Post 1546246)
How do I change the location of where this shows up in the navbar? I could not find the actual template (even navbar) to do this.

Would appreciate help on this.

Chadi 07-19-2008 02:02 PM

Would appreciate help on this

M.C. 01-20-2009 02:24 AM

Having problems with login with that mod in vB 3.8.0 & vBadvanced 3.1.0 if login from vBadvanced homapage it says error 404 as it's not changin path from login.php to forum/login.php as it vB original form does.

Sunsetblue 01-25-2009 05:48 AM

Quote:

Originally Posted by Darkstarproject (Post 1547212)
*edit*

I removed the box on my forums, enabled this hack, modified my navbar to show the login, works perfect.

Can you please explain how you modifiyed the navbar? Dis you do something besides adding the lines of code suggested in the "readme file"? Or can the creator of this mod please chime in. I am having the same problem others are. When clicking on the login the drop down box does appear, as does "register for a free account" and "forgotten password" but the user name and password and login boxes to go with them are not there? I'm not sure how this happened, how to make those fields appear?

Also next to the login link there is a arrow to open the drop down box, for some reason I have 2 arrows there. I'd like to only have one, help please. :confused:

I have vb 3.8


All times are GMT. The time now is 05:02 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.01626 seconds
  • Memory Usage 1,839KB
  • 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
  • (9)bbcode_code_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete