Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I made an AHAH-based Ad type switcher. It allows to choose Ad type during the addition step. Sub-content types no more needed to create ads.
Comment | File | Size | Author |
---|---|---|---|
#14 | ad.module.patch | 6.82 KB | neochief |
#9 | ad.module_AHAH_switcher.patch | 6.92 KB | neochief |
#4 | ad_type_switch_0_0.patch | 8.07 KB | neochief |
#3 | ad_type_switch.patch | 8.07 KB | neochief |
#2 | ad_type_switch.patch | 7.58 KB | neochief |
Comments
Comment #1
neochief CreditAttribution: neochief commentedAlso included minor fix for ad_text (see patch's tail).
Comment #2
neochief CreditAttribution: neochief commentedAh, sorry, as ussual, missed some gotcha. Here's a better version.
Comment #3
neochief CreditAttribution: neochief commentedEven better one.
Comment #4
neochief CreditAttribution: neochief commentedPossibly final.
Comment #5
Jeremy CreditAttribution: Jeremy commentedWhen applying this patch, ad creation is overwhelmed with PHP notices which were previously fixed. Some samples:
When I try and select the advertisement type, I get an error too big to display on my screen and the ad type is not selected. It starts as follows:
Finally, the "fix" for the ad_text module seems to be totally unrelated to this patch -- please open a new issue and explain how it is a fix. What problem is it fixing?
Comment #6
Jeremy CreditAttribution: Jeremy commentedThese notices were evidently introduced earlier by me in the 6.x-2.x-dev branch. I am fixing them to address another bug, and hope to commit the fix soon. I will retry your patch at that time.
Comment #7
Jeremy CreditAttribution: Jeremy commentedRepeating my question from before: "the 'fix' for the ad_text module seems to be totally unrelated to this patch -- please open a new issue and explain how it is a fix. What problem is it fixing?"
Comment #8
Jeremy CreditAttribution: Jeremy commentedThis patch still doesn't work -- when I try selecting an ad type, I get a full screen of errors as described above. Note that I have enabled PHP E_ALL, and as the module is nearly 100% working with E_ALL I don't want to fall back to having it not work in this configuration.
I can not merge this patch until it works.
Comment #9
neochief CreditAttribution: neochief commentedI rerolled patch, but I still have nothing with E_ALL enabled. Everything works just fine.
Comment #10
Jeremy CreditAttribution: Jeremy commentedWhen I go to "Create Content -> Advertisement" I see the following:
When I try to actually select an ad type, I get more errors that fits on my screen, and as it's a popup I'm unable to scroll it for all of the errors. They start as follows:
I am unable to select an ad type with this patch applied.
Comment #11
Jeremy CreditAttribution: Jeremy commentedI also note that when I'm at "node/add/ad" if I try and click one of the ad types from the navigation menu this is ignored by the AHA code. If I browse to "node/add/ad/text" I would expect it to give me a form for creating a text ad, but it does not.
Comment #12
Jeremy CreditAttribution: Jeremy commentedEven after disabling E_ALL, I still get the full screen of errors described in #10 above and the AHA ad type selector does not work for me.
Comment #13
Jeremy CreditAttribution: Jeremy commentedComment #14
neochief CreditAttribution: neochief commentedHere's notices fix. As for big error — just clean the drupal cache.
Comment #15
Jeremy CreditAttribution: Jeremy commentedAwesome! It is now working perfectly for me. I update ad.install to automate flushing the cache as this will evidently be necessary for everyone.
Patch committed. Thanks!!
Comment #17
m4oliveiSee #1064940: Ad type AHAH switcher does not pass form through form_alter for an issue that I found with this patch. Any feedback would be appreciated.
Comment #18
bora-89 CreditAttribution: bora-89 commentedhey there,
How about that one: http://drupal.org/node/757124