Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2014, 09:14 PM
darnoldy darnoldy is offline
 
Join Date: Dec 2004
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default I'm not seeing something here...

Okay, so in the header template that I'm working on (yes, this is usually in the navbar template), I have:
HTML Code:
        <div id="notifications">
            <a href="usercp.php$session[sessionurl_q]"> Foobar $vbphrase[your_notifications]:</a> $notifications_total
        </div>
        <script type="text/javascript"> vBmenu.register("notifications"); </script>
When I display the page, and look at the source, I have:
HTML Code:
        <div style="cursor: pointer;" id="notifications">
             <a href="usercp.php"> Foobar Your Notifications:</a> 1
          <img alt="" title="" src="images/misc/menu_open.gif" border="0"></div>
         <script type="text/javascript"> vBmenu.register("notifications"); </script>
Where did the style in the div tag and the img come from? Its not that I don't want them—I actually want to put the image on another link.
I just can't figure out how they got there.

--don
Reply With Quote
  #2  
Old 06-26-2014, 09:19 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Most likely from either JavaScript, or a plugin modifying the template cache. Sorry, I do not have vb3 setup right now to confirm.
Reply With Quote
Благодарность от:
darnoldy
  #3  
Old 06-27-2014, 03:57 AM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You source code will always show more then what's in the template.
The menu_open.gif is the drop down arrow like the ones in the navbar above.
With notifications, it will only show if you have unread notifications.
Reply With Quote
2 благодарности(ей) от:
darnoldy, tbworld
  #4  
Old 06-27-2014, 08:40 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blind-eddie View Post
You source code will always show more then what's in the template.
The menu_open.gif is the drop down arrow like the ones in the navbar above.
With notifications, it will only show if you have unread notifications.
Really good point, @Blind-eddie.
Reply With Quote
Благодарность от:
blind-eddie
  #5  
Old 06-27-2014, 04:12 PM
darnoldy darnoldy is offline
 
Join Date: Dec 2004
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blind-eddie View Post
The menu_open.gif is the drop down arrow like the ones in the navbar above.
With notifications, it will only show if you have unread notifications.
While both of those things are true, they don't explain why the template is generating the code that it is.

Quote:
You source code will always show more then what's in the template.
Yes, it does. As template variables are replaced by their value (which could be the result of a script running, or the content of another template). There are no variables in these two locations—which is why I'm confused.

--don

Okay...based o your comments, I went back and looked at the navabr of the default skin:

HTML Code:
<td id="usercptools" class="vbmenu_control">
    <a href="$show[nojs_link]#usercptools" accesskey="3">
        $vbphrase[quick_links]
    </a>
    <script type="text/javascript"> vbmenu_register("usercptools"); </script>
</td>
and the source of the element"
HTML Code:
<td style="cursor: pointer;" id="usercptools" class="vbmenu_control">
    <a href="/teach/index.php?nojs=1#usercptools" accesskey="3">
        Quick Links
    </a>
    <script type="text/javascript"> vbmenu_register("usercptools"); </script>
    <img alt="" title="" src="images/misc/menu_open.gif" border="0">
</td>
Maybe it is the javascript that's adding these things (seems an odd approach)! Off to investigate further...
Reply With Quote
Благодарность от:
blind-eddie
  #6  
Old 06-27-2014, 06:08 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Turn off JS in your nrowser and see what you get, it will more likely show you the same look but keep the id=...etc as the css is still used.
Reply With Quote
Благодарность от:
darnoldy
  #7  
Old 06-27-2014, 06:36 PM
darnoldy darnoldy is offline
 
Join Date: Dec 2004
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That did it...when I disabled javascript, the image and the pointer went away...so they are being added by a script! That explains how they got there.
Reply With Quote
  #8  
Old 06-27-2014, 07:26 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad you could read my typo "nrowser" lol
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:01 AM.


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.04146 seconds
  • Memory Usage 2,250KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (6)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete