PDA

View Full Version : Need Help Writing Script



BLK306
02-23-2007, 03:33 AM
So I'm trying to teach myself how to do this but I'm not having much luck.

I downloaded and installed a new skin for my forum so now I need to put that add ons I did to the old skin on this one. The first one being a "Home Page" button. I tried to paste in the change I made the first time I did it but did not have any luck with that but then again I really did not expect it to work any way. Then I tried to just copy the other scripts in the header and make some changes to it but no luck their either. Can anyone see where I'm going wrong.

Original Overall Header Script

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
{META}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<link rel="stylesheet" href="templates/DJWeb_subDark/{T_HEAD_STYLESHEET}" type="text/css" />
<!-- BEGIN switch_enable_pm_popup -->
<script type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript" src="templates/DJWeb_subDark/javascript.js"></script>
</head>
<body id="top">
<div id="forum-body">
<div id="header-box">
<h1>
<a href="{U_INDEX}" title="{L_INDEX}"><img src="templates/DJWeb_subDark/images/site_logo.jpg" alt="{L_INDEX}" /></a>
<h1>
</div>
<div id="navigation-box">
<ul>
<li><a href="{U_PROFILE}" title="{L_PROFILE}">{L_PROFILE}</a></li>
<!-- BEGIN switch_user_logged_in -->
<li><a href="{U_PRIVATEMSGS}" title="{L_PRIVATEMSGS}">{L_PRIVATEMSGS}</a></li>
<!-- END switch_user_logged_in -->
<li><a href="{U_FAQ}" title="{L_FAQ}">{L_FAQ}</a></li>
<li><a href="{U_SEARCH}" title="{L_SEARCH}">{L_SEARCH}</a></li>
<li><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST}">{L_MEMBERLIST}</a></li>
<li><a href="{U_GROUP_CP}" title="{L_USERGROUPS}">{L_USERGROUPS}</a></li>
<!-- BEGIN switch_user_logged_out -->
<li><a href="{U_REGISTER}" title="{L_REGISTER}">{L_REGISTER}</a></li>
<!-- END switch_user_logged_out -->
<li><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></li>
</ul>
</div>
<div id="main-box">


Here is the one I tried

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
{META}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<link rel="stylesheet" href="templates/DJWeb_subDark/{T_HEAD_STYLESHEET}" type="text/css" />
<!-- BEGIN switch_enable_pm_popup -->
<script type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript" src="templates/DJWeb_subDark/javascript.js"></script>
</head>
<body id="top">
<div id="forum-body">
<div id="header-box">
<h1>
<a href="{U_INDEX}" title="{L_INDEX}"><img src="templates/DJWeb_subDark/images/site_logo.jpg" alt="{L_INDEX}" /></a>
<h1>
</div>
<div id="navigation-box">
<ul>
<li><a href="{U_PROFILE}" title="{L_PROFILE}">{L_PROFILE}</a></li>
<!-- BEGIN switch_user_logged_in -->
<li><a href="{U_PRIVATEMSGS}" title="{L_PRIVATEMSGS}">{L_PRIVATEMSGS}</a></li>
<!-- END switch_user_logged_in -->
<li><a href="{U_FAQ}" title="{L_FAQ}">{L_FAQ}</a></li>
<li><a href="{U_SEARCH}" title="{L_SEARCH}">{L_SEARCH}</a></li>
<li><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST}">{L_MEMBERLIST}</a></li>
<li><a href="{U_GROUP_CP}" title="{L_USERGROUPS}">{L_USERGROUPS}</a></li>
<li><a href="{U_Homepage_CP}" title="{L_HomePage}">{L_HomePage}</a></li>
<!-- BEGIN switch_user_logged_out -->
<li><a href="{U_REGISTER}" title="{L_REGISTER}">{L_REGISTER}</a></li>
<!-- END switch_user_logged_out -->
<li><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></li>
</ul>
</div>
<div id="main-box">

racefan20
02-23-2007, 03:56 AM
Change this line:


<li><a href="{U_Homepage_CP}" title="{L_HomePage}">{L_HomePage}</a></li>

To this:


<li><a href="steadyracing.net" title="{L_HomePage}">{L_HomePage}</a></li>

BLK306
02-23-2007, 04:04 AM
All it did was put a space between User Groups and the log in log out button.

BLK306
02-23-2007, 04:19 AM
Is it possible the author rigged it up so that you can not make changes to it?

racefan20
02-23-2007, 06:14 AM
Is it possible the author rigged it up so that you can not make changes to it?


No. What happened when you tried the change I suggested? Email me, you have the address on your forum.

Aliens Anonymous
02-23-2007, 08:10 AM
<li><a href="steadyracing.net" title="Home Page">Home Page</a></li>

You can't use the {U_} OR {L_ } if you are just adding a bit of text or link of your own, you would have to have written a hole load of code in to other files until the phpbb would know what it meant. the result would be {L_Homepage} appearing on your page or nothing at all.

racefan20
02-23-2007, 04:12 PM
<li><a href="steadyracing.net" title="Home Page">Home Page</a></li>

You can't use the {U_} OR {L_ } if you are just adding a bit of text or link of your own, you would have to have written a hole load of code in to other files until the phpbb would know what it meant. the result would be {L_Homepage} appearing on your page or nothing at all.


Nice catch, my friend.

BLK306
02-23-2007, 11:02 PM
<li><a href="steadyracing.net" title="Home Page">Home Page</a></li>

You can't use the {U_} OR {L_ } if you are just adding a bit of text or link of your own, you would have to have written a hole load of code in to other files until the phpbb would know what it meant. the result would be {L_Homepage} appearing on your page or nothing at all.

That got it. Thanks a lot Alien!