Jump to content
MakeWebGames

Recommended Posts

Posted

Having a slight issue with the new template I've added to my game. Basically pages are not showing and only the header/mainmenu is, after checking staff panel, that actually shows but is provided by smenu.php so is seperate to mainmenu.

So mainmenu.php is surely the issue?

 

<?php

global $db,$c,$ir, $set;
$hc=$set['hospital_count'];
$jc=$set['jail_count'];
$ec=$ir['new_events'];
$mc=$ir['new_mail'];
if($ir['hospital'])
{
   print "
<li><a href='hospital.php'>Hospital ($hc)</a></li>
<li><a href='inventory.php'>Inventory</a></li>
  	";
}
else if ($ir['jail'])
{
   print "<li><a href='jail.php'>Jail ($jc)</a></li>";
}
else
{
   print "<li><a href='index.php'>Home</a></li>
<li><a href='inventory.php'>Inventory</a></li>";
}
print ($ec > 0)
       ? '<li><a href="events.php" style="font-weight: bold;">Events (' . $ec
               . ')</a></li>' : '<li><a href="events.php">Events (0)</a></li>';
print ($mc > 0)
       ? '<li><a href="mailbox.php" style="font-weight: bold;">Mailbox (' . $mc
               . ')</a></li>' : '<li><a href="mailbox.php">Mailbox (0)</a></li>';
if ($ir['jail'] and !$ir['hospital'])
{
   print "
<li><a href='gym.php'>Jail Gym</a></li>
<li><a href='hospital.php'>Hospital ($hc)</a></li>
  	";
}
else if (!$ir['hospital'])
{
   print "
<li><a href='explore.php'>Explore</a></li>
<li><a href='gym.php'>Gym</a></li>
<li><a href='criminal.php'>Crimes</a></li>
<li><a href='job.php'>Your Job</a></li>
<li><a href='education.php'>Local School</a></li>
<li><a href='hospital.php'>Hospital ($hc)</a></li>
<li><a href='jail.php'>Jail ($jc)</a></li>
  	";
}
else
{
   print "<li><a href='jail.php'>Jail ($jc)</a></li>";
}
print "<li><a href='forums.php'>Forums</a></li>";
print ($ir['new_announcements'])
       ? '<li><a href="announcements.php" style="font-weight: bold;">Announcements ('
               . $ir['new_announcements'] . ')</a></li>'
       : '<li><a href="announcements.php">Announcements (0)</a></li>';
print "
<li><a href='newspaper.php'>Newspaper</a></li>
<li><a href='search.php'>Search</a></li>
  ";
if (!$ir['jail'] && $ir['gang'])
{
   print "<li><a href='yourgang.php'>Your Gang</a></li>";
}
if ($ir['user_level'] > 1)
{
   print "
<li><a href='staff.php'>Staff Panel</a></li>
  	";
   $online_cutoff = time() - 900;
   $q =
           $db->query(
                   "SELECT `userid`, `username`, `laston`
                    FROM `users`
                    WHERE `laston` > ({$online_cutoff})
                    AND `user_level` > 1
                    ORDER BY `userid` ASC");
   while ($r = $db->fetch_row($q))
   {
       print '<li><a href="viewuser.php?u=' . $r['userid'] . '">' . $r['username']
               . '</a></li>';
   }
   $db->free_result($q);
}
if ($ir['donatordays'])
{
   print "
<li><a href='friendslist.php'>Friends List</a></li>
<li><a href='blacklist.php'>Black List</a>
  	";
}
print "
<li><a href='preferences.php'>Preferences</a></li>
<li><a href='preport.php'>Player Report</a></li>
<li><a href='helptutorial.php'>Help Tutorial</a></li>
<li><a href='gamerules.php'>Game Rules</a></li>
<li><a href='viewuser.php?u={$ir['userid']}'>My Profile</a></li>
<li><a href='logout.php'>Logout</a></li>";

?>

 

Original MCCodes V2:

<?php
global $db,$c,$ir, $set;
$hc=$set['hospital_count'];
$jc=$set['jail_count'];
$ec=$ir['new_events'];
$mc=$ir['new_mail'];
if($ir['hospital'])
{
 print "<a href='hospital.php'>Hospital ($hc)</a><br />
 <a href='inventory.php'>Inventory</a><br />";
}
elseif($ir['jail'])
{
 print "<a href='jail.php'>Jail ($jc)</a><br />";
}
else
{
 print "<a href='index.php'>Home</a><br />
 <a href='inventory.php'>Inventory</a><br />";
}
if($ec > 0) { print "<a href='events.php' style='font-weight: 800;'>Events ($ec)</a><br />"; }
else { print "<a href='events.php'>Events (0)</a><br />"; }
if($mc > 0) { print "<a href='mailbox.php' style='font-weight: 800;'>Mailbox ($mc)</a><br />"; }
else { print "<a href='mailbox.php'>Mailbox (0)</a><br />"; }
if($ir['jail'] and !$ir['hospital'])
{
 print "<a href='gym.php'>Jail Gym</a><br />
 <a href='hospital.php'>Hospital ($hc)</a><br />";
}
else if (!$ir['hospital'])
{
 print "<a href='explore.php'>Explore</a><br />
 <a href='gym.php'>Gym</a><br />
 <a href='criminal.php'>Crimes</a><br />
 <a href='job.php'>Your Job</a><br />
 <a href='education.php'>Local School</a><br />
 <a href='hospital.php'>Hospital ($hc)</a><br />
 <a href='jail.php'>Jail ($jc)</a><br />";
}
else
{
 print "<a href='jail.php'>Jail ($jc)</a><br />";
}
print "<a href='forums.php'>Forums</a><br />";
if($ir['new_announcements'])
{
print "<a href='ann.php' style='font-weight: 800;'>Announcements ({$ir['new_announcements']})</a><br />";
}
else
{
print "<a href='ann.php'>Announcements (0)</a><br />";
}
print "
<a href='newspaper.php'>Newspaper</a><br />
<a href='search.php'>Search</a><br />";
if(!$ir['jail'] && $ir['gang'])
{
 print "<a href='yourgang.php'>Your Gang</a><br />";
}
if($ir['user_level'] > 1)
{
print "<hr />
<a href='staff.php'>Staff Panel</a><br />\n";



print "<hr /><b>Staff Online:</b><br />";
$q=$db->query("SELECT * FROM users WHERE laston>(unix_timestamp()-15*60) AND user_level>1 ORDER BY userid ASC");
while($r=$db->fetch_row($q))
{
$la=time()-$r['laston'];
$unit="secs";
if($la >= 60)
{
$la=(int) ($la/60);
$unit="mins";
}
if($la >= 60)
{
$la=(int) ($la/60);
$unit="hours";
if($la >= 24)
{
$la=(int) ($la/24);
$unit="days";
}
}
print "<a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> ($la $unit)<br />";
}
}
if($ir['donatordays'])
{
print "<hr />
<b>Donators Only</b><br />
<a href='friendslist.php'>Friends List</a><br />
<a href='blacklist.php'>Black List</a>";
}
print "<hr />
<a href='preferences.php'>Preferences</a><br />
<a href='preport.php'>Player Report</a><br />
<a href='helptutorial.php'>Help Tutorial</a><br />
<a href='gamerules.php'>Game Rules</a><br />
<a href='viewuser.php?u={$ir['userid']}'>My Profile</a><br />
<a href='logout.php'>Logout</a><br /><br />
Time is now<br />
";
echo date ('F j, Y')."<br />".date('g:i:s a');

?>

 

Thanks for any help!

Posted
if you put back the orig v2 mainmenu.php version does that work ????

Yes it works, I'm guessing the person who helped integrate it did use a different version, I've tried to replace some things from the old one into the new one, but I've had no luck, probably done something wrong.

 

the code you posted to me in a pm shows you have a define in your functions which for new version of mccodes remove it and it should be fine

I removed them, it didn't work since it's the mainmenu file which is effecting it not the header as the header is the one i sent you :) any ideas?

Posted
Having a slight issue with the new template I've added to my game. Basically pages are not showing and only the header/mainmenu is, after checking staff panel, that actually shows but is provided by smenu.php so is seperate to mainmenu.

So mainmenu.php is surely the issue?

 

<?php

global $db,$c,$ir, $set;
$hc=$set['hospital_count'];
$jc=$set['jail_count'];
$ec=$ir['new_events'];
$mc=$ir['new_mail'];
if($ir['hospital'])
{
   print "
<li><a href='hospital.php'>Hospital ($hc)</a></li>
<li><a href='inventory.php'>Inventory</a></li>
  	";
}
else if ($ir['jail'])
{
   print "<li><a href='jail.php'>Jail ($jc)</a></li>";
}
else
{
   print "<li><a href='index.php'>Home</a></li>
<li><a href='inventory.php'>Inventory</a></li>";
}
print ($ec > 0)
       ? '<li><a href="events.php" style="font-weight: bold;">Events (' . $ec
               . ')</a></li>' : '<li><a href="events.php">Events (0)</a></li>';
print ($mc > 0)
       ? '<li><a href="mailbox.php" style="font-weight: bold;">Mailbox (' . $mc
               . ')</a></li>' : '<li><a href="mailbox.php">Mailbox (0)</a></li>';
if ($ir['jail'] and !$ir['hospital'])
{
   print "
<li><a href='gym.php'>Jail Gym</a></li>
<li><a href='hospital.php'>Hospital ($hc)</a></li>
  	";
}
else if (!$ir['hospital'])
{
   print "
<li><a href='explore.php'>Explore</a></li>
<li><a href='gym.php'>Gym</a></li>
<li><a href='criminal.php'>Crimes</a></li>
<li><a href='job.php'>Your Job</a></li>
<li><a href='education.php'>Local School</a></li>
<li><a href='hospital.php'>Hospital ($hc)</a></li>
<li><a href='jail.php'>Jail ($jc)</a></li>
  	";
}
else
{
   print "<li><a href='jail.php'>Jail ($jc)</a></li>";
}
print "<li><a href='forums.php'>Forums</a></li>";
print ($ir['new_announcements'])
       ? '<li><a href="announcements.php" style="font-weight: bold;">Announcements ('
               . $ir['new_announcements'] . ')</a></li>'
       : '<li><a href="announcements.php">Announcements (0)</a></li>';
print "
<li><a href='newspaper.php'>Newspaper</a></li>
<li><a href='search.php'>Search</a></li>
  ";
if (!$ir['jail'] && $ir['gang'])
{
   print "<li><a href='yourgang.php'>Your Gang</a></li>";
}
if ($ir['user_level'] > 1)
{
   print "
<li><a href='staff.php'>Staff Panel</a></li>
  	";
   $online_cutoff = time() - 900;
   $q =
           $db->query(
                   "SELECT `userid`, `username`, `laston`
                    FROM `users`
                    WHERE `laston` > ({$online_cutoff})
                    AND `user_level` > 1
                    ORDER BY `userid` ASC");
   while ($r = $db->fetch_row($q))
   {
       print '<li><a href="viewuser.php?u=' . $r['userid'] . '">' . $r['username']
               . '</a></li>';
   }
   $db->free_result($q);
}
if ($ir['donatordays'])
{
   print "
<li><a href='friendslist.php'>Friends List</a></li>
<li><a href='blacklist.php'>Black List</a>
  	";
}
print "
<li><a href='preferences.php'>Preferences</a></li>
<li><a href='preport.php'>Player Report</a></li>
<li><a href='helptutorial.php'>Help Tutorial</a></li>
<li><a href='gamerules.php'>Game Rules</a></li>
<li><a href='viewuser.php?u={$ir['userid']}'>My Profile</a></li>
<li><a href='logout.php'>Logout</a></li>";

?>

 

Original MCCodes V2:

<?php
global $db,$c,$ir, $set;
$hc=$set['hospital_count'];
$jc=$set['jail_count'];
$ec=$ir['new_events'];
$mc=$ir['new_mail'];
if($ir['hospital'])
{
 print "<a href='hospital.php'>Hospital ($hc)</a><br />
 <a href='inventory.php'>Inventory</a><br />";
}
elseif($ir['jail'])
{
 print "<a href='jail.php'>Jail ($jc)</a><br />";
}
else
{
 print "<a href='index.php'>Home</a><br />
 <a href='inventory.php'>Inventory</a><br />";
}
if($ec > 0) { print "<a href='events.php' style='font-weight: 800;'>Events ($ec)</a><br />"; }
else { print "<a href='events.php'>Events (0)</a><br />"; }
if($mc > 0) { print "<a href='mailbox.php' style='font-weight: 800;'>Mailbox ($mc)</a><br />"; }
else { print "<a href='mailbox.php'>Mailbox (0)</a><br />"; }
if($ir['jail'] and !$ir['hospital'])
{
 print "<a href='gym.php'>Jail Gym</a><br />
 <a href='hospital.php'>Hospital ($hc)</a><br />";
}
else if (!$ir['hospital'])
{
 print "<a href='explore.php'>Explore</a><br />
 <a href='gym.php'>Gym</a><br />
 <a href='criminal.php'>Crimes</a><br />
 <a href='job.php'>Your Job</a><br />
 <a href='education.php'>Local School</a><br />
 <a href='hospital.php'>Hospital ($hc)</a><br />
 <a href='jail.php'>Jail ($jc)</a><br />";
}
else
{
 print "<a href='jail.php'>Jail ($jc)</a><br />";
}
print "<a href='forums.php'>Forums</a><br />";
if($ir['new_announcements'])
{
print "<a href='ann.php' style='font-weight: 800;'>Announcements ({$ir['new_announcements']})</a><br />";
}
else
{
print "<a href='ann.php'>Announcements (0)</a><br />";
}
print "
<a href='newspaper.php'>Newspaper</a><br />
<a href='search.php'>Search</a><br />";
if(!$ir['jail'] && $ir['gang'])
{
 print "<a href='yourgang.php'>Your Gang</a><br />";
}
if($ir['user_level'] > 1)
{
print "<hr />
<a href='staff.php'>Staff Panel</a><br />\n";



print "<hr /><b>Staff Online:</b><br />";
$q=$db->query("SELECT * FROM users WHERE laston>(unix_timestamp()-15*60) AND user_level>1 ORDER BY userid ASC");
while($r=$db->fetch_row($q))
{
$la=time()-$r['laston'];
$unit="secs";
if($la >= 60)
{
$la=(int) ($la/60);
$unit="mins";
}
if($la >= 60)
{
$la=(int) ($la/60);
$unit="hours";
if($la >= 24)
{
$la=(int) ($la/24);
$unit="days";
}
}
print "<a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> ($la $unit)<br />";
}
}
if($ir['donatordays'])
{
print "<hr />
<b>Donators Only</b><br />
<a href='friendslist.php'>Friends List</a><br />
<a href='blacklist.php'>Black List</a>";
}
print "<hr />
<a href='preferences.php'>Preferences</a><br />
<a href='preport.php'>Player Report</a><br />
<a href='helptutorial.php'>Help Tutorial</a><br />
<a href='gamerules.php'>Game Rules</a><br />
<a href='viewuser.php?u={$ir['userid']}'>My Profile</a><br />
<a href='logout.php'>Logout</a><br /><br />
Time is now<br />
";
echo date ('F j, Y')."<br />".date('g:i:s a');

?>

 

Thanks for any help!

From the header code you sent me i see this

 

function menuarea()
   {
       define('jdsf45tji', true, true);
       include 'mainmenu.php';
       global $ir, $c;
       print
               '</ul></div></td><td width="2"> </td><td width="80%" valign="top"><center>';
       if ($ir['hospital'])
       {
           print "<b>NB:</b> You are currently in hospital for {$ir['hospital']} minutes.";
       }
       if ($ir['jail'])
       {
           print "<b>NB:</b> You are currently in jail for {$ir['jail']} minutes.";
       }
       print "<div class='padding'><a href='donator.php'><b><font color='#CCCCCC'>Donate to {$set['game_name']} now for game benefits!</b></a>";
   }

 

inside your mainmenu.php and smenu.php there should be code to check this

define('jdsf45tji', true, true);

which i don't see in your mainmenu.php or smenu.php

remove them from the above functions and i believe it will work just fine :)

Posted

Finally actually NonStopCoding that was a part of the needed fix, I can now adjust the original MCCodes and just integrate it myself. I tried that before but I still have them defines in the header, but works a treat now. Thanks for any help peeps.

Posted
cool glad its fixed lol

Yeah I was so baffled about it this morning, I knew it was a different version, just after trying to pick out the pieces that wasn't supposed to be there, nothing worked, then something as simple as that fixes it haha, thanks.

Posted
Yeah I was so baffled about it this morning, I knew it was a different version, just after trying to pick out the pieces that wasn't supposed to be there, nothing worked, then something as simple as that fixes it haha, thanks.

there has been some changes made in new version that wont work with older version of mccodes (v2.00 or ravens)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...