View Single Post
  #18  
Old 09-24-2007, 02:56 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mrdby View Post
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 View Post
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 View Post
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 View Post
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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02339 seconds
  • Memory Usage 1,785KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete