Updates from January, 2012 Toggle Comment Threads | Keyboard Shortcuts

  • Daniel Bachhuber 6:40 pm on January 31, 2012 Permalink | Reply
    Tags: ,   

    I’d love to get v0.2 tagged this week and loaded into the WP.org plugins repo.

    @rinatkhaziev Are these the two outstanding issues, or would you like to include others?

     
  • Daniel Bachhuber 10:22 pm on January 19, 2012 Permalink | Reply
    Tags: , widgets   

    What do you think about having a widget so you can easily add an ad code to a widgetized area?

     
    • jayabrack 6:32 pm on January 24, 2012 Permalink | Reply

      That’s a great idea.

      • jayabrack 9:48 pm on January 25, 2012 Permalink | Reply

        Hi Guys, Looking at this a little more today. Thinking that jqgid is really good :). I’m wondering if you could provide a slightly more comprehensive example for integration. Signed up for DFP to test but have yet to make the connection. Great job!

      • Daniel Bachhuber 12:22 am on January 28, 2012 Permalink | Reply

        @jayabrack Did you see the rough readme Rinat put together? We’d love to get your feedback on that… should be releasing the plugin in the WP.org directory at v0.2

        • jayabrack 4:12 pm on January 31, 2012 Permalink

          Yes, Thanks Daniel. I did see that. I also just went over to github to grab the implementation provided and am working on displaying ads as we speak.

          Still not fully clear on what the call form the template should be.
          ( lots of ‘print_r’ at the moment 🙂

          Very Nice Job -I’m sure I’ll like it even better once I can successfully implement.

    • Gabriel Koen 8:10 pm on January 27, 2012 Permalink | Reply

      We did that with our custom in-house ad plugin, it works FANTASTICALLY. AdOps is able to easily change out ads, add/remove ads for special occasions, etc. The only problem is we end up with a handful of extra widget areas on our themes (e..g, along with “right rail” we have a bunch of sidebars like “homepage – above first post”, “single – above post”, “single – below post”, etc). On the plus side, all those extra widget areas makes has also been super convenient for other things besides ads, too.

      • Daniel Bachhuber 12:19 am on January 28, 2012 Permalink | Reply

        Neat… any lessons learned you think we should follow? Think Ad Code Manager could be useful to you in the near future?

      • jayabrack 4:20 pm on January 31, 2012 Permalink | Reply

        Looking at this form a content management perpective, Jgrid has ‘draggable’, ‘sortable’and the ability to display drop down menus in fields ( category list ) – Perhaps, with a little modification, the same idea can be taken to a point where we could drag and reorder content for different layout scenarios where each record represented a ‘bucket’ of content…

  • Daniel Bachhuber 6:27 am on January 16, 2012 Permalink | Reply
    Tags: development   

    Made a bit of progress this afternoon and now we have proper methods for registering and presenting ad codes. On the registration side, we need to validate our inputs and then have a method that loads on every page load to register the ad codes stored in our CPTs. On the presentation site, I didn’t implement a priority ranking system and am not sure of the best way to do so.

    In looking through the code, I’ve identified a few things:

    • All AJAX actions should use admin AJAX actions and need to be properly nonced/sanitized
    • Related to above, we need to decouple AJAX actions for creating, editing, deleting, etc. and instead have an AJAX action that accesses a clean method. I’ll try to draft a Lobby doc for this tomorrow.
    • Possible conditionals to show up should be based on $this->whitelisted_conditionals
    • We should abstract the data schema a bit more so we don’t necessarily restrict ourselves to DFP (e.g. table columns should be a filterable class var)

    I’ll be online around 9 am PT or so and can help with this throughout the day.

     
    • Rinat K 7:55 am on January 16, 2012 Permalink | Reply

      Cool, thanks for working on this over weekend. I’ll be around the same time.

  • Daniel Bachhuber 10:09 pm on January 15, 2012 Permalink | Reply
    Tags:   

    I’ve set it up so that pushes to Github will also post to an email list with both of our email addresses on it. I’ve found this useful in keeping track of development going on.

     
  • Rinat K 12:26 am on January 15, 2012 Permalink | Reply  

    @danielbachhuber Just wanted to give you heads up on the status, I just pushed CRUD logic and fully functional UI to develop branch. There are some shortcuts here and there, no nonce checks or any validation, but given our tight timeframe I think it’s ok now.

     
  • Rinat K 1:43 am on January 14, 2012 Permalink | Reply
    Tags:   

    Snapshot of UI 

    Hey,

    Here’s a little preview of UI. I tried to keep it simple as possible.

     
  • Rinat K 9:24 pm on January 13, 2012 Permalink | Reply  

    Hey I've put together a couple of basic… 

    <?php
    $script = 'http://ad.doubleclick.net/adj/%site_name%/%zone1%;s1=%zone1%;s2=;pid=[unique_page_id];fold=%fold%;kw=;test=;ltv=ad;pos=%pos%;sz=%sz%';
    
    $front_page = array(
    			   'id' => 1,
    			   'site_name' => 'ltv.witi.home',
    			   'zone1' => 'homepage',
    			   'conditions' => array(
    					array('is_front_page' => true)
    					  )
    			   );
    
    /**
     * $fold and $sz should be passed to template tags.
     * Idea is to define $site_name and $zone1 and conditions and save only one ad code to DB,
     *
     * and then just create any ad we want to be on any particular page.
     *
     * do_action('acm_tag', $fold = (atf|btf), $sz = '300x250|728x90|etc' )
     *
     */
    
    $weather = array(
    			   'id' => 2,
    			   'site_name' => 'ltv.witi.weather',
    			   'zone1' => 'landing',
    			   'conditions' => array(
    					array('is_page' => 'weather')
    					  )
    			   );
    $vincesblog =  array(
    			   'id' => 2,
    			   'site_name' => 'ltv.witi.weather',
    			   'zone1' => 'vincesblog',
    			   'conditions' => array(
    					  array( 'is_category' => 'vinces-blog' ), // that could actually be is_page('vinces-blog'), depending on the obscurity of user's site structure
    					  array('has_category' => 'vinces-blog' )
    					  )
    			   );
    
    /**
     * So post has two categories: Politics and Business, we use priority to determine which zone should be rendered in script ad tags .
     * Omitted ad code for Business would have array('has_category' => 'business', 'priority' => '90' ) and wouldn't be picked as right zone1
     *
     */
    $priority  = array(
    			   'id' => 3,
    			   'site_name' => 'ltv.witi.news',
    			   'zone1' => 'politics',
    			   'conditions' => array(
    					  array( 'is_category' => 'politics' ),
    					  array('has_category' => 'politics', 'priority' => '999' )
    					  )
    			   );		  
    
    ?>
     
  • Daniel Bachhuber 1:27 pm on January 11, 2012 Permalink | Reply
    Tags: feedback   

    @rinatkhaziev I had a few minutes to look over your code this morning. Overall, I think you’re off to a good start. I have a couple of quick comments at this point:

    • Creating, editing, deleting, and getting ad codes should be decoupled from the AJAX requests so we can reuse the methods elsewhere
    • AJAX should use the admin ajax approach as much as possible, so we’re only firing the hooks on exactly the right actions.

    I also left a few comments in the form of code comments.

     
  • Daniel Bachhuber 2:50 am on January 3, 2012 Permalink | Reply
    Tags: brainstorming, v0.1   

    Plugin skeleton code 

    This afternoon, I sketched out and committed a skeleton for what this plugin can look like. There’s a few different parts I’d like to talk about at this point.

    First, all “ad codes” (e.g. the script URLs to load on the front end) are registered with Ad_Code_Manager::register_ad_code(). Here’s sample usage:

    <?php
    
    $script = 'http://ad.doubleclick.net/adj/%site_name%/%ad_zone%;s1=%ad_zone%;s2=;pid=[unique_page_id];fold=atf;kw=;test=;ltv=ad;pos=top;dcopt=ist;tile=1;sz=300x250;ord=%page_random%?';
    $where = array(
    	'is_search' => true,
    	'query_include' => 'apple',
    );
    $url_vars = array(
    	'site_name' => 'ltv.witi.home',
    	'ad_zone' => 'homepage',
    );
    Ad_Code_Manager:: register_ad_code( 'banner', $script, $where, 10, $url_vars );
    

    These will either be registered with ad tags in your theme’s functions.php file, or in the admin interface to be put together by @rinatkhaziev. The URLs will need to be cleared against a whitelist.

    On the front end, you’ll add code like the following:

    <?php
    
    do_action('acm_tag', 'banner' ); // or we might add a template tag to do essentially the same thing
    

    The Ad_Code_Manager::action_acm_tag() method will handle all of the priority logic to determine which ad code should run in the tag if there are multiple that could fit.

    Lastly, I included mention of the admin interface for managing ad codes. Basically, what we want is a spreadsheet-like interface for adding new ad codes. ‘tag’, ‘code’, ‘priority’ will be reserved columns, and all other columns will serve is expected token replacements for the URLs. If the admin interface is included, then all data in the interface will be registered as ad codes using Ad_Code_Manager::register_ad_code(). The data should probably be stored as a custom post type (so we have revision history too)

    I’ll work on the registration and presentation logic over the next few days.

     
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