*

Recent

Author Topic: footer.php  (Read 6020 times)

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
footer.php
« on: October 26, 2011, 02:29:02 PM »
i do not understand the importance of this nor why it has some template.php code in there in what seems to be an early stage. All it does for me is add for annoyance from what i can see.

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: footer.php
« Reply #1 on: October 27, 2011, 09:39:55 PM »
And I don't understand why I keep forgetting to take it out lol. It should no longer be needed, it was incorporated into template.php There may be a few pages still using it, but shouldn't.

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: footer.php
« Reply #2 on: October 27, 2011, 09:41:27 PM »
Ok so its safe to remove both header.php and footer.php?

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: footer.php
« Reply #3 on: October 27, 2011, 10:43:26 PM »
It *should* be ok to remove it. Try renaming it first, see if something breaks lol. If ya find some page where it is still used, let me know? I went through trying to get rid of all refference to it through the include() function, but may have missed something. If it is used, you should be able to to replace it with the predefined function exit.

Frank

  • Sr. Member
  • ****
  • Posts: 257
  • Force: +4/-0
Re: footer.php
« Reply #4 on: October 28, 2011, 07:37:49 AM »
Ok so its safe to remove both header.php and footer.php?

NO IT"S NOT!

There are too many crap pieces of code that call the footer and then exit - - Viz:

      include ('templates/'.$template.'/footer.php');
exit;

I fixed some of them - And there are heaps (Just call up exit in your multi editor)
:(

So what I did so that I didn't HAVE to keep updating all of them is this.

template.php

<?php
include "header.php";
writebody();
include "footer.php";
?>

Then what you work on is what you get. :)

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: footer.php
« Reply #5 on: October 28, 2011, 08:19:15 AM »
Thanks, Ill have a look at it. Also. I took your advice and im going to rewrite a lot of the code and make it a lot easier to create new templates

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: footer.php
« Reply #6 on: October 28, 2011, 03:04:41 PM »
Ok, so i figured since i brought it up here and you did say your intent is to remove it all. I decided ill post all of the files i find footer.php or header.php in the script here. So far i have found it in these file

pages/admin
  • settings.php
  • addpagecategory.php
  • addblogcategory.php

pages/blogadmin
  • index.php
  • addblogcategory.php

template
  • forgot_pass.php
  • links.php
  • login.php
  • login_emailcheck.php
  • messages.php
  • myaccount.php
  • play.php
  • signup.php
  • signup_emailcheck.php


That should be all the files that contain this. Also when i delete it do i delete

include ('templates/'.$template.'/footer.php');
exit;

or just

include ('templates/'.$template.'/footer.php');
« Last Edit: October 28, 2011, 03:21:28 PM by spagetiokillers »

Frank

  • Sr. Member
  • ****
  • Posts: 257
  • Force: +4/-0
Re: footer.php
« Reply #7 on: October 29, 2011, 01:37:56 AM »
From what I can see this needs to be carefully gone through and could take some time with testing what's missing and what's not.

It's the pop-up type messages that break the footer, fixing that would be a better idea.

At monster games - Add a game to your favourites without logging in - - You'll get what I mean, and you can practice with that.

Anyway - Kurt has suggested something to try - So try that, because I don't have the time to worry about that at the moment.

;)

Frank

  • Sr. Member
  • ****
  • Posts: 257
  • Force: +4/-0
Re: footer.php
« Reply #8 on: October 29, 2011, 01:40:07 AM »
Oh! and if you're going to re-write the template - use the one I sent you if you wish. Because if you want to modify that etc, etc - you'll still have lots to do. :P

Frank

  • Sr. Member
  • ****
  • Posts: 257
  • Force: +4/-0
Re: footer.php
« Reply #9 on: October 29, 2011, 08:15:40 PM »
I've had a look at at least one of these and I wont go into the if's and buts, but as I understand it - Adam is supposed to have done all this for the next version?

addfavorites.php

Replace all the text with this:

Code: [Select]
<?php
function writebody() {
global 
$db$domain$sitename$con1$suserid$userid$userdata;

if(!isset(
$suserid)){
echo '<div class=\'error\'>Please login first.</div>';

}else{

if(isset(
$suserid)){
}
$ID clean($_GET['cmd']);
$ID abs((int) ($ID));

$db->query(sprintf('INSERT INTO dd_user_favorites SET
userid=\'%u\',
gameid=\'%u\''
$suserid$ID));

echo '<div class=\'msg\'>Game added to your favorites.</div>';
$pgname 'Add to favorites';
}
};
?>

One down - 100 to go!  ;D

« Last Edit: October 29, 2011, 08:56:29 PM by mort »

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: footer.php
« Reply #10 on: October 30, 2011, 02:14:13 PM »
... Also when i delete it do i delete

include ('templates/'.$template.'/footer.php');
exit;

or just

include ('templates/'.$template.'/footer.php');


Leave in the "exit;" and just delete the include statement.

I'm working my way through the files now and correcting them, but only on 2.0, not 2.1.

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: footer.php
« Reply #11 on: October 30, 2011, 02:55:03 PM »
... Also when i delete it do i delete

include ('templates/'.$template.'/footer.php');
exit;

or just

include ('templates/'.$template.'/footer.php');


Leave in the "exit;" and just delete the include statement.

I'm working my way through the files now and correcting them, but only on 2.0, not 2.1.

Thats ok im not going to re download them my site is way to edited for that. lol

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: footer.php
« Reply #12 on: October 30, 2011, 02:59:34 PM »
Didn't figure you would. But I was saying that for the sake of others who have yet to even set up their sites. If they hold off a few more minutes I should be finished.

Frank

  • Sr. Member
  • ****
  • Posts: 257
  • Force: +4/-0
Re: footer.php
« Reply #13 on: October 30, 2011, 03:58:39 PM »
And if you simply remove the "exit" you will end up with two footers every time  those particular messages are generated.

:(