[Question] How use the crawldir function?

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
Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique
[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

[Question] How use the crawldir function?

Postby Dakin Quelia » 19 Aug 2009, 02:47

Hi,

I created a download page and for it I began in using this [url=http://fail.infinityhouse.org/pastebin.php?mode=view&s=5]function[/url]. But I don't understand his functionning.

A little help is welcome. Thanks per advance. ;)

See you soon,
Last edited by Dakin Quelia on 02 Nov 2009, 22:07, edited 1 time in total.

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

Re: [Question] How use the crawldir function?

Postby Obsidian » 19 Aug 2009, 11:18

To start, I'd recommend you read this topic a little bit. You'll see some things in there pertaining to crawldir.
http://phpbbmodders.net/board/viewtopic.php?f=55&t=2977&start=15

Also, that copy of crawldir in my pastebin is a bit old, there's another copy here that is updated and fixes an issue or two.
http://code.assembla.com/phpbb-xerxes/subversion/nodes/trunk/root/includes/crs/extension/extension_crawldir.php#ln43

Also, if you want to see an example of how crawldir is used within a working MOD, I'd recommend you tear [url=http://phpbbmodders.net/board/viewtopic.php?f=37&t=3128]this MOD[/url] apart.

Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique
[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: [Question] How use the crawldir function?

Postby Dakin Quelia » 19 Aug 2009, 11:21

I go to read this topic.

For the mod, I saw but my main goal is make a simple downloa page. ;)

Thank you. ;)

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

Re: [Question] How use the crawldir function?

Postby Obsidian » 19 Aug 2009, 11:35

What is it that you don't understand, specifically?

Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique
[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: [Question] How use the crawldir function?

Postby Dakin Quelia » 19 Aug 2009, 11:41


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

Re: [Question] How use the crawldir function?

Postby Obsidian » 19 Aug 2009, 12:36


Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique
[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: [Question] How use the crawldir function?

Postby Dakin Quelia » 19 Aug 2009, 16:49


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

Re: [Question] How use the crawldir function?

Postby Obsidian » 19 Aug 2009, 17:31

PHP page. This will output what crawldir returns..

Also, that is the old crawldir you are using, I can tell by the results. There was a bug that was fixed with the 1.4.0 release of crawldir, for relative results.

I recommend updating the copy of crawldir that you have to the one that I linked earlier, to avoid the bug from cropping up in your site.

Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique
[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: [Question] How use the crawldir function?

Postby Dakin Quelia » 19 Aug 2009, 17:44


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

Re: [Question] How use the crawldir function?

Postby Obsidian » 19 Aug 2009, 18:01


Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique
[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: [Question] How use the crawldir function?

Postby Dakin Quelia » 19 Aug 2009, 18:08

I tested but it doesn't work. It displays the same message. :(

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

Re: [Question] How use the crawldir function?

Postby Obsidian » 19 Aug 2009, 22:24


Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique
[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: [Question] How use the crawldir function?

Postby Dakin Quelia » 19 Aug 2009, 22:48

I'm sorry to disturb you but it doesn't always work. :(

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

Re: [Question] How use the crawldir function?

Postby Obsidian » 19 Aug 2009, 23:07

No problem. Uhm, there's a copy of a working crawldir over here, http://code.assembla.com/phpbb-xerxes/s ... .php#ln164
1.4.2 was problematic as I was attempting it to be PHP5 compatible only, iirc. This one, 1.4.1, has been field tested and should work.


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