1
suisss
php code into theme
  • 2006/7/24 13:42

  • suisss

  • Just popping in

  • Posts: 45

  • Since: 2004/6/20


Hi everyone,

It's maybe a stupid question.
It's there a way to put some php code into the theme.html

Thx

2
stefan88
Re: php code into theme
  • 2006/7/24 14:48

  • stefan88

  • Community Support Member

  • Posts: 1085

  • Since: 2004/9/20


Hi,

Yes, you need to close it in tags:


<{php}>

YOUR PHP CODE HERE

<{/php}>

..

3
suisss
Re: php code into theme
  • 2006/7/24 14:51

  • suisss

  • Just popping in

  • Posts: 45

  • Since: 2004/6/20


Thanx for the quick answer.

But when I put this code, it appears a blank page.....

4
stefan88
Re: php code into theme
  • 2006/7/24 17:16

  • stefan88

  • Community Support Member

  • Posts: 1085

  • Since: 2004/9/20


Try with something simple like echo ... to see where is the problem. It may be the php code that gives error.


Also try to comment it like this:

<!--
<{php}>

YOUR CODE HERE

<{/php}>
-->

It may sound crazy, but I had to do this for one server to work...
..

5
suisss
Re: php code into theme
  • 2006/7/24 17:24

  • suisss

  • Just popping in

  • Posts: 45

  • Since: 2004/6/20


thx stefan88

I try with simple echo and comment ehehe
but without success.

6
stefan88
Re: php code into theme
  • 2006/7/24 17:34

  • stefan88

  • Community Support Member

  • Posts: 1085

  • Since: 2004/9/20


Well, I'm out of ideas

Maybe someone will jump here to help ...

Here is what I have in my theme:

<!-- 
<{
php}>
GLOBAL 
$xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
$criteria->add(new Criteria('to_userid'$uid));
$msgcount $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount'$msgcount);
<{/
php}>
-->



Just an idea - can you use smary plugin to do the job, like the MySQL query/time load info hack?
..

7
stefan88
Re: php code into theme
  • 2006/7/24 19:35

  • stefan88

  • Community Support Member

  • Posts: 1085

  • Since: 2004/9/20


What version of XOOPS do you have?

There is this treat about "<{php}>" tag in 2.0.14:

https://xoops.org/modules/newbb/viewto ... id=228126#forumpost228126
..

8
suisss
Re: php code into theme
  • 2006/7/24 21:44

  • suisss

  • Just popping in

  • Posts: 45

  • Since: 2004/6/20


I using 2.2.4 XOOPS version.
It's perhaps a server config........

Login

Who's Online

80 user(s) are online (42 user(s) are browsing Support Forums)


Members: 0


Guests: 80


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits