Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: kat on April 27, 2011, 10:31:58 AM

Title: PHP nooB question.
Post by: kat on April 27, 2011, 10:31:58 AM
What, exactly, is the difference between

<body>';

and

<body>

If a mod looks for <body>'; and you make the edit after <body>, as <body>'; doesn't exist, I get errors.

So, what does the '; actually do?
Title: Re: PHP nooB question.
Post by: sawz on April 27, 2011, 10:43:44 AM
i found that when trying to do a manual install of the ad mod and found this solution which may contain the answer you seek:

http://www.smfads.com/forums/index.php?topic=1930.0#post_ref3
Title: Re: PHP nooB question.
Post by: texasman1979 on April 27, 2011, 10:44:12 AM
The '; is the end of an echo statement in this case along with a line end identifier. The php interpreter sees the quote/simi colon and it knows that it is the beginning or end of sonething and performs actions programatically according to what is there. Example: echo 'hello world'; this if the only thing is present will give you a web page that says hello world. In a mods case, the search function looks for what is given, exactly, case sensitive. The search key is made more general or more specific based on what is specified. One mod might search for one where the other mod searchs for the other. The more specific the search the more likelyhood of not over writing potentially another mods changes. If you looking to write a mod, be sure to search for in the code as specific of a search key you can. I hope this helps.
Title: Re: PHP nooB question.
Post by: kat on April 27, 2011, 11:38:48 AM
Thanks, guys.

Answers to both parts!

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fwoohoo.gif&hash=442d820e90e439f1b2b8366580a5ff975588fe3f)