Announcement

Collapse
No announcement yet.

Code in header when viewing My profile ONLY

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Code in header when viewing My profile ONLY

    Hi All,

    I have the following code appearing in my header when viewing My Profile, only my profile not others. This is for all users, registered, mod and admin.....

    Code:
    ');}else{document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');document.write('');}document.write('');
    I do wish people would update their threads with solutions https://forum.vbulletin.com/forum/vb...my-own-profile

    Using 4.2.5 with PHP 5.6 7.1 and 7.2 it is replicated.

    I have recently commented out some of the old footer links but reversing this makes no difference. I made a small css change to adjust the height of the footer links in the footer links "margin top" by commenting in .footer_links from the existing margin-top: 2px; and adding margin-top: 6px; which has achieved its desired effect

    There is some old comment on this issue about but I would like to get some up to date comment, if available

    Cheers,


    Steve English.

  • #2
    It is JavaScript coming from somewhere. It doesn't exist in a default installation. You would have to search your templates and addons to see if you can find it.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      Originally posted by Wayne Luke View Post
      It is JavaScript coming from somewhere. It doesn't exist in a default installation. You would have to search your templates and addons to see if you can find it.
      Thanks Wayne, any chance of a direction? - I imagine as it is appearing at the very top of the header and when only viewing youw own prifile you may be able to give me a clue or wild guess?

      Cheers,


      Steve

      Comment


      • #4
        It is from a modification of some sort.

        Use a default theme, or look in your edited templates for the code and remove it. Edited templates appear as red or orange in the template list. Orange means the edit is inherited from a parent style.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment


        • #5
          Originally posted by Wayne Luke View Post
          It is from a modification of some sort.

          Use a default theme, or look in your edited templates for the code and remove it. Edited templates appear as red or orange in the template list. Orange means the edit is inherited from a parent style.
          Thank you Wayne, I have a default template and it behaves in the same way. Using the default template I also get the following code on my home page.

          Code:
          ');var sidebar_align='right';var content_container_margin=parseInt('290px');var sidebar_width=parseInt('270px');
          Which I got rid of on my main template

          FORUMHOME

          Update;

          Code:
          document.write('<script type="text/javascript" src="' + yuipath + '/animation/animation-min.js?v={vb:raw vboptions.simpleversion}"></script>');
          To;

          Code:
          document.write('<script type="text/javascript" src="' + yuipath + '/animation/animation-min.js?v={vb:raw vboptions.simpleversion}"></' + 'script>');
          There is some comment that (especially the sidebar) is a FF issue but I am using the latest and experience the issue in Chrome and IE/Edge.

          While viewing Page Source I have the following interesting code i do not understand;

          Code:
          <script type="text/javascript">vbphrase['edit_value_js']="Edit Value";vbphrase['server_failed_respond_try_again']="The server failed to respond in time. Please try again.";</script>
          <script type="text/javascript" src="clientscript/vbulletin_profilefield_edit.js?v=425"></script>
          And;

          Code:
          <script type="text/javascript">settings_string='{\
          
          "-1":"profiletheme_-1"}';current_theme='';var userTheme=new Array();userTheme['customprofileid']='106';userTheme['title']='';userTheme['thumbnail']='';userTheme['userid']='-1';userTheme['themeid']='0';userTheme['title_text_color']='#424242';userTheme['page_background_color']='#ffffff';userTheme['page_background_image']='none';userTheme['page_background_repeat']='repeat';userTheme['module_text_color']='#424242';userTheme['module_link_color']='#ffffff';userTheme['module_background_color']='#869BBF';userTheme['module_background_image']='url(digitalvb/morbid/morbid_base/gradient.png)';userTheme['module_background_repeat']='repeat-x';userTheme['module_border']='#cdcdcd';userTheme['content_text_color']='#424242';userTheme['content_link_color']='#305AA1';userTheme['content_background_color']='#fafafa';userTheme['content_background_image']='none';userTheme['content_background_repeat']='repeat';userTheme['content_border']='#fafafa';userTheme['button_text_color']='#115996';userTheme['button_background_color']='#e9e9e9';userTheme['button_background_image']='url(images/gradients/generic_button.png)';userTheme['button_background_repeat']='repeat-x';userTheme['button_border']='#cdcdcd';userTheme['moduleinactive_text_color']='#424242';userTheme['moduleinactive_link_color']='#424242';userTheme['moduleinactive_background_color']='#f1f1f1';userTheme['moduleinactive_background_image']='url(images/gradients/top-highlight.png)';userTheme['moduleinactive_background_repeat']='repeat-x';userTheme['moduleinactive_border']='#cdcdcd';userTheme['headers_text_color']='#3e3e3e';userTheme['headers_link_color']='#417394';userTheme['headers_background_color']='#f2f6f8';userTheme['headers_background_image']='none';userTheme['headers_background_repeat']='repeat-x';userTheme['headers_border']='#CEDFEB';userTheme['page_link_color']='#305AA1';var select_color_information='Select Color Information';var no_server_response='I did not get a response from the server, so I am not certain whether the data was saved. You can press SAVE again or refresh the page to confirm.';var not_a_valid_color='That is not a valid color setting';var str_OK='Okay';var str_exit='Exit';var str_dont_exit='Don\'t Exit';var profile_reverted_message='Your settings have been reverted to the last saved version.';var nothing_to_revert='There is nothing to revert';var confirm_sitedefault_save='ARE YOU SURE?\\n\\nThis will permanently save the site default. If you continue, anyone who has not customized their profile will get these settings. ';var default_font='verdana, geneva, lucida, \'lucida grande\', arial, helvetica, sans-serif';var fontsizes=new Array();fontsizes['xxsmall']='xx-small';fontsizes['xsmall']='x-small';fontsizes['small']='small';fontsizes['medium']='medium';fontsizes['large']='large';fontsizes['xlarge']='x-large';fontsizes['xxlarge']='xx-large';var show_albums=false;loadVbCss(yuipath+'/slider/assets/skins/sam/slider.css');loadVbCss(yuipath+'/colorpicker/assets/skins/sam/colorpicker.css');loadVbCss(yuipath+'/container/assets/skins/sam/container.css');if(remoteyui&&yuicombopath){document.write('<script type="text/javascript" src="'+yuicombopath+'?2.9.0/build/utilities/utilities.js&amp;2.9.0/build/dragdrop/dragdrop-min.js&amp;2.9.0/build/element/element-min.js&amp;2.9.0/build/slider/slider-min.js&amp;2.9.0/build/colorpicker/colorpicker-min.js&amp;2.9.0/build/container/container-min.js&amp;2.9.0/build/animation/animation-min.js&amp;2.9.0/build/json/json-min.js"></script>');}else{document.write('<script type="text/javascript" src="'+yuipath+'/utilities/utilities.js"></script>');document.write('<script type="text/javascript" src="'+yuipath+'/dragdrop/dragdrop-min.js"></script>');document.write('<script type="text/javascript" src="'+yuipath+'/element/element-min.js"></script>');document.write('<script type="text/javascript" src="'+yuipath+'/slider/slider-min.js"></script>');document.write('<script type="text/javascript" src="'+yuipath+'/colorpicker/colorpicker-min.js"></script>');document.write('<script type="text/javascript" src="'+yuipath+'/container/container-min.js"></script>');document.write('<script type="text/javascript" src="'+yuipath+'/animation/animation-min.js"></script>');document.write('<script type="text/javascript" src="'+yuipath+'/json/json-min.js"></script>');}document.write('<script type="text/javascript" src="clientscript/vbulletin_userprofile.js?v=425"></script>');</script>
          Neither of which appear to be showing when viewing anothers profile but do for all users viewing thier own. Using Veiw selection Source directs me to the lower of the Codes above.

          It still shows with add ons disabled.

          Anyway, thats enough from me for today

          Cheers,


          Steve
          Last edited by Steve English; Thu 28 May '20, 3:16am.

          Comment


          • #6
            I honestly do not know where the code is coming from and won't be able to determine that without access to the server. You'll have to open a support ticket. Something, somewhere in the system has been modified to break things. With vBulletin 4, it could even be a server update.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment


            • #7
              Thanks again Wayne,

              I have removed the code;

              Code:
              ');}else{document.write('');document.write('');document.write('');document.write('');docum ent.write('');document.write('');document.write('');document.write('');}document.write('') ;
              At the Top of my Users Profile page (when viewing own Profile)

              By adding;

              Code:
              ModPagespeedDisableFilters rewrite_javascript
              To my .htaccess file, to stop PageSpeed affecting my Java. I am not sure why this issue only affects ones own profile page but it seems to work?!

              This action also removes the sidebar code from my unadulerated template.

              Having run tests using https://developers.google.com/speed/pagespeed/insights/ there seems not difference with the .htaccess file amended it or not.

              Hope this helps.

              Cheers,


              Steve English.
              Last edited by Steve English; Fri 29 May '20, 4:00am.

              Comment


              • #8
                Probably would have never found this as the Pagespeed module is not a common module and would not have been installed on any of our servers.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                X