Hi,

I have installed the module (the idea is to greet visitors from google and urge them to register), but it doesn't seem to work at all.
I see no difference in pages when I reach them through google, no matter what is the action I set (title, page title, etc.).
Also, in the admin screen, I cannot access my old rules, but can only create a new rule - is that normal behavior of the module?

Thanks for your help.

CommentFileSizeAuthor
#6 google_keyhaviour_screenshot.JPG50.9 KByossilac

Comments

danielb’s picture

Status: Active » Postponed (maintainer needs more info)

I think if you do not fill in at least one keyword, the rule will be deleted.

You need the ability to just test for google and not check for google keywords I think. I didn't really think of that. Perhaps when I get time I can redesign.

In the meantime I think you can set the keyword to something like "[not contains] supercalifragilisticexpialidocious" to accept any other keyword. Don't use this example if your site is about Mary Poppins.

Also have you done the thing in template.php that it says in the README file ?

yossilac’s picture

Hi danielb,

Thanks for your quick reply.

I followed your advise, and now the rules do seem to function.
However, I now have some new problems -
I wanted to add a short message in the beginning of each node, basically saying "glad you found content regarding , but you'll get so much more by registering", than give the node content.
So, i chose to prepend the node content with that text, and show all the blocks (site appearance should not be affected other than the added text).
The result, however, was that the entire node text was *replaced* with that text, and all of my blocks vanished (leaving the side bar as a small, empty rectangle). I tried both prepending and appending the node title, with the same effect. Also, the effect was the same when navigating to different pages on the site.

Your help will be appreciated,
Yossi.

danielb’s picture

OK I'm not sure what's happening with the blocks it seems fine on mine, but I did notice some bad code there so I fixed it up.

I have fixed the prepending/appending on the variables title, content, and head title - which turned out to only do replacements.

I have also added permissions so you have to set those up properly to effect the correct user roles, usually anonymous/unregistered (it was annoying to the webmasters etc...)

yossilac’s picture

Hi Daniel,

Thanks! Now it's working fine...

I checked the box saying "do not display blocks" and it displays them fine - either the boxes are crossed, or it's a weird themeing issue (I have a Hebrew, RTL site).
However, I couldn't make the display work. It always disregards the tag.

Also - is it possible to use php in the text I'm prepending to the node content? Would be useful for themeing the message.

Thanks,
Yossi.

danielb’s picture

I checked the box saying "do not display blocks" and it displays them fine - either the boxes are crossed, or it's a weird themeing issue (I have a Hebrew, RTL site).
However, I couldn't make the display work. It always disregards the tag.

I don't have a problem with blocks on mine. One of my biggest worries when making this module was compatibility with themes. Unfortunately I need some more information to solve this, possibly a screenshot of your google keyhaviour settings, and maybe I could try your theme?

Also - is it possible to use php in the text I'm prepending to the node content? Would be useful for themeing the message.

No it's not atm, perhaps in the future.

yossilac’s picture

StatusFileSize
new50.9 KB

Hi danielb,

Attached screenshot. Currently using Cristal4Drupal which I have modified to RTL, but it is the same with GarlandRTL. I don't have any such issues in any of the other modules I use.

danielb’s picture

Title: Doesn't seem to work at all » Block visibility problem with RTL theme

My plan to find a solution - test this module with two different themes, like Garland and GarlandRTL and compare the difference.

danielb’s picture

OK I believe this problem has nothing to do with RTL vs other themes. What it has to do with is how the original function in template.php looked where you made the change.
In many templates the 'return' statement is within another if statement, that prevents it from being called when needed.

For example in GarlandRTL

function _phptemplate_variables($hook, $vars) {
  if ($hook == 'page') {

    if ($secondary = menu_secondary_local_tasks()) {
      $output = '<span class="clear"></span>';
      $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
      $vars['tabs2'] = $output;
    }

    // Hook into color.module
    if (module_exists('color')) {
      _color_page_alter($vars);
    }
    return google_keyhaviour($hook, $vars); 
  }
  return array();
}

That won't work.

it should probably be

function _phptemplate_variables($hook, $vars) {
  if ($hook == 'page') {

    if ($secondary = menu_secondary_local_tasks()) {
      $output = '<span class="clear"></span>';
      $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
      $vars['tabs2'] = $output;
    }

    // Hook into color.module
    if (module_exists('color')) {
      _color_page_alter($vars);
    }

  }
  return google_keyhaviour($hook, $vars);
}
danielb’s picture

Status: Postponed (maintainer needs more info) » Fixed

Going to mark as fixed, if you have similar problems please start a new issue and I'll help you work through it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.