Topic: php running in main.tpl ????

Sorry I will try to be concise with my explanation.

So I have integrated punbb into my site reasonably well by modding the main.tpl file.

However I would really like to have a php function (a login box I have already written and works great) running in my menu bar (that I have put in the main.tpl file)...now I have found that php does not execute inside the main.tpl file so I tried renaming the main.tpl file main.tpl.php and then modding the footer.php (or header.php I can't remember) to look for main.tpl.php.  But it still doesn't run the php.

So I found a workaround which is to use an inline frame, make the php loginbox a seperate file and link to that....this works great until you click on a link in the login box (eg 'Forgort your password?') and then the link opens in the inline frame and you can only see 1/10th of the page.

Now a friend told me I could maybe fix this by putting a javascript in the login php file that tells the links to open in a new window....but I have little knowledge of how to do this.

Any help would be very greatly apreciated....Ideally there would be a mod to allow the main.tpl file to run php but I don't think this is possible.  What would also work is if there was a php command to make links in php open in a new window (or ideally a window of my choosing)  I doubt this is possible though.

Thanks

Nick

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

Re: php running in main.tpl ????

Sorry I am an idiot a bit of hunting around and I found that main.tpl will parse php as long as you put the php in the include/user directory.


Man I wasted ages on this....should have searched the docs way earlier.  smile

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

Re: php running in main.tpl ????

nickfzx, link?
u can include any function of punbb if only you add a few lines of code to each standard php file
example is
http://bunpai.com
go to the forum i give the main source codes for doign such a thing
Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!