Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

integration

This discussion is related to the Vanoogle addon.
2

Answers

  • Vanoogle inserts js to remove the search form and replace it with itself.
    Do you have a live link to your site where the problem is happening?

    UnderDog
  • @tom762 you may want to return your tpl file to it's original state.

    UnderDog
  • @ddumont My tpl file is in the original state.

    But nothing happened after plugin install.

    I'll send you a link in a private message.

  • @tom762
    I don't see the addon enabled. Is it still installed?

  • @ddumont Yes, it's enabled and CSE ID in place. Just doesn't seem to work.

    If you need any other info, please let me know.

  • @tom762 I don't seem to be getting mention emails... I'll try to check back here more often.

    I'll look again... it doesn't look like the plugin is even being started (it should be injecting script code into the page, but I don't see it loading. What version of Vanilla are you using?

    UnderDog
  • @ddumont I'm using 2.0.18.8

    Could I insert some code manually? If yes, what code and where?

  • @tom762 very strange. It won't output the script if the CSE id is missing... but you said you already made sure that was in the plugin settings and the plugin was enabled.

    On every page, there should be a google script, a vanoogle script and a vanoogle css file inserted into the head tag, but I'm not seeing that on your site.

    Would you mind temporarily granting me admin access so I can look at the settings?

  • Ahh wait... I do see the jsapi script tag, so something is preventing vanilla from finding the script resources from the plugin. Hrmm...

    What's the vanilla relative path (case specific) of the vanoogle plugin javascript file inside the plugin's folder?

  • tom762tom762 New
    edited September 2013

    @ddumont File path is (case sensitive): /plugins/Vanoogle/class.vanoogle.plugin.php

    this is from config.php:

    $Configuration['EnabledPlugins']['Vanoogle'] = TRUE;
    
    $Configuration['Plugins']['Vanoogle']['CSE'] = '0070718862141xxxxxxxx';
    

    Perhaps it has something to do with .htaccess settings?

  • @Todd @lincoln or anyone else who could help....

    In this file, like others, I insert some CSS and JS.
    https://github.com/ddumont/vanoogle/blob/master/src/main/php/class.vanoogle.plugin.php#L76

    The first insert is adding an external file... which I was having doing use the other methods of inserting script.
    The css and js insertions are not working in @tom762 's environment and I'm not sure why. Is there any known issue with the $this->GetResource not working in deployments where the forum is in a subdir instead of located at the root of the domain? It seems like other addons using this code are not having this issue on his site...

    And it works fine on my site, but my forum is located at the root of my domain.

  • peregrineperegrine MVP
    edited September 2013

    Just an idea. Tom could try .... replace around line 76 ....

        $Sender->AddCssFile($this->GetResource('design/vanoogle.css', FALSE, FALSE));
         $Sender->AddJsFile($this->GetResource('js/vanoogle.js', FALSE, FALSE));
    
    try
         // just to see if the conditional config is setup correctly - Plugins.Vanoogle.CSE
          var_dump("loading cs and js");
          $Sender->AddCssFile('vanoogle.css', 'plugins/Vanoogle');
          $Sender->AddJsFile('vanoogle.js', 'plugins/Vanoogle');
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinderUnderDog
  • @peregrine @ddumont I just did what you suggested. On top of the page this shows up: string(17) "loading cs and js". It also overwrites my slightly modified css for input form (width 200px instead of 204px). Other than this, nothing seems different.

  • peregrineperegrine MVP
    edited September 2013

    so can you tell with firefox or your web-developer if the vanoogle.css (which you seem to indicate it does) as well as the vanoogle.js get loaded.

    There seems to be the thought they don't get loaded. If they do get loaded it may be as simple as modifying the two files as necessary.

    or post a link to your site if you don't follow how to see if they get loaded.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited September 2013

    You need to take some screenshots and post the problem as well as some screenshots with firebug output.

    And I don't know if you are embedding your forum or not, but sometimes this creates bizarre issues with positioning, js and frames.

    Also remove any minify type of plugins, caching plugins, pagespeed plugins etc - and clear your ini files in cache.

    see if it works in the no embedding, default theme, no other plugins enabled, and what is your version of vanilla, php and jquery? you may have posted it, but repost with other info after you disable all and goto defaults.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    tom762UnderDog
  • tom762tom762 New
    edited September 2013

    @peregrine I'm more or less a regular computer user, I don't have experience with coding and didn't have to dig into stuff like this before starting with vanilla. I just didn't have to with previous forum.

    Please forgive me for not having all answers to your questions, but I'll try.

    • I think neither vanoogle.css nor vanoogle.js are loading
    • The forum isn't embedded
    • No minify, caching, pagespeed plugins are enabled, here's the list:

      $Configuration['EnabledPlugins']['HtmLawed'] = TRUE;
      $Configuration['EnabledPlugins']['Emotify'] = TRUE;
      $Configuration['EnabledPlugins']['SplitMerge'] = TRUE;
      $Configuration['EnabledPlugins']['Signatures'] = TRUE;
      $Configuration['EnabledPlugins']['Quotes'] = TRUE;
      $Configuration['EnabledPlugins']['MobileDefaultRoute'] = TRUE;
      $Configuration['EnabledPlugins']['AuthorTimeView'] = TRUE;
      $Configuration['EnabledPlugins']['PageNavigator'] = TRUE;
      $Configuration['EnabledPlugins']['OnlyRead'] = TRUE;
      $Configuration['EnabledPlugins']['ExpandableCategories'] = TRUE;
      $Configuration['EnabledPlugins']['WhosOnline'] = TRUE;
      $Configuration['EnabledPlugins']['BotStop'] = TRUE;
      $Configuration['EnabledPlugins']['AllViewed'] = TRUE;
      $Configuration['EnabledPlugins']['ButtonBar'] = TRUE;
      $Configuration['EnabledPlugins']['VanillaInThisDiscussion'] = TRUE;
      $Configuration['EnabledPlugins']['CategoryHeadings'] = TRUE;
      $Configuration['EnabledPlugins']['FileUpload'] = TRUE;
      $Configuration['EnabledPlugins']['Piwik'] = TRUE;
      $Configuration['EnabledPlugins']['VanillaStats'] = TRUE;
      $Configuration['EnabledPlugins']['Pockets'] = TRUE;
      $Configuration['EnabledPlugins']['HideCategory'] = TRUE;
      $Configuration['EnabledPlugins']['LatestPostList'] = TRUE;
      $Configuration['EnabledPlugins']['MaxImageSize'] = TRUE;
      $Configuration['EnabledPlugins']['Tapatalk'] = TRUE;
      $Configuration['EnabledPlugins']['Multilingual'] = TRUE;
      $Configuration['EnabledPlugins']['Vanoogle'] = TRUE;
      $Configuration['EnabledPlugins']['Gravatar'] = TRUE;
      $Configuration['EnabledPlugins']['BAK'] = TRUE;
      $Configuration['EnabledPlugins']['StatisticsFooter'] = TRUE;
      $Configuration['EnabledPlugins']['Flagging'] = TRUE;

    • The default theme is enabled, a bit customized though

    • Vanilla version 2.0.18.8
    • Php version 5.3.25
    • jQuery version ? (don't know where to check that)

    I can't easily disable all plugins, it's a live forum, well visited at any time and will disable all plugins when all other options are gone.

    I'll also send you a link to the forum to a private message.

  • peregrineperegrine MVP
    edited September 2013

    I looked at your site. you have jquery 1.6.2

    the jsapi loads

    vanoogle.css doesn't seem to load - don't know why. (you could add the .css in the script to the bottom of your custom.css (it would do the same thing - just more permanent).

    js/vanoogle.js doesn't seem to load. - it gives me an error when I try to run the code in the console that could be why it doesn't load.

    TypeError: Value not an object.
    [Break On This Error]   
    
    ...ion"))){var a=this.parentElement||this.parentNode;a.insertBefore($("#VanoogleSea...
    
    with(_...],this) (line 2
    

    could be because of all the other "stuff" in your banner. No idea. Back to ddumont

    I used the js and css from version 1.4 of plugin.

    You could also try adding the vangoogle.css lines into your custom.css (as a workaround).

    Maybe @ddumont could run js in console while looking at your site and determine problem.

    might be easier to work with js if it weren't minimized.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Well... I'm not going to contest that there's an error in the js, because I haven't seen it load in place... and that's not really related to why it's not loading at all. In php, the script should be emitted into the head element in the page. It not doing that I think is the first major problem here, and why I wanted to ask @Todd if there was an issue with the API I'm using.

    Even if I had script errors in the js, it should still have a tag on the page for it, but I don't see one.
    Either GetResource can't see my files (which is unlikely... many other plugins are using this) or something else is wrong.. and I don't know what that could be.

  • peregrineperegrine MVP
    edited September 2013

    I'm not arguing with you. Just providing what i saw and why js may not be loading.
    It's over my head.
    If there is a js error for whatever reason, I thought its not going to load at all, but I've been wrong. That's why I tested in console.

    strange that no comments from vanilla developers, unless they are swamped.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I know you weren't. I appreciate the second set of eyes on this, so thank you :)

    peregrineUnderDoghgtonight
Sign In or Register to comment.