I just tested this module, great.

Drupal 4.7, even with taxonomy_theme!

Random works pretty well.

I have put the bluemarine theme on those two pages and want to show two different logo.

http://www.alexandreracine.com/demo/page1
http://www.alexandreracine.com/demo/page2

But can't figure out what to put in the config of the logotool module or something is not working.

The display mode is "specified" and I have try this for the rest :

http://www.alexandreracine.com/demo/page1|salsamontreal.com-2003.jpg
http://www.alexandreracine.com/demo/page2|logosalsamontreal2006.jpg

and

page1|salsamontreal.com-2003.jpg
page2|logosalsamontreal2006.jpg

and

demo/page1|salsamontreal.com-2003.jpg
demo/page2|logosalsamontreal2006.jpg

I can do some tests...

Comments

pobster’s picture

This is correct:

demo/page1|salsamontreal.com-2003.jpg
demo/page2|logosalsamontreal2006.jpg

What actually gets displayed? An error message logo or your default logo? You have remembered to point your bluemarine themes logo to "logotool/logo" haven't you?... Also, do these logos display fine in random mode?

...I have to admit though, I am unaware of any taxonomy_theme module and so this module is completely untested with it... :o(

Here's something you can try... On a test page, use 'php filter' and enter this:

print $_GET['q'];

And let me know the result.

Thanks

Pobster

pobster’s picture

Incidentally... Make sure the version you're using is 1.6 (specified near the top of the module)

Pobster

alexandreracine’s picture

There is no error message, but the default logo (misc/druplicon.png) is showing.

All other config are ok since the random logo works...

And it is the 1.6 version.

The result of the code you showed is "node/14" for this address : http://www.alexandreracine.com/demo/page1

If I change the config for this :
demo/page1|salsamontreal.com-2003.jpg
demo/page2|logosalsamontreal2006.jpg
demo/node/14|salsamontreal.com-2003.jpg

Now the page1 works... (but it is the node/14 that make it work)

I don't think that the taxonomy-theme is the cause, since it is only changing the theme for some nodes, and that theme is configure to use logo-tool.

But I am using the friendly url...

pobster’s picture

Hellooooo

Nah it's an issue with aliases - and it doesn't sound like it's something fixable... I'm afraid you'll have to enter the pages as $_GET['q'] dictates. It's not a bug or an error, it's 'how it is'... I (think?) can only tell what page is being displayed by using $_GET['q'] and matching this against the entries.

...I'm starting to think this module is a baaaaaaad idea... Might remove it soon. I'm having caching issues myself...

Pobster

alexandreracine’s picture

Hi Paul,

Well, if I look into stuff like the views module, they must have some way to cache the pages and to use the alias url.

I think that your module is a good module and a good idear, well... since it was my idear. I can't code, but I can help you with testing, and as you can see I can find bugs ;)

I'll ask Earl Miles (http://drupal.org/user/26979 creator of views) if we wants to help a little about it. The community is there to help! :)

pobster’s picture

Status: Active » Fixed

Actually I've just fixed that...

/**
 * Implementation of hook_init
 */
function logotool_init() {
  switch (variable_get('logotool_display', 0)) {
    case '0':
      variable_set('logotool_logo', variable_get('logotool_path', 'misc/druplicon.png'));
      break;
    case '1':
      $logos = file_scan_directory(variable_get('logotool_folder', LT_CWD), '.*', array('.', '..', 'CVS', 'placelogosinhere'));
      variable_set('logotool_logo', array_rand($logos));
      break;
    case '2':
      $path = str_replace(array('/'), array('\/'), $_GET['q']);
      preg_match("/$path\|.*/", variable_get('logotool_pages', ''), $match);
      if (!$match) {
        $path = str_replace(array('/'), array('\/'), drupal_get_path_alias($_GET['q']));
        preg_match("/$path\|.*/", variable_get('logotool_pages', ''), $match);
      }
      if ($match) {
        $logo = trim(variable_get('logotool_folder', LT_CWD).'/'.substr($match['0'], strpos($match['0'], '|')+1));
        variable_set('logotool_logo', $logo);
      }
      elseif ($_GET['q'] != 'logotool/logo') {
        variable_set('logotool_logo', variable_get('logotool_path', 'misc/druplicon.png'));
      }
      break;
  } // end switch
} // logotool_init

I'll upload a new release once I've ironed out a few other things that have been bothering me...

Pobster

pobster’s picture

Status: Fixed » Closed (fixed)
alexandreracine’s picture

Yep. I confirm that this bug is fixed.