How to add link in menu

topthisfact

Paragon
Joined
Dec 14, 2009
Messages
2,244
Reaction score
0
FP$
636
i was wondering if anyone know the html code line that
when members are logged in then they can see the menu/link button
 
dont seem to work
Btw its not a forum

here is the header.php

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta name="Description" content="Extreme Way of Improving your Promotion & Cash needs by Completing simple surveys & offers. Payment are made through Paypal & Promotion Methods / Tools." />
<meta name="Keywords" content="make money online,get paid to,gpt, free promotion, free gifts" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Distribution" content="Global" />
<meta name="Robots" content="index,follow" />

<link rel="stylesheet" href="images/CoolWater.css" type="text/css" />
<? include"config.php"; ?>
<title><?=$sitename;?> - <?=$slogan;?></title>
	
</head>

<body>

<?



if($_GET['ref']!="")
{
$ref=strip_tags($_GET['ref']);
}
?>

<!-- wrap starts here -->
<div id="wrap">
		
	<!--header -->
	<div id="header">			
				
		<h1 id="logo-text"><a href="index.php?ref=<? print"$ref"; ?>"><?=$sitename;?></a></h1>		
		<p id="slogan"><?=$slogan;?></p>		
			
		<div id="header-links">
			<p>
			
			</p>		
		</div>		
		<div id="header-stats">

<?
include"mysql.php";
$getusers=mysql_query("select count(*) as cnt from users",$c);
$totalusers=mysql_fetch_array($getusers);
$totalusers=$totalusers['cnt'];
$getusers=mysql_query("select * from users",$c);
$totalmoney=0;
while($usr=mysql_fetch_array($getusers))
{
$totalmoney=$totalmoney+$usr['total_earned'];
}
$getoffers=mysql_query("select count(*) as cnt from offers where active=1",$c);
$ocnt=mysql_fetch_array($getoffers);
$ocnt=$ocnt['cnt'];

print"<p>Total Offers: $ocnt<br>Total Members: $totalusers<br>Total Earned: \$$totalmoney</p>";

?>
</div>				
	</div>
		
	<!-- navigation -->	
	<div  id="menu">
		<ul>
<?
$home="";
$how="";
$signup="";
$offers="";
$friends="";
$login="";

if($page=="home")
{
$home="current";
}
else if($page=="how")
{
$how="current";
}
else if($page=="signup")
{
$signup="current";
}
else if($page=="offers")
{
$offers="current";
}
else if($page=="friends")
{
$friends="current";
}
else if($page=="login")
{
$login="current";
}

if($_SESSION['loggedin']==1)
{
include"mysql.php";
$signupbutton="			<li><a href=\"cashout.php\">Cashout</a></li>";
$logbutton="			<li><a href=\"logout.php\">Logout</a></li>";
	
$message="";
if($_GET['act']="changepaypal" && $_GET['paypal']!="")
{
$_GET['act']=strip_tags($_GET['act']);
$paypal=$_GET['paypal'];
$paypal=str_replace(array("<", ">"), array("&lt;", "&gt;"), $paypal);
mysql_query("update users set `paypal`='$paypal' where id={$_SESSION['userid']}",$c);
$message="<font color=\"red\">Paypal address updated.</font>";
}

$getuser=mysql_query("select * from users where id={$_SESSION['userid']}",$c);
$ui=mysql_fetch_array($getuser);
$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'])
    ?  $_SERVER['HTTP_X_FORWARDED_FOR']
    :  $_SERVER['REMOTE_ADDR'];
mysql_query("update users set `userIP`='$ip' where id={$_SESSION['userid']}",$c);
if($ui['banned']!="")
{
die("<center><font color=\"red\"><b>Your account has been banned.</b><br>Reason: {$ui['banned']}</font></center>");
}
}
else
{
$signupbutton="			<li id=\"$signup\"><a href=\"signup.php?ref=$ref\">Sign Up</a></li>";
$logbutton="			<li id=\"$login\"><a href=\"login.php?ref=$ref\">Login</a></li>";
}

?>
			<li id="<?=$home;?>"><a href="index.php?ref=<? print"$ref"; ?>">Home</a></li>
			<li id="<?=$offers;?>"><a href="offers.php?ref=<?=$ref;?>">Offers</a></li>
			<li id="<?=$how;?>"><a href="how.php?ref=<?=$ref;?>">How it Works</a></li>
<? print"$signupbutton"; ?>
			
<? print"$logbutton"; ?>
		</ul>
	</div>					
			
	<!-- content-wrap starts here -->
	<div id="content-wrap">
		
		<div id="main">	
<?
if($_SESSION['loggedin']==1 && $ui['email_verified']!=1)
{
?>			
			<center>	<font color="red">Your email has not been verified.<br>You will not be able to cashout until you do so.</font><br><a href="verify.php">Click here to go to the email verification page</a></center>
<?
}
?>
 
If it's not a forum then I don't know as I dunno what it is your trying to use and what variables it has.
 
This is the part i think to put the code

if($_SESSION['loggedin']==1)
{
include"mysql.php";
$signupbutton=" <li><a href=\"cashout.php\">Cashout</a></li>";
$logbutton=" <li><a href=\"logout.php\">Logout</a></li>";
 
Hello,

You can not put that part in the overall_header, as that's php. Also, that code you've got there is not valid as it's a mixture of php and html.

if($_S... is php, aswell as $signupbutton="

however, <li><a href="... is html.

Cheers,
 
What script are you using? If you told us that then we could possibly tell you what code to use.
 
Ohs
Get Paid Scirpt Like an "Paid to Click" Script

Is there any possible way i can add the link there only displaying to login members
I think that line i posted above could be an position but i just dont know the code.
 
Nathan already gave you that line:

Code:
<!-- IF S_USER_LOGGED_IN --><a href="The link">Click me</a><!-- ENDIF -->
 
Ohs
So there no way i can add it?
Because i added that code under

if($_SESSION['loggedin']==1)
{
include"mysql.php";
$signupbutton=" <li><a href=\"cashout.php\">Cashout</a></li>";
$logbutton=" <li><a href=\"logout.php\">Logout</a></li>";
 
Hmm, I think you can mix PHP and HTML, if we had a link that may help also.
 
Hee,

Yes you can, just add it like the following?

Code:
<!-- IF S_USER_LOGGED_IN --><a href="/cashout.php">Cash out</a><!-- ENDIF -->

You will have to make sure that there is a cashout.php file in your phpBB root directory.

Code:
<!-- IF S_USER_LOGGED_IN -->
is the same as
Code:
if($_SESSION['loggedin']==1)

Regards,
 
posey said:
Hee,

Yes you can, just add it like the following?

Code:
<!-- IF S_USER_LOGGED_IN --><a href="/cashout.php">Cash out</a><!-- ENDIF -->

You will have to make sure that there is a cashout.php file in your phpBB root directory.

Code:
<!-- IF S_USER_LOGGED_IN -->
is the same as
Code:
if($_SESSION['loggedin']==1)

Regards,




wow
your a god ^_^!
you right
there is a cashout.php

Where do i add that html under?
can do the , regular phpbb modifcation guide like "find" "replace" or "delete" "add after" & such

do you also want me to paste the cashout.php ?
 
Hello,

I do not need the cashout.php file, as that should work on it's own. In that file, near the end you will find the 'body' => 'the body file.html' you will find the body file, which basically is the html file (in your template folder) that is the output of the page.

You're using a prosilver based style, right?
 
Then this is your code:

Open: /styles/your style/template/overall_header.html

Find:
Code:
<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>

After, Add: (or Before, Add - what ever you like best.)
Code:
<!-- IF S_USER_LOGGED_IN --><a href="/cashout.php">Cash out</a><!-- ENDIF -->

However, if you want to follow the phpBB3 Coding Guide Lines you will have to replace Cash out with {L_CASH_OUT} and add it to the /language/en/common.php file. Make sure to use a text editor without BOM injection!

Cheers,
 
wait
im confused now

you know that this is an script not an phpbb forum im using right?

because i dont think the header.php files has the code your talking about

open up

easypromotion.wehostyour.info
this is the script im talking about.


EDIT: not an mod or phpbb forum related, its an script related to some other website.
 
Ah oke, then I unfortunately do not know. I'm specialized in phpBB..
 
Back
Top Bottom