Am I to assume that one would insert the snippet code into the TPortalBlocks.templates.php. And if so, does it matter where you insert the code.
Inquiring minds need to know.
No, snippets code are to be put into a php-type of block. So its actually stored in the database, not in the files.
Quote from: Bloc on November 04, 2005, 05:37:45 PM
No, snippets code are to be put into a php-type of block. So its actually stored in the database, not in the files.
Are you refering to the Mysql database associated with the smf forum itself?
No you add a new block. when they ask you what type you select php. insert the code that was provided to you.
Quote from: JayBachatero on November 05, 2005, 01:31:43 AM
No you add a new block.ÂÃ, when they ask you what type you select php.ÂÃ, insert the code that was provided to you.
My eyes have been opened and the world is before me. Thanks JayBachatero
Quote from: houston on November 05, 2005, 06:01:25 AM
Quote from: JayBachatero on November 05, 2005, 01:31:43 AM
No you add a new block. when they ask you what type you select php. insert the code that was provided to you.
My eyes have been opened and the world is before me. Thanks JayBachatero
You welcome.
Can someone give me an example of a php bock code snippet. I am trying to integrate coppermine into smf/tp and am getting php errors when trying to use the php block. (SMF1.1RC1)
Just read the other posts in this thread, most are phpblocks! Calendar, clocks, ect.
Sorry, should have been more specific... Can anyone show me how the php code appears inside the php block? I am getting a php parsing error.
Just remember to exclude the <?php and ?> tags in your script. You don't need those.
or open/close em properly like:
*start empty php block*
*close php as phpbloc has a open php precoded in it*
?>
*put in some html*
<img src="image source"><div align="center">and here comes the fabulous php block!</div>
*open php*
<?php
*put in some php*
thafabulousphpscript\}{as you see I dont know php/?||echo echo : 'lol';
*close php*
?>
*some more html below*
<img src="image source"><div align="center">the end the fabulous php block!</div>
*open php again because the php bloc has a close precoded in it*
<?php
please edit my post if I made a mistake about this :)
shouldn't need to open and close them like that as you can just use echo to write out the html code portions...
So, your example would look like this:
echo '<img src="image source"><div align="center">and here comes the fabulous php block!</div>';
thafabulousphpscript\}{as you see I dont know php/?||echo echo : 'lol';
echo '<img src="image source"><div align="center">the end the fabulous php block!</div>';
ok, thnks for the tip!
*I am a php n00b!