*

Recent

Author Topic: i dont even...  (Read 9072 times)

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
i dont even...
« on: February 09, 2012, 02:28:47 PM »
know what this is for in core.php(bolded for people who cant seem to see it) ...
Code: [Select]
if($_GET['template']){
exit('N00B.');
}

Does this serve any purpose? Also in browse.php (bolded for people who cant seem to see it) there are two variables trying to be declared from something that doesnt exist in the url.

Code: [Select]
$show = clean($_GET['page']);
$pgname = clean($_GET['name']);
« Last Edit: February 10, 2012, 06:40:57 AM by spagetiokillers »

lopa

  • Newbie
  • *
  • Posts: 20
  • Force: +1/-0
Re: i dont even...
« Reply #1 on: February 09, 2012, 03:37:10 PM »
I find it very annoying what people post Titles like "Need Help, how do I" etc and I for one usually ignore them.

And I can only assume that you mean in (Because I had to spend time just to find out where it used to be) CORE.PHP I have this string?

Code: [Select]
if($_GET['template']){
exit('N00B.');
}

Just remove it, as it serves no purpose.

As for the others - (and there are lots more of them) - have a look at this post.

http://freearcadescript.net/forums/index.php/topic,517.msg2871.html#msg2871

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: i dont even...
« Reply #2 on: February 09, 2012, 03:40:13 PM »
I find it very annoying what people post Titles like "Need Help, how do I" etc and I for one usually ignore them.

Not sure if slam on me or not.

And I can only assume that you mean in (Because I had to spend time just to find out where it used to be) CORE.PHP I have this string?

Yes sorry i forgot to include the file

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: i dont even...
« Reply #3 on: February 09, 2012, 04:40:13 PM »
o i now understand the purpose of $show however i removed pgname because it serves no purpose

lopa

  • Newbie
  • *
  • Posts: 20
  • Force: +1/-0
Re: i dont even...
« Reply #4 on: February 09, 2012, 06:03:18 PM »
Not sure if slam on me or not.

It's a slam on everyone who asks vague questions and Post titles that don't reflect the question or problem. It not only wastes other people's time, it also renders half of the Search Engine useless.

Just imagine a whole category full of  "How do I", "noob needs help", "what does this do?" etc.

::)

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: i dont even...
« Reply #5 on: February 09, 2012, 06:09:20 PM »
i did not know what exactly to call it is all most of the time i use titles that are relevant.

lopa

  • Newbie
  • *
  • Posts: 20
  • Force: +1/-0
Re: i dont even...
« Reply #6 on: February 09, 2012, 06:37:51 PM »
i removed pgname because it serves no purpose

Again you don't say where you removed it from?

And from what I can see you may have to rename $pgname  to $pagetitle, not just remove it?

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: i dont even...
« Reply #7 on: February 09, 2012, 06:40:20 PM »
i stated in the original post where pgname was located and pagetitle is declared lower down in the page so no i do not have to rename it. Thanks  :)

lopa

  • Newbie
  • *
  • Posts: 20
  • Force: +1/-0
Re: i dont even...
« Reply #8 on: February 10, 2012, 01:26:27 AM »
Yep, That's the kind of confusion that usually threads end up in when there is more than ONE question per thread and the only thing you have to remind you is this:

Re: i dont even...

And not something like: core.php - browse.php - Undefined - template - $pgname - page - name that helps to keep in mind that there was more than one one file and question.

Then I would feel bad about it!  ;D
« Last Edit: February 10, 2012, 01:29:04 AM by lopa »

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: i dont even...
« Reply #9 on: February 10, 2012, 06:20:26 AM »
its also not very hard to scroll up if you forget  ;D

lopa

  • Newbie
  • *
  • Posts: 20
  • Force: +1/-0
Re: i dont even...
« Reply #10 on: February 10, 2012, 06:34:18 AM »
In browse.php this is the line you are obviously referring to:

$pgname = clean($_GET['name']);

It's a function, not simply a page name variable.

Get Adam to explain to you what its original intention is supposed to do.

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: i dont even...
« Reply #11 on: February 10, 2012, 06:40:00 AM »
In browse.php this is the line you are obviously referring to:

Yes obviously as it is stated in the original post

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: i dont even...
« Reply #12 on: February 10, 2012, 01:39:56 PM »
$name is just the name in the url (browse/2-Puzzle.html)

I don't see a purpose in it being in the file though.
Unless of course you were to do a header redirect to the correct url if someone didn't have the name that matched the id in the url.

Go ahead and remove it if you want.

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Re: i dont even...
« Reply #13 on: February 11, 2012, 10:38:36 AM »
$name is just the name in the url (browse/2-Puzzle.html)

I don't see a purpose in it being in the file though.
Unless of course you were to do a header redirect to the correct url if someone didn't have the name that matched the id in the url.

Go ahead and remove it if you want.

Ah that makes sense i had seo turned off on my test site and there was no name included in the url with seo off however there is with it on. But yes i dont see the point of it in the code either since i searched for the variable and it wasnt even used in the code.