Hi..please help me out here

I know we can include txt file with google ads init
like <?php include("header.txt"); ?>
or add ads the code simply above/insde the code...

but i have differnet problem here... If i add include header.txt
or add any code above/inside the original php code I can't
able to login to Admin panel... it gives error messege

is there anyhow i can include header.txt differnet way so it wouldn't effect the admin configuration area...

attachment details -
eg1 = acutal php code with header included
eg2 = result of including header file and login error after username and password entered

I have tried different hader file names aswell..gives same error messege..it doesn't allow include any kind extra file...
thanks

    Ok, first off, holy cow, are you trying to blind us? Place your php code in php tags on the forum, so we can read it.

    That being said, you're getting that error because your script is attempting to send out headers although you printed header.txt to the page.

    The solution to this problem is placing the include for header.txt lower in the page generation. Place it after your body tag.

    This should resolve your problem, but I'm not sure, since you didn't provide much code and you almost blinded me with your jpeg 😃

    thanks,
    json

      hi..sorry about the picture.. i could only upload max 100kb thats why.. also its huge amount of code thats why i did't paste...

      please check the full code here

      http://tamilchatonline.com/music.txt

      Actually I have tried many sort of ways to add extra script it didn't work.. i have been trying for years now.. i m not expert so i left it like that..

      simply the code not taking anything extra

      maybe we need to change somthing inside teh code.. idont know..

        Hi there suria,

        This is just a guess, but I think you're going to want to try placing it in the header.php called by this function:

        function doModule(&$tmpl,$cache='') {
        	global $zc, $z_t1;
        	$tmpl = str_replace('{$BeNiceToZina}', htmlZina($cache), $tmpl);
        	if ($zc['html_space']) $tmpl = preg_replace("/>\s*</s","><",$tmpl);
        
        if ($zc['embed'] == 0) {
        	$tmpl = str_replace('{$htmlhead}', htmlHeader(), $tmpl);
        	echo $tmpl;
        } else {
        	$tmpl = preg_replace("/<!DOCTYPE.*?<body.*?>/si", htmlHeader(true), $tmpl);
        	$tmpl = preg_replace("/<\/body>.*/si","", $tmpl);
        	#POSTNUKE=2, PHPNUKE=1
        	if ($zc['embed'] == 1 || $zc['embed'] == 2 || $zc['embed'] == 8) {
        		include("header.php");
        		global $bgcolor1, $bgcolor2, $bgcolor4;
        		$bgc02 = ($type == 1) ? $bgcolor4 : $bgcolor2;
        		OpenTable();
        		echo "$tmpl<style type='text/css'>.z_row0 { background-color:$bgcolor1; }.z_row1 { background-color:$bgc02; }</style>";
        		CloseTable();
        		include("footer.php");
        	} elseif ($zc['embed'] == 3) { #XOOPS
        		global $xoopsUser, $xoopsLogger, $xoopsConfig;
        		include_once XOOPS_ROOT_PATH."/header.php";
        		echo $tmpl;
        		include_once XOOPS_ROOT_PATH."/footer.php";
        	} elseif ($zc['embed'] >= 4 && $zc['embed'] <= 7) { # MAMBO / DRUPAL / PHPWEBSITE / E107
        		echo $tmpl;
        	}
        }
        }
        

        where it calls

        include("header.php");
        

        is it's attempt to insert any custom html code before the CMS starts loading the normal page. If you place it there, you should be a-ok.

        thanks,
        json

          hi..thanks for findingout that..

          but it doesn't seems to read header.php

          i have put header.php file in the current directory and also in differnet locations....it doesn't seem to read the page

          view source here

          http://tamilchatonline.com/ad.txt

          is tat what you wanted me to do...or i mis understood..
          please let me know.. i lik to use header.php and footer.php and put ads in their.

            Hi there suria,

            I'm sorry, but I don't think I'm helping much. You're not giving me enough information to work with. ad.txt which you provided shows a head tag some google ad code, body start, body end then a center tag with more google ad script. There's a lot wrong with this code, and not just the include.

            What is the ad.txt you posted? Is that the page that gets generated, or is that your header.php after your changes?

            Please try to explain what you placed in header.php and then explain what the page generation looked like after you placed the code there.

            thanks,
            json

              Write a Reply...