more complex php script inside the pages

General project discussion. NOT for help questions.
Post Reply
bkiss
Forum Members
Forum Members
Posts: 16
Joined: Sat Dec 17, 2005 9:12 pm

more complex php script inside the pages

Post by bkiss »

Hi everyone,

I understand the simple php code it is possible to insert like user defined tag.
But i have a huge problem inserting a littlebit bigger and complex php code like connecting to a database (other than we use for cmsmadesimple), and fill with data , i will give a fragment from the code:


      choose the model
         
           
            ">
            0) {
      mysql_data_seek($Recordset1, 0);
  $row_Recordset1 = mysql_fetch_assoc($Recordset1);
  }
?>
         
   

You see it's full with small php codes ...
OK, I am a beginner, right, it's true.  :)

Pls help me !

Thank you,

Kiss Barni
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: more complex php script inside the pages

Post by kermit »

Patricia wrote: Hi,
the user defined tag are actually alread enclosed into
so if your code begins and ends out of php, maybe you can do that

Code: Select all

?>
your code html and <?php somephpcode ?>
more html
<?php
I'm not sure, you must try.
Cheers
i tried something like that last week and the tag editor grumbled at me. 0.11.2 and 0.12.beta/svn seem to be a little different in what they accept, but there is definately some checking going on. i was able to get 2 blocks of php in one tag once, but i have no idea how i managed it (i can't go back into it, copy/paste the exact thing on top of itself and resave without getting the invalid code entered message).


bkiss: perhaps just reference an external file from within the tag?
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
bkiss
Forum Members
Forum Members
Posts: 16
Joined: Sat Dec 17, 2005 9:12 pm

Re: more complex php script inside the pages

Post by bkiss »

Actually i tryed to read from an external file and it works , but i don't see anymore the template...

I just thinking what if i try with html frames... anybody has experience with this?

Barni
bkiss
Forum Members
Forum Members
Posts: 16
Joined: Sat Dec 17, 2005 9:12 pm

Re: more complex php script inside the pages

Post by bkiss »

I don't like frames too, i know the negative effect on search engines, but it will be no problem if 10% of the page will be with frames...
I will spend anyway some time to make corrections in the code inserted as user defined tag, maybe it will work... all this, in this weekend :)

Thank you anyway for your prompt replies.

Barni
bkiss
Forum Members
Forum Members
Posts: 16
Joined: Sat Dec 17, 2005 9:12 pm

Re: more complex php script inside the pages

Post by bkiss »

It's really funny, but in about 20 minutes i was finished, with a little code cosmetics.
It's working now... even its' full with .

Thank's for your help.

Barni
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: more complex php script inside the pages

Post by kermit »

you could just follow the format of the stock tags in siteroot/plugins as well (which are coded as an 'entire' script). then just plop yours into that directory (instead of using 'user defined tag') and it's showtime.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Post Reply

Return to “General Discussion”