Closed (fixed)
Project:
DART
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2011 at 03:59 UTC
Updated:
12 May 2011 at 20:01 UTC
Jump to comment: Most recent file
The noscript tag is not being rendered in the DART tag output. This is because there is a typo in the noscript variable naming between that in the theme function - template_preprocess_dart_tag() - and that in the template file - dart_tag.tpl.php.
template_preprocess_dart_tag() - $variables['noscript_tag']
dart_tag.tpl.php - $noscript
I'll leave it up to the maintainers to determine which file should be patched.
Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | noscript.patch | 412 bytes | bleen |
Comments
Comment #1
bleen commenteddavmorr ... thanks for all the help the last few days.
Committed this patch to fix this
Comment #2
davmorr commentedGlad to help. Thank you all for the module, it has been a bit of a life-saver for the project I am currently working on. I have actually been learning a lot about leveraging ctools from dissecting the module code. I am finishing up building out an extension module for my client that allows for appending arbitrary terms (as CSV list) to pages (by path) that may not otherwise have an easy way be targeted, such as taxonomy list pages and Panel-based pages.
Ex. (using 'page/path' => 'csv,term,list' convention):
'grooming/hair' => 'comb,haircut,shampoo'renders:
<script src="http://ad.doubleclick.net/...;sz=300x100;tile=0;ord=12345?topic=comb;topic=haircu;topic=shampo;"></script>on the out-of-the-box Vocabulary 'grooming' Term 'hair' taxonomy list page (where 'topic' is the dart_taxonomy_default_key value and the dart_taxonomy_default_callback option value is set to 'truncated', 6 chars, in the variables table).
I'm pretty sure that Panel pages can have taxonomy terms attached by Context, but my initial stabs at this were not producing the intended results; i.e. rendering as topic=[term]. I'm pretty sure that I could hash out the implementation, but thought that from an editorial admin point of view it would be easier to just move this off to an admin tab on the DART settings section. Maybe not the most elegant and Druapllly-fresh approach, but it is easy and straightforward for editors that are intimidated by digging around the Panels config pages. If I can get the okay from the client I will send you the code if you are interested.
Comment #3
bleen commenteddavmorr: this recent feature may be useful to you based on what you're describing above. It may happen too late in teh process, but since its brand new I thought I'd point it out.
The use case that prompted me to add it was that my company wanted to add a random set of key|val pairs to all dart tags across all sites by including a js file at the top of the page and then stuffing a js var in the middle of the key|val pairs within each tag. Problem was that the js var in question included both the keys & the vals and the "=" signs and the ";"s ... so I needed to somehow just jam it in there.
In any event, Ill definitely be interested to see what you put together :)
Comment #4
davmorr commentedbleen: Your use case sounds like a job for JS regex and random() if you are going the JS route to achieve this. :-)
I'm not sure if I described the issue I was addressing properly. I needed to add an easily manageable means for the equivalent of free tagging (arbitrary terms) to taxonomy list pages and Panels-based pages.
As I mentioned previously, I think this is achievable in Panels by starting with the Panel page context, designating a taxonomy association and then some more steps in that direction. I bought Earl Miles' book, 'Drupal Building Blocks' (good stuff), and there is discussion of using taxonomy in Panels, but the steps involved seem like a bit much to hand off to editorial staff who will may be managing taxonomy association-to-content.
Taxonomy term list pages don't have an easy way to associate terms. In a previous version of the DART module, I believe that there was an option for loading the source term into the ad call automatically, but I am not seeing this in v. 2.2. I am doing this manually using the dart_key_vals hook, example below, but it would be nice to have that as an option in the DART module general settings.
The following code should work copy-paste, though I grabbed bits form other functions in my extension module and edited down to consolidate functionality.
Cheers!
Comment #5
bleen commentedI bet if you opened a feature request that this would make it in :) ... In truth I thought I was already doing this when "include taxonomy terms" was checked
Comment #6
davmorr commentedThere is a checkbox option on the tag admin/edit page for "Include taxonomy terms as key|value pairs", but that doesn't seem to pick up the source taxonomy term on taxonomy list pages. I just assumed that was just for terms associated with nodes on the node add/edit admin page. There is no global option, though I guess that if the this was available on a per tag basis it would serve the purpose.
Comment #7
bleen commenteddavmorr... I dont have time to play with this tonight, but take a look at dart_taxonomy.module line 214 ...
Is this not working?
Comment #8
davmorr commentedAh, I see the problem - After dsm'ing all over the place, I realized that the 'dart_taxonomy_map' table is empty. I was busy looking at some other stuff that looked problematic and finally checked that table after addressing those items. I don't understand the purpose of that table*, it seems that relationships could be mapped directly to the taxo-terms without the necessity of a mapping table. I imagine that I'm missing something here, like the tie-in with Taxonomy Manager, but whatever 'it' is really needs to be documented so that whatever is required to populate the 'dart_taxonomy_map' table is a bit more obvious.
*note: I'm sure this has a well thought out and implemented purpose, I just haven't gotten to that point of picking through the code yet - just noticed it tonight. Maybe branching an option for using this feature and simply allowing the natural taxo term association would worth be consideration.
Comment #9
bleen commentedLaunching a site this week so I have very little time to check this out....
Quick note though... the taxonomy map is used to allow a ad ops person to say that termX, termY & termZ should all be included in the DART tags as tag="foo"
This table should not need to populated for the code snippet in #7 to work.
Comment #10
davmorr commentedI know what you mean, sorry to be such a bug in your ear :-)
Re the code in:#7, the $terms var being passed to the foreach from a node is an array of objects. From a taxonomy list page, it is just be handed an object. In PHP5, if you pass an object to a foreach loop, it gets iterated like an array - http://www.php.net/manual/en/language.oop5.iterations.php - which is what is happening here.
Do a 'dsm(gettype($terms));' on line 218 and test on a node page and a taxonomy list page. You can also dsm() $term inside the foreach for kicks.
This can easily be fixed by changing the $terms var from scalar to array in the taxonomy term page conditional:
line 214 (dart_taxonomy.module):
Comment #11
bleen commentedmoving this to #1141652: Taxonomy term is not included in DART tag when on the taxonomy/term/1234 page