InvisionBoard

Discussion in 'Co-op Advertising Network' started by blueuniverse, Sep 23, 2004.

  1. Spacen

    Spacen Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #21
    The reason why my mod doesn't work on your forums is because you have a much newer version than I do. I still have version 1.3.1 final. They made major changes with version 2.0.

    I don't know how to modify that version as I have never worked with it.
     
    Spacen, Dec 16, 2004 IP
  2. hetheman

    hetheman Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #22
    Okay I used this mod, and got the ads in the main template, now how do I get it on the lo-fi and printer-friendly pages?

    Thanks


     
    hetheman, Dec 29, 2004 IP
  3. Spacen

    Spacen Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #23
    Sorry to bump this very old thread but I just updated my site with the new coop code and thought I would paste it here for those who also have invision power boards.

    In file /forums/sources/functions.php find this code block somewhere around line 2110:
    //---------------------------------------
    		// Get the template
    		//---------------------------------------
    		
    	 $ibforums->skin['template'] = str_replace( "<% CSS %>"		 , $css					 , $ibforums->skin['template']);
    		$ibforums->skin['template'] = str_replace( "<% JAVASCRIPT %>"	 , ""					 , $ibforums->skin['template']);
    	 $ibforums->skin['template'] = str_replace( "<% TITLE %>"		 , $output_array['TITLE'] , $ibforums->skin['template']);
    	 $ibforums->skin['template'] = str_replace( "<% BOARD %>"		 , $this->to_print		 , $ibforums->skin['template']);
    	 $ibforums->skin['template'] = str_replace( "<% STATS %>"		 , $stats				 , $ibforums->skin['template']);
    	 $ibforums->skin['template'] = str_replace( "<% GENERATOR %>"	 , ""					 , $ibforums->skin['template']);
    		$ibforums->skin['template'] = str_replace( "<% COPYRIGHT %>"	 , $copyright			 , $ibforums->skin['template']);
    		$ibforums->skin['template'] = str_replace( "<% BOARD HEADER %>" , $this_header			 , $ibforums->skin['template']);
    		$ibforums->skin['template'] = str_replace( "<% NAVIGATION %>"	 , $nav					 , $ibforums->skin['template']);
    Code (markup):
    Just after that code block add the following lines (the following code assumes you used the default file names for your coop files and placed them in the root of your site. It also assumes you have chosen to display 5 ads in a text only fashion using "|" as the ad separator. It separates the ads into two lines; two ads on the first line and three ads on the second. If any of these assumptions don't match your situation and you need help customizing the following lines, just reply in this thread and I will try to help you out.):
    // Custom mod for coop ad network
    
    		ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    		include ('ad_network_230.php');
    		$ad_network = substr_replace($ad_network,"<BR>",strpos(substr($ad_network,strpos($ad_network,"|")+1),"|") + strpos($ad_network,"|")+1,1);
    		
    		$ibforums->skin['template'] = str_replace( "<% COOP.AD.NETWORK %>"	 , $ad_network	 , $ibforums->skin['template']);
    Code (markup):
     
    Spacen, Apr 18, 2005 IP
  4. g00gl3r

    g00gl3r Well-Known Member

    Messages:
    167
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #24
    Is this for 2.0.x?
     
    g00gl3r, Apr 21, 2005 IP
  5. Spacen

    Spacen Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #25
    No, this is for 1.3.1 final. 2.0 MIGHT be similar but I wouldn't count on it.
     
    Spacen, Apr 21, 2005 IP
  6. g00gl3r

    g00gl3r Well-Known Member

    Messages:
    167
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #26
    Can't be lol, my functions file can be found HERE, please feel free to take a look at it.

    Has anybody got 2.0.3 with the Ads running?
     
    g00gl3r, Apr 21, 2005 IP
  7. Spacen

    Spacen Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #27
    The functions file you link to is the same one for version 1.3. You should be able to follow my instructions.

    Once you finish modifying functions.php, simply put
     <% COOP.AD.NETWORK %> 
    Code (markup):
    in your wrapper or whatever they may call it in version 2.0
     
    Spacen, Apr 25, 2005 IP
  8. CrustyGeek

    CrustyGeek Guest

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #28
    I just managed to get it running.

    1. Upload the ad files as per the instructions to your root directory.
    2. Download, backup and open sources/classes/class_display.php
    3. Find:
    
    $ibforums->skin['_wrapper'] = str_replace( "<% LOFIVERSION %>"    , $this->_get_lofi_link()  , $ibforums->skin['_wrapper']);
    
    Code (markup):
    Add below:
    
    // Custom mod for coop ad network
    
    		ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    		include ('ad_network_277.php');
    		$ad_network = substr_replace($ad_network,"<BR>",strpos(substr($ad_network,strpos($ad_network,"|")+1),"|") + strpos($ad_network,"|")+1,1);
    		
    		$ibforums->skin['_wrapper'] = str_replace( "<% COOP.AD.NETWORK %>"	 , $ad_network	 , $ibforums->skin['_wrapper']);
    
    Code (markup):
    Upload

    4. Log into your AdminCP, Go to the Skin Manager and edit the Board Wrapper.
    put <% COOP.AD.NETWORK %> where you want the ads to show.

    Tis done :D

    Now all I've got to figure out is how to show it on my Portal.

    Update: Got it working on my bfarber's Portal by doing the same edits to sources/portal.php

    :D
     
    CrustyGeek, Jun 4, 2005 IP