Updates from jtsternberg Toggle Comment Threads | Keyboard Shortcuts

  • jtsternberg 5:42 pm on December 3, 2013 Permalink | Reply  

    Hey guys, How do we feel about having a textarea in the left column (http://vip.files.wordpress.com/2013/03/screenshot_3_19_13_2_12_pm.png) for pasting ad codes that are provided by dfp, etc, that would then be parsed by ACM to get the Tag/Publisher ID automatically?

    Tag ID
    Publisher ID

    OR
    Paste ad code:

     
  • jtsternberg 9:41 pm on November 12, 2012 Permalink | Reply
    Tags: ajax   

    Looking to update the ads via ajax, and stumbled onto the fact that the do_action will not work within an ajax call. Daniel reminded me that that is because the do_action() is dependent on the context (e.g. which post is loaded or the page that the ad is on). Would be great to be able to individually call (to update, or place the ad after the page has loaded) an ad code this way. Thoughts?

     
    • Rinat K 9:46 pm on November 12, 2012 Permalink | Reply

      The workaround woud be to make a separate template with an ad code call and then just fetch the page with AJAX.

      • jtsternberg 9:56 pm on November 12, 2012 Permalink | Reply

        But I would need the same conditionals to apply to this faux page that apply to the originating page. I.e. If I chose “is_home” as a conditional, and then reload the ads the way you’re suggesting, the same conditionals won’t apply (since a separate template is not, obviously, the home page). Am I missing something?

        • Rinat K 10:06 pm on November 12, 2012 Permalink

          Well, nothing restricts you to add another conditional to home page ad tag that’ll match with this faux page. This approach is tested and works. The other way around would be calling the rendering method directly, but that probably wouldn’t work since there’s a bunch of hooks that are probably won’t get fired in AJAX context. Pull requests are always welcome 🙂

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel