[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 08-13-2005, 12:20 AM   #1 (permalink)
Senior Member
 
majinbuu1023's Avatar
 
Join Date: Jan 2005
Location: New Zealand
Posts: 3,759
85.67 NP$ (Donate)

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 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, 08:58 AM   #2 (permalink)
NamePros Member
 
Join Date: Jan 2005
Location: Texas USA
Posts: 71
203.00 NP$ (Donate)

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'),
    
'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),
    
'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, 02:31 PM   #3 (permalink)
Senior Member
 
majinbuu1023's Avatar
 
Join Date: Jan 2005
Location: New Zealand
Posts: 3,759
85.67 NP$ (Donate)

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 behold


Quote:
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),
    
'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";
}
?>

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 07:59 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85