TinyPortal

General => Chit chat => Topic started by: smurf6060 on June 15, 2006, 10:37:57 PM

Title: scripting help
Post by: smurf6060 on June 15, 2006, 10:37:57 PM
The amber theme is HOT!

Tried installing tb, didnt work, a zillion errors.  Ill look into it after i solve my main problem.

I want to add my adbrite code so it shows up in all posts. I know your supposed to put the code into the display.template  file.....I just don t know the correct php terminology .

Like with html, certain scripts go into certain headers and tags....but with php, im clueless.

Can someone post the correct php terminilogy with an example url so i may just copy and paste it into my own file?
Title: Re: scripting help
Post by: G6Cad on June 15, 2006, 10:49:55 PM
We need more info from you to be able to help you out.

SMF Version
TP version
Other Mods installed

Link to hompage is good to :)
Title: Re: scripting help
Post by: IchBin on June 16, 2006, 12:15:26 AM
In order to put html code in a php file you have to put it in an echo statement. 
An echo statement looks like this. echo 'your_stuff_in_here'; The end of an echo statement always ends with a semi colon. For example:
echo '<img src="/your/image.jpg" />';

If you echo your stuff with single quotes and you put a word in there with a single quote like this.
echo '<p>This isn't very hard</p>'; This will not work. Because echo thinks your ending it at the second single quote on the word "isn't". So in order to make it work you need to do this.

echo '<p>This isn\'t very hard</p>';  Using the backslash tells echo to ingore the following character.

Make sure when you put in in the php code that you're not putting it into an already existing echo statement. In some instances an echo statement expands 10 or 15 lines of code. Just look for the ending semi colon so you can find the end. :)
Title: Re: scripting help
Post by: smurf6060 on June 16, 2006, 06:44:15 AM
i love you guys!!!!!!!!!!!!!!!!!!!!!!!

thanks.