vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   [Solved] Google Custom Search Engine (HTTPS) (https://vborg.vbsupport.ru/showthread.php?t=324908)

Stratis 04-12-2017 04:13 PM

[Solved] Google Custom Search Engine (HTTPS)
 
Hi! I was wondering if someone has Google Custom Search Engine as replaced of vb?
I used one here for years but after I changed to https it does not work well.
Firefox does not show anything of results, some other browsers I must click there it says "Show only secure content" every time.


* This I used
https://vborg.vbsupport.ru/showthread.php?t=263440


Checked and test others to, but only the above opens in same page with the CCS of forum skin.


Any suggestions will be appreciated


Thanks...

z3r0 04-12-2017 05:16 PM

In the google template change:-

Code:

<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>
to

Code:

<script type="text/javascript" src="https://www.google.com/afsonline/show_afs_search.js"></script>


and in the navbar Template change:-


Code:

<form action="http://www.yourforum.com/google.php" id="cse-search-box">
to

Code:

<form action="https://www.yourforum.com/google.php" id="cse-search-box">
and

Code:

<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>
to

Code:

<script type="text/javascript" src="https://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>

Stratis 04-12-2017 05:30 PM

Thank you very muck for your answer.
All http was changed to https (This was the first I did)
First very odd that does not work in FireFox and IE11, in Chrome and Edge I must click the button I mentioned. I do not know why this?

Do you use it as https to?

z3r0 04-12-2017 05:38 PM

The best thing to do is use your browser F12 tools and check the console to see what it triggering the mixed content.

Stratis 05-04-2017 04:54 AM

1 Attachment(s)
To close this thread, i did not manage to make Google Custom Search Engine as i had it before, but at least is ok as i managed it know.

What i did for some one else needs:
Find "ad_navbar_below" template

Than copy-paste code that google gives you in the template.
Where 'xxxxxxxxxxxxxxxxxxxxxx' change with your code.
Example:
Code:

<script>
  (function() {
    var cx = 'xxxxxxxxxxxxxxxxxxxxxx';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:search></gcse:search>

With this way you will have both searches. vb & custom.
Attachment 156362

Thanks.


All times are GMT. The time now is 02:41 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.01198 seconds
  • Memory Usage 1,723KB
  • 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
  • (7)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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