Simple query for icons

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
[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
Sat01
New member
New member
Posts: 49
Joined: 25 Jul 2008, 23: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

Simple query for icons

Postby Sat01 » 26 Jul 2008, 00:32


User avatar
momentum
New member
New member
Posts: 32
Joined: 28 Feb 2008, 04:54
Real name: Craig
Location: Melbourne, Australia
Contact:

Re: Simple query for icons

Postby momentum » 26 Jul 2008, 06:12

So you want the topic icon normally seen next to each topic on the viewforum pages to also show on the index page? is that right?

Craig.

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: Simple query for icons

Postby igorw » 26 Jul 2008, 13:38

The way you are currently doing it is going to use a query in a loop, which is a bad thing. Never do a query in a loop. You can use $cache->obtain_icons(); to get all icons, and you could try to obtain which post has which icon in one separate query.

Tell me if that's any good, else i'll go into more detail. ;)

- we're poor!

Sat01
New member
New member
Posts: 49
Joined: 25 Jul 2008, 23: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: Simple query for icons

Postby Sat01 » 26 Jul 2008, 15:35


Sat01
New member
New member
Posts: 49
Joined: 25 Jul 2008, 23: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: Simple query for icons

Postby Sat01 » 28 Jul 2008, 00:08

anyone?

Sat01
New member
New member
Posts: 49
Joined: 25 Jul 2008, 23: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: Simple query for icons

Postby Sat01 » 01 Aug 2008, 19:36

Hey guys can you tell me at least if it's better removing that query. Reading the evil<3 post, i wouldn't like to risk.

Sat01
New member
New member
Posts: 49
Joined: 25 Jul 2008, 23: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: Simple query for icons

Postby Sat01 » 22 Aug 2008, 05:53

Ok I've tried anything to get icons on index, but it seem impossible :( my functions_display is stressed too :roll: So, if someone feel like working on this mod, help yourselves! At least i can learning a little php :)

Thanks for ur support guys! See ya ;)


[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
[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 15 guests