functions_cute_url.php

Support for the .
User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor

Re: functions_cute_url.php

Postby igorw » 13 Mar 2010, 10:57

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!

imkingdavid
Supporter
Supporter
Posts: 32
Joined: 12 Aug 2009, 16:16
Real name: David

Re: functions_cute_url.php

Postby imkingdavid » 13 Mar 2010, 13:58

phpBB.com Development Team Member | |
Please do NOT contact for support via PM or email.

User avatar
Derky
Supporter
Supporter
Posts: 27
Joined: 21 Aug 2006, 19:23
Real name: Derk
Location: The Netherlands

Re: functions_cute_url.php

Postby Derky » 05 Oct 2010, 21:03

• Demo •

User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.

Re: functions_cute_url.php

Postby tumba25 » 05 Oct 2010, 23:10

Thanks for the fix, Derky and Igor.

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

Re: functions_cute_url.php

Postby Obsidian » 12 Oct 2010, 15:52

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.

Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique

Re: functions_cute_url.php

Postby Dakin Quelia » 06 Oct 2011, 20:08

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.

User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.

Re: functions_cute_url.php

Postby tumba25 » 07 Oct 2011, 01:33

Did you follow [url=http://phpbbmodders.net/board/viewtopic.php?p=16186#p16186]these instructions[/url]?

Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique

Re: functions_cute_url.php

Postby Dakin Quelia » 07 Oct 2011, 01:36

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. ;)

Dakin Quelia
New member
New member
Posts: 49
Joined: 12 Nov 2008, 01:26
Real name: Daniel
Location: Belgique

Re: functions_cute_url.php

Postby Dakin Quelia » 07 Oct 2011, 04:09


marcuseward
New member
New member
Posts: 1
Joined: 23 Jan 2012, 01:46

Re: functions_cute_url.php

Postby marcuseward » 23 Jan 2012, 01:51

Thanks for the codes!


[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 “Library”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests