NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Ad thing help

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-13-2005, 01:20 AM THREAD STARTER               #1 (permalink)
Senior Member
 
majinbuu1023's Avatar
Join Date: Jan 2005
Location: New Zealand
Posts: 3,747
majinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to behold
 



Ad thing help


I want to add adsense code the my header file on phpbb. but then it will show up on the files php does not allow, I need something like this;

<?php
do not add the code to these pages;register.php, look.php , yada.php

<gOoGlE aD cOdE>

?>

Thanks
Dylan
majinbuu1023 is offline  
Old 08-13-2005, 09:58 AM   #2 (permalink)
NamePros Member
Join Date: Jan 2005
Location: Texas USA
Posts: 71
Outer is an unknown quantity at this point
 



make a new tag for it in the overall_header.tpl

Code:
<span class="gen">{GOOGLE_CODE}</span>
Then go into includes/page_header.php and scroll down until you see a list of tags for that template. It'll look something like this (add the GOOGLE_CODE tag into it)
PHP Code:
<?php

$template
->assign_vars(array(
    
'SITENAME' => $board_config['sitename'],
    
'SITE_DESCRIPTION' => $board_config['site_desc'],
    
'PAGE_TITLE' => $page_title,
    
'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit),
    
'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
    
'TOTAL_USERS_ONLINE' => $l_online_users,
    
'LOGGED_IN_USER_LIST' => $online_userlist,
    
'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])),
    
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
    
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
    
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,

    
'PRIVMSG_IMG' => $icon_pm,
        
'GOOGLE_CODE' => $google_code// Just added google code into list

    
'L_USERNAME' => $lang['Username'],
    
'L_PASSWORD' => $lang['Password'],
    
'L_LOGIN_LOGOUT' => $l_login_logout,
    
'L_LOGIN' => $lang['Login'],
    
'L_LOG_ME_IN' => $lang['Log_me_in'],
    
'L_AUTO_LOGIN' => $lang['Log_me_in'],
    
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
    
'L_REGISTER' => $lang['Register'],
    
'L_PROFILE' => $lang['Profile'],
    
'L_SEARCH' => $lang['Search'],
    
'L_PRIVATEMSGS' => $lang['Private_Messages'],
    
'L_WHO_IS_ONLINE' => $lang['Who_is_Online'],
    
'L_MEMBERLIST' => $lang['Memberlist'],
    
'L_FAQ' => $lang['FAQ'],
    
'L_USERGROUPS' => $lang['Usergroups'],
    
'L_SEARCH_NEW' => $lang['Search_new'],
    
'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'],
    
'L_SEARCH_SELF' => $lang['Search_your_posts'],
    
'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span style="color:#' $theme['fontcolor3'] . '">''</span>'),
    
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' $theme['fontcolor2'] . '">''</span>'),

    
'U_SEARCH_UNANSWERED' => append_sid('search.'.$phpEx.'?search_id=unanswered'),
    
'U_SEARCH_SELF' => append_sid('search.'.$phpEx.'?search_id=egosearch'),
    
'U_SEARCH_NEW' => append_sid('search.'.$phpEx.'?search_id=newposts'),
    
'U_INDEX' => append_sid('index.'.$phpEx),
    
'U_REGISTER' => append_sid('profile.'.$phpEx.'?mode=register'),
    
'U_PROFILE' => append_sid('profile.'.$phpEx.'?mode=editprofile'),
    
'U_PRIVATEMSGS' => append_sid('privmsg.'.$phpEx.'?folder=inbox'),
????: NamePros.com http://www.namepros.com/programming/115206-ad-thing-help.html
    
'U_PRIVATEMSGS_POPUP' => append_sid('privmsg.'.$phpEx.'?mode=newpm'),
????: NamePros.com http://www.namepros.com/showthread.php?t=115206
    
'U_SEARCH' => append_sid('search.'.$phpEx),
    
'U_MEMBERLIST' => append_sid('memberlist.'.$phpEx),
    
'U_MODCP' => append_sid('modcp.'.$phpEx),
    
'U_FAQ' => append_sid('faq.'.$phpEx),
    
'U_VIEWONLINE' => append_sid('viewonline.'.$phpEx),
    
'U_LOGIN_LOGOUT' => append_sid($u_login_logout),
    
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

    
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
    
'S_CONTENT_ENCODING' => $lang['ENCODING'],
    
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
    
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
    
'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone),
    
'S_LOGIN_ACTION' => append_sid('login.'.$phpEx),

    
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
    
'T_BODY_BACKGROUND' => $theme['body_background'],
    
'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
    
'T_BODY_TEXT' => '#'.$theme['body_text'],
    
'T_BODY_LINK' => '#'.$theme['body_link'],
    
'T_BODY_VLINK' => '#'.$theme['body_vlink'],
    
'T_BODY_ALINK' => '#'.$theme['body_alink'],
    
'T_BODY_HLINK' => '#'.$theme['body_hlink'],
    
'T_TR_COLOR1' => '#'.$theme['tr_color1'],
    
'T_TR_COLOR2' => '#'.$theme['tr_color2'],
    
'T_TR_COLOR3' => '#'.$theme['tr_color3'],
    
'T_TR_CLASS1' => $theme['tr_class1'],
    
'T_TR_CLASS2' => $theme['tr_class2'],
    
'T_TR_CLASS3' => $theme['tr_class3'],
    
'T_TH_COLOR1' => '#'.$theme['th_color1'],
    
'T_TH_COLOR2' => '#'.$theme['th_color2'],
    
'T_TH_COLOR3' => '#'.$theme['th_color3'],
    
'T_TH_CLASS1' => $theme['th_class1'],
    
'T_TH_CLASS2' => $theme['th_class2'],
    
'T_TH_CLASS3' => $theme['th_class3'],
    
'T_TD_COLOR1' => '#'.$theme['td_color1'],
    
'T_TD_COLOR2' => '#'.$theme['td_color2'],
    
'T_TD_COLOR3' => '#'.$theme['td_color3'],
    
'T_TD_CLASS1' => $theme['td_class1'],
    
'T_TD_CLASS2' => $theme['td_class2'],
    
'T_TD_CLASS3' => $theme['td_class3'],
    
'T_FONTFACE1' => $theme['fontface1'],
    
'T_FONTFACE2' => $theme['fontface2'],
    
'T_FONTFACE3' => $theme['fontface3'],
    
'T_FONTSIZE1' => $theme['fontsize1'],
    
'T_FONTSIZE2' => $theme['fontsize2'],
    
'T_FONTSIZE3' => $theme['fontsize3'],
    
'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
    
'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
    
'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
    
'T_SPAN_CLASS1' => $theme['span_class1'],
    
'T_SPAN_CLASS2' => $theme['span_class2'],
    
'T_SPAN_CLASS3' => $theme['span_class3'],

    
'NAV_LINKS' => $nav_links_html)
);

?>

Next, put a new DEFINE on the VERY TOP of each file that you do not want google code shown on

PHP Code:
<?php
// this is register.php
DEFINE ("NO_GOOGLE_CODE"TRUE);
?>
Go back into the includes/page_header.php and add this piece of code
PHP Code:
<?php

if (defined('NO_GOOGLE_CODE'))
{
    
// No Google Code
    
$google_code "";
}
else
{
    
// Place the code in here
    
$google_code "Google Code";
}
?>
__________________
I wonder...
Outer is offline  
Old 08-13-2005, 03:31 PM THREAD STARTER               #3 (permalink)
Senior Member
 
majinbuu1023's Avatar
Join Date: Jan 2005
Location: New Zealand
Posts: 3,747
majinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to beholdmajinbuu1023 is a splendid one to behold
 



Originally Posted by Outer
make a new tag for it in the overall_header.tpl

Code:
<span class="gen">{GOOGLE_CODE}</span>
Then go into includes/page_header.php and scroll down until you see a list of tags for that template. It'll look something like this (add the GOOGLE_CODE tag into it)
PHP Code:
<?php

$template
->assign_vars(array(
    
'SITENAME' => $board_config['sitename'],
    
'SITE_DESCRIPTION' => $board_config['site_desc'],
    
'PAGE_TITLE' => $page_title,
    
'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit),
    
'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
    
'TOTAL_USERS_ONLINE' => $l_online_users,
    
'LOGGED_IN_USER_LIST' => $online_userlist,
    
'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])),
    
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
    
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
    
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,

    
'PRIVMSG_IMG' => $icon_pm,
        
'GOOGLE_CODE' => $google_code// Just added google code into list

    
'L_USERNAME' => $lang['Username'],
    
'L_PASSWORD' => $lang['Password'],
    
'L_LOGIN_LOGOUT' => $l_login_logout,
    
'L_LOGIN' => $lang['Login'],
    
'L_LOG_ME_IN' => $lang['Log_me_in'],
    
'L_AUTO_LOGIN' => $lang['Log_me_in'],
    
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
    
'L_REGISTER' => $lang['Register'],
    
'L_PROFILE' => $lang['Profile'],
    
'L_SEARCH' => $lang['Search'],
    
'L_PRIVATEMSGS' => $lang['Private_Messages'],
    
'L_WHO_IS_ONLINE' => $lang['Who_is_Online'],
    
'L_MEMBERLIST' => $lang['Memberlist'],
    
'L_FAQ' => $lang['FAQ'],
    
'L_USERGROUPS' => $lang['Usergroups'],
    
'L_SEARCH_NEW' => $lang['Search_new'],
    
'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'],
    
'L_SEARCH_SELF' => $lang['Search_your_posts'],
    
'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span style="color:#' $theme['fontcolor3'] . '">''</span>'),
    
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' $theme['fontcolor2'] . '">''</span>'),

    
'U_SEARCH_UNANSWERED' => append_sid('search.'.$phpEx.'?search_id=unanswered'),
    
'U_SEARCH_SELF' => append_sid('search.'.$phpEx.'?search_id=egosearch'),
    
'U_SEARCH_NEW' => append_sid('search.'.$phpEx.'?search_id=newposts'),
    
'U_INDEX' => append_sid('index.'.$phpEx),
    
'U_REGISTER' => append_sid('profile.'.$phpEx.'?mode=register'),
    
'U_PROFILE' => append_sid('profile.'.$phpEx.'?mode=editprofile'),
    
'U_PRIVATEMSGS' => append_sid('privmsg.'.$phpEx.'?folder=inbox'),
    
'U_PRIVATEMSGS_POPUP' => append_sid('privmsg.'.$phpEx.'?mode=newpm'),
    
'U_SEARCH' => append_sid('search.'.$phpEx),
    
'U_MEMBERLIST' => append_sid('memberlist.'.$phpEx),
    
'U_MODCP' => append_sid('modcp.'.$phpEx),
????: NamePros.com http://www.namepros.com/showthread.php?t=115206
    
'U_FAQ' => append_sid('faq.'.$phpEx),
    
'U_VIEWONLINE' => append_sid('viewonline.'.$phpEx),
    
'U_LOGIN_LOGOUT' => append_sid($u_login_logout),
    
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

    
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
    
'S_CONTENT_ENCODING' => $lang['ENCODING'],
    
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
    
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
    
'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone),
    
'S_LOGIN_ACTION' => append_sid('login.'.$phpEx),

    
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
    
'T_BODY_BACKGROUND' => $theme['body_background'],
    
'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
    
'T_BODY_TEXT' => '#'.$theme['body_text'],
    
'T_BODY_LINK' => '#'.$theme['body_link'],
    
'T_BODY_VLINK' => '#'.$theme['body_vlink'],
    
'T_BODY_ALINK' => '#'.$theme['body_alink'],
    
'T_BODY_HLINK' => '#'.$theme['body_hlink'],
    
'T_TR_COLOR1' => '#'.$theme['tr_color1'],
    
'T_TR_COLOR2' => '#'.$theme['tr_color2'],
    
'T_TR_COLOR3' => '#'.$theme['tr_color3'],
    
'T_TR_CLASS1' => $theme['tr_class1'],
    
'T_TR_CLASS2' => $theme['tr_class2'],
    
'T_TR_CLASS3' => $theme['tr_class3'],
    
'T_TH_COLOR1' => '#'.$theme['th_color1'],
    
'T_TH_COLOR2' => '#'.$theme['th_color2'],
    
'T_TH_COLOR3' => '#'.$theme['th_color3'],
    
'T_TH_CLASS1' => $theme['th_class1'],
    
'T_TH_CLASS2' => $theme['th_class2'],
    
'T_TH_CLASS3' => $theme['th_class3'],
    
'T_TD_COLOR1' => '#'.$theme['td_color1'],
    
'T_TD_COLOR2' => '#'.$theme['td_color2'],
    
'T_TD_COLOR3' => '#'.$theme['td_color3'],
    
'T_TD_CLASS1' => $theme['td_class1'],
    
'T_TD_CLASS2' => $theme['td_class2'],
    
'T_TD_CLASS3' => $theme['td_class3'],
    
'T_FONTFACE1' => $theme['fontface1'],
    
'T_FONTFACE2' => $theme['fontface2'],
    
'T_FONTFACE3' => $theme['fontface3'],
    
'T_FONTSIZE1' => $theme['fontsize1'],
    
'T_FONTSIZE2' => $theme['fontsize2'],
    
'T_FONTSIZE3' => $theme['fontsize3'],
    
'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
    
'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
    
'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
    
'T_SPAN_CLASS1' => $theme['span_class1'],
????: NamePros.com http://www.namepros.com/showthread.php?t=115206
    
'T_SPAN_CLASS2' => $theme['span_class2'],
    
'T_SPAN_CLASS3' => $theme['span_class3'],

    
'NAV_LINKS' => $nav_links_html)
);

?>

Next, put a new DEFINE on the VERY TOP of each file that you do not want google code shown on

PHP Code:
<?php
// this is register.php
DEFINE ("NO_GOOGLE_CODE"TRUE);
?>
Go back into the includes/page_header.php and add this piece of code
PHP Code:
<?php

if (defined('NO_GOOGLE_CODE'))
{
    
// No Google Code
    
$google_code "";
}
else
{
    
// Place the code in here
    
$google_code "Google Code";
}
?>

THANKS SO MUCH.. but I changed to XMB.. but I will remember that for future references

thanks
Dylan
majinbuu1023 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Funniest Thing in the WORLD thetzfreak The Break Room 9 07-13-2005 03:00 AM
Whats the hottest thing right now? ZuraX The Break Room 28 06-28-2005 07:14 PM
xn-- thing IllCodeForFood Domain Name Discussion 4 11-14-2004 09:31 PM
FreeLayouts.us its a .us type of thing :) Darkfire001 Domain Appraisals 5 07-22-2004 05:00 AM
what's the worst thing that's happened to you? Dave Zan Domain Name Discussion 31 11-15-2003 03:51 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:45 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger