While loop problem

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

While loop problem

Postby Obsidian » 10 Jun 2008, 12:50


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: While loop problem

Postby igorw » 10 Jun 2008, 13:19


- we're poor!

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

Re: While loop problem

Postby Obsidian » 10 Jun 2008, 13:36

Okay...I guess I'll try to clean all that up. :?

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

Re: While loop problem

Postby Obsidian » 10 Jun 2008, 16:01


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

Re: While loop problem

Postby Obsidian » 12 Jun 2008, 16:57

Okay, I've finally got it working. YAY!

Here it is in action (with a few other things with it) on my test board:
[url]http://infernalarcade.ej.am/test/home.php[/url]

For those that want to replicate this...

HTML code, just include it into the page you want it on.


PHP function code:


carlf
New member
New member
Posts: 8
Joined: 06 Sep 2008, 01:40
[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: While loop problem

Postby carlf » 07 Sep 2008, 20:09

I have inserted the html code in news_body.html and uploadeded it to styles/prosilver_se/template/

I assume i need to place php code in a file called something like news_body.php and upload it to forum root?

Im a bit confused as to how the two files communicate with each other.

Thanks for any help,
Carl

User avatar
Mr. Bond
Member
Member
Posts: 89
Joined: 30 Mar 2008, 20:34
Real name: Bobby
Location: 127.0.0.1
[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: While loop problem

Postby Mr. Bond » 07 Sep 2008, 20:33

• •

carlf
New member
New member
Posts: 8
Joined: 06 Sep 2008, 01:40
[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: While loop problem

Postby carlf » 07 Sep 2008, 20:36


CMCDragonkai
New member
New member
Posts: 23
Joined: 06 Sep 2008, 14:59
[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: While loop problem

Postby CMCDragonkai » 03 Oct 2008, 08:08


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: While loop problem

Postby igorw » 03 Oct 2008, 16:21

ANNOUNCEMENT_FORUM is a constant and needs to be defined.

- we're poor!

CMCDragonkai
New member
New member
Posts: 23
Joined: 06 Sep 2008, 14:59
[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: While loop problem

Postby CMCDragonkai » 04 Oct 2008, 01:38

Oh, so that would make ANNOUNCEMENT_FORUM defined as a number? Or..?

Does it mean which forum contains the announcements? But then isn't that just the same making $query_global = false, and just specifying the number?

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

Re: While loop problem

Postby Obsidian » 07 Oct 2008, 15:31

Yes, just declare the constant in the page that is using the function with the forum ID that contains the announcements.

I don't remember what the $query_global parameter was for, though... :?
/me goes to check own documentation

CMCDragonkai
New member
New member
Posts: 23
Joined: 06 Sep 2008, 14:59
[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: While loop problem

Postby CMCDragonkai » 07 Oct 2008, 23:58

Ok, so if the forum id was 2, and this place contained announcements, does that mean I would define ANNOUNCEMENT_FORUM as 2?

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

Re: While loop problem

Postby Obsidian » 08 Oct 2008, 16:15

Exactly. ;)

CMCDragonkai
New member
New member
Posts: 23
Joined: 06 Sep 2008, 14:59
[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: While loop problem

Postby CMCDragonkai » 09 Oct 2008, 03:49

Cool awesome, so have you found out what $query_global is?


[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 Development discussion”

Who is online

Users browsing this forum: No registered users and 3 guests