vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Problems with the ?Name Suggestion? Autocomplete Javascript Functionality (https://vborg.vbsupport.ru/showthread.php?t=267136)

st@rsky 07-20-2011 12:55 PM

Problems with the ?Name Suggestion? Autocomplete Javascript Functionality
 
1 Attachment(s)
Hi Guys!

I'm customising my "pm_newpm" template and everything is working properly except for one little issue which is the position of the name suggestion table.

For this part I'm still using the custom functionality of vB but when the suggestion comes up the position is wrong. I've tried to modify the CSS and the javascript files without any positive result.

Do know where the position is declared, as I’ve said, it isn't in the CSS or JS files. Attached is an image demonstrating what I am seeing currently.

Can anyone help?

Many thanks in advance,

Antonio

kh99 07-20-2011 01:29 PM

I think it's this section from the pm_newpm template:

HTML Code:

<div class="vbmenu_popup" id="pmrecips_menu" style="display:none; z-index:50"></div>
                                                <script type="text/javascript">
                                                <!--
                                                vbmenu_register('pmrecips', true);
                                                recip_sugg = new vB_AJAX_NameSuggest('recip_sugg', 'pmrecips_txt', 'pmrecips');
                                                <if condition="$show['sendmultiple']">
recip_sugg.allow_multiple = true;</if>
                                                //-->

                                                </script>

I believe it's the location of the <div class="vbmenu_popup" id="pmrecips_menu"... </div> that determines where the popup appears.

EquinoxWorld 07-20-2011 07:55 PM

I am very much interested in utilizing this too on my own mod. Is it as simple as adding the form field between the divs wherever the form is located? Any information on this or any other resources that I can utilize would be very helpful. Sorry for bogarding your thread st@rsky :)

st@rsky 07-21-2011 07:38 AM

1 Attachment(s)
@EquinoxWorld

No problem at all :) You can use name suggestion just replicating the JS function which will manage everything for you. I've done it before and it's quick and easy ;)

@kh99

First of all thanks for your reply.

Sorry but I've not explained my problem clearly.
When the suggestion list came up and I inspect the element the properties are the following

HTML Code:

<div class=”vbmenu_popup” id=”pmrecips_menu” style=”position: absolute; z-index: 50; top: 480px; left: 277px; clip: rect(auto auto auto auto); display: none;”>

I can't find where those properties are defined, I've searched more or less everywhere ,I've also tried to move it manually and to remove the style property using JS but I see no changes. I need it in the right position and I also need to redefine some of the style properties.

Thanks in advance

st@rsky 07-25-2011 11:28 AM

Any news?

kh99 07-25-2011 12:29 PM

The position is set dynamically by javascript that's in clientscript/vbulletin_menu.js, at the time the menu opens. The top is set to the top of a certain object, plus the offsetHeight of that object. Obviously that's not working in your case, but I'm not sure why that would be. Maybe it's using the wrong object for some reason. I'll look at it more, but I wanted to post this in case it gives you an idea.

As far as the other style properties, I think if you list an additional style in the "class" attribute you could add some css to override the color, font, etc.


All times are GMT. The time now is 06:11 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.01596 seconds
  • Memory Usage 1,721KB
  • 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
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete