1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP Code Modification Needed to make this work HELP PLS

Discussion in 'Co-op Advertising Network' started by Eb0la, Nov 23, 2004.

  1. #1
    ok first off

    I need to make this script run

    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
    	echo $ad_network[0];
    ?>
    Code (markup):
    I'm trying to get it to run in the same spot as the ad code below.But I need help so it displays on my forums in the same post as the other ads...

    so it would have to go here. somewhere ?????

    // Paste your ad code inside the single quotes
    								'post'		=> '
    
    
    <!-- Begin: AdBrite -->
    <style type="text/css">
    .adHeadline {font: bold 10pt Arial; text-decoration: underline; color: white;}
    .adText {font: normal 10pt Arial; text-decoration: none; color: white;}
    </style>
    <script type="text/javascript" src="http://3.adbrite.com/mb/text_group.php?sid=20484&amp;newwin=1&amp;col=3&br=1"></script>
    <p />
    <div><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=20484&amp;afsid=1">Your Ad Here</a></div>
    <!-- End: AdBrite -->'
    
    
    
    
    
    							);
    Code (markup):

    //  banner mod
    			//-------------------------------------
    			// You can change the number in: "$post_count == 2" to one you want to display the ad banner, without exceeding the maximum you've set per page
    			// Default is 2, between 2nd and 3rd post 
    			// Remove " and $first == 0" if you want ads displayed in every page instead of the first one only
    			//-------------------------------------
    			
    			if ($post_count == 0)
    			{
    				$ad = array (	'name_css'	=> 'normalname',
    								'post_css'	=> ($post_count % 2 ? 'post1' : 'post2'),
    								// You may want to change the post icon here or completly remove it
    								'post_icon'	=> '<img src="'.$ibforums->vars['img_url'].'/icon11.gif" alt="" /> ',
    								// Paste your ad code inside the single quotes
    								'post'		=> '
    
    
    ...
    
    
    <!-- Begin: AdBrite -->
    <style type="text/css">
    .adHeadline {font: bold 10pt Arial; text-decoration: underline; color: white;}
    .adText {font: normal 10pt Arial; text-decoration: none; color: white;}
    </style>
    <script type="text/javascript" src="http://3.adbrite.com/mb/text_group.php?sid=20484&amp;newwin=1&amp;col=3&br=1"></script>
    <p />
    <div><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=20484&amp;afsid=1">Your Ad Here</a></div>
    <!-- End: AdBrite -->'
    
    
    
    
    
    							);
    				
    				$bot_poster = array (
    									/* You can customize the informations shown about your bot here
    									 * Uncomment, by removing "//" in front of the lines you want to show up
    									 */
    										'name'			=> 'KS Staff',
    										'title'			=> 'ADBRITE - Maximum Advertising Exposure',
    										'avatar'		=> $std->get_avatar( 'http://www.keepingscore.ca/google.gif', $ibforums->member['view_avs'], '100x100' ),
    										//'member_rank_img' => '<img src="" border="0" alt="Group Icon" />',
    										//'member_group'	=> $ibforums->lang['m_group'].' Bot',
    									/* You can enter the date the bot joined your board in UNIX timestamp
    									 * http://www.invisiontools.com/index.php/pg/hosted-unix [Currently broken, needs to remove &p=unix off the url to work)
    									 * Default is set to 25/01/04, replace the numbers with $ibforums->vars['board_start'] if you want to use your board start date
    									 */
    										//'member_joined'	=> $ibforums->lang['m_joined'].' '.$std->get_date( 1074988800, 'JOINED' ),
    										//'website_icon'	=> '<a href="http://www.keepingscore.ca" target="_blank"><{P_WEBSITE}></a>',
    									);
    				
    				$replace = array (	'search'  => array	("<a href='{$ibforums->base_url}act=Post&amp;CODE=06&amp;f={$ibforums->input[f]}&amp;t={$ibforums->input[t]}&amp;p='><{P_QUOTE}></a>",
    														 '<b><a title="'.$ibforums->lang['tt_link'].'" href="#" onclick="link_to_post(); return false;" style="text-decoration:underline">'.$ibforums->lang['posted_on'].'</a></b> '
    														),
    									
    									'replace' => array	('',
    														 '<b>ADBRITE</b>'
    														)
    								 );
    				
    				$this->output .= str_replace($replace['search'], $replace['replace'], $this->html->RenderRow( $ad, $bot_poster ));
    				
    				$post_count++;
    			}
    
    
    
    			$poster = array();
    		
    			// Get the member info. We parse the data and cache it.
    			// It's likely that the same member posts several times in
    			// one page, so it's not efficient to keep parsing the same
    			// data
    			
    			if ($row['author_id'] != 0)
    			{
    				// Is it in the hash?
    				if ( isset($cached_members[ $row['author_id'] ]) )
    				{
    					// Ok, it's already cached, read from it
    					$poster = $cached_members[ $row['author_id'] ];
    					$row['name_css'] = 'normalname';
    				}
    				else
    				{
    					$row['name_css'] = 'normalname';
    					$poster = $this->parse_member( &$row );
    					// Add it to the cached list
    					$cached_members[ $row['author_id'] ] = $poster;
    				}
    			}
    			else
    			{
    				// It's definately a guest...
    				$poster = $std->set_up_guest( $row['author_name'] );
    				$row['name_css'] = 'unreg';
    			}
    			
    			//--------------------------------------------------------------
    			
    			$row['post_css'] = $post_count % 2 ? 'post1' : 'post2';
    			
    			
    			//--------------------------------------------------------------
    			
    			if ( ($row['append_edit'] == 1) and ($row['edit_time'] != "") and ($row['edit_name'] != "") )
    			{
    				$e_time = $std->get_date( $row['edit_time'] , 'LONG' );
    				
    				$row['post'] .= "<br /><br /><span class='edit'>".sprintf($ibforums->lang['edited_by'], $row['edit_name'], $e_time)."</span>";
    			}
    			
    			//--------------------------------------------------------------
    Code (markup):

    SEMrush
     
    Eb0la, Nov 23, 2004 IP
    SEMrush