What defines a member to phpBB

Discuss phpBB 3.0.x in general.
Forum rules
Please post any phpBB 3.1.x related topics in the forum.
User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: What defines a member to phpBB

Postby Gingah » 02 Jun 2009, 21:14

I can't for the life of me find out which part of the simple template system is interfering. If I comment out phpBB's code in my header, it loads, if I access the page without the template system, it loads. Even the phpBB forum loads and works flawlessly. Might be a long shot, but am I wrong assuming that declaring $template_engine public is the right thing to do? (As seen in my code further up the thread, $template_engine is accessed again through index1.php, but not at the template-file.)

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: What defines a member to phpBB

Postby Obsidian » 03 Jun 2009, 20:00


User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: What defines a member to phpBB

Postby Gingah » 04 Jun 2009, 14:42


User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: What defines a member to phpBB

Postby igorw » 04 Jun 2009, 15:03

You must be overwriting $db in one of the included variables of the template. It could be headers.php, navigation.php, modules/menu/*, modules/footer.html...

- we're poor!

User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: What defines a member to phpBB

Postby Gingah » 04 Jun 2009, 19:08

Thing is, that if I disable the template, and just put the replacement value instead of the replacement key (PostNews() instead of {jall}) into template.html (and rename it to .php), it returns completely, regardless of included files. And the template-system does not contain $db.

Is the template-system then creating/activating a variable named $db somewhere? I could not find any variable named $db anywhere in my files, nor can I recall using it (I use $dbh for connecting to MySQL, and $result for output).

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: What defines a member to phpBB

Postby Obsidian » 04 Jun 2009, 20:24


User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: What defines a member to phpBB

Postby Gingah » 04 Jun 2009, 21:06


User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: What defines a member to phpBB

Postby Obsidian » 04 Jun 2009, 23:16


User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: What defines a member to phpBB

Postby Gingah » 05 Jun 2009, 08:56

Well put me in a pipe and smoke me! First I got an eval error, but when I replaced <?php with just <? it worked! The site now fully parses the replacement value within the template-system, and outputs as it should, with the phpBB functions.

That's really great man, thanks for the effort to help guys, I wouldn't have managed this on my own :D

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: What defines a member to phpBB

Postby Obsidian » 05 Jun 2009, 20:02


User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: What defines a member to phpBB

Postby igorw » 06 Jun 2009, 09:27

It is enabled by default, but yes, it's better to keep the <?php. I don't really see how this would solve the problem either...

- we're poor!

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: What defines a member to phpBB

Postby Obsidian » 06 Jun 2009, 13:15


User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: What defines a member to phpBB

Postby Gingah » 07 Jun 2009, 10:57

Hmmm, so ideally it is preferable to keep it <?php rather than the shorter version? I would, but upon doing so, I get this error:

[quote="Banana Template]Parse error: parse error in index.php(7) : eval()'d code on line 51[/quote]

It works with short tags (eval("?>" . $banana->banana . "<?")), but not with not with full (eval("?>" . $banana->banana . "<?php")).

User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: What defines a member to phpBB

Postby igorw » 07 Jun 2009, 12:46

Add a space after <?php.

- we're poor!


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB 3.0.x "Olympus" discussion”

Who is online

Users browsing this forum: No registered users and 5 guests