functions_cute_url.php
- igorw
- 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: functions_cute_url.php
Read the hooks_system.html in the docs folder of phpBB. All you have to do is name the file accordingly (hook_something.php?) and put it into includes/hooks. And you need to make sure cute_urls are available globally.
- we're poor!
-
- Supporter
- Posts: 32
- Joined: 12 Aug 2009, 16:16
- Real name: David
- Contact:
Re: functions_cute_url.php
phpBB.com Development Team Member | |
Please do NOT contact for support via PM or email.
Please do NOT contact for support via PM or email.
- Derky
- Supporter
- Posts: 27
- Joined: 21 Aug 2006, 19:23
- Real name: Derk
- Location: The Netherlands
- Contact:
Re: functions_cute_url.php
• Demo •
- tumba25
- Past Contributor
- Posts: 1058
- Joined: 24 Oct 2007, 13:10
- Real name: Jari Kanerva
- Location: Kokkola, Finland.
- Contact:
Re: functions_cute_url.php
Thanks for the fix, Derky and Igor.
Re: functions_cute_url.php
FWIW, the OpenFlame dev team has developed something inspired by the cute_urls code, with some improvements.
http://github.com/OpenFlame/OpenFlame-F ... andler.php
With OfUrlHandler->checkExtra() you can also check if there is any other parts to the path specified left
i.e. if you are expecting http://yoursite/page/somepage/ but not http://yoursite/page/somepage/someextra ... should404/ then you can use the checkExtra() call to detect that there is another entry for 'someextrastuff' and 'pageshould404' and be able to properly react to it (like, 404'ing because the page specified is invalid)
At the moment, cute_urls does not provide this functionality at all.
There are a few other improvements as well, but I can't think of them off the top of my head.
Also, to note, this is an entirely standalone library file; it is not dependent on the framework it resides in, nor any other system.
http://github.com/OpenFlame/OpenFlame-F ... andler.php
With OfUrlHandler->checkExtra() you can also check if there is any other parts to the path specified left
i.e. if you are expecting http://yoursite/page/somepage/ but not http://yoursite/page/somepage/someextra ... should404/ then you can use the checkExtra() call to detect that there is another entry for 'someextrastuff' and 'pageshould404' and be able to properly react to it (like, 404'ing because the page specified is invalid)
At the moment, cute_urls does not provide this functionality at all.
There are a few other improvements as well, but I can't think of them off the top of my head.
Also, to note, this is an entirely standalone library file; it is not dependent on the framework it resides in, nor any other system.
-
- 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: functions_cute_url.php
Hello,
This code works with index.php but if I'm creating others pages this code doesn't work.
I've got : index.php / about.php / etc.
How fix it?
Best regards.
This code works with index.php but if I'm creating others pages this code doesn't work.
I've got : index.php / about.php / etc.
How fix it?
Best regards.
- tumba25
- Past Contributor
- Posts: 1058
- Joined: 24 Oct 2007, 13:10
- Real name: Jari Kanerva
- Location: Kokkola, Finland.
- Contact:
Re: functions_cute_url.php
Did you follow [url=http://phpbbmodders.net/board/viewtopic.php?p=16186#p16186]these instructions[/url]?
-
- 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: functions_cute_url.php
Yes. But this code doesn't work outside index.php... :s
I'd like this: http://phpbbmodders.net/about/rules/
But I'd like create a separate page for each thing.
I'd like this: http://phpbbmodders.net/about/rules/
But I'd like create a separate page for each thing.
-
- 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
-
- New member
- Posts: 1
- Joined: 23 Jan 2012, 01:46
- [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: functions_cute_url.php
Thanks for the codes!
Who is online
Users browsing this forum: No registered users and 8 guests