News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Pretty URLs

Started by SMFHacks.com Team, January 31, 2007, 10:56:43 AM

Previous topic - Next topic

vbgamer45

You can just not recommend for actions. I use pretty urls on my sites but only change the boards and topics
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

sneakers

Despite the added "register" to Skip Actions List is still not working... :(


vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

TeenProblems

Hello here is my problem :P

We are using Pretty URL's in our forum.The forum is in Cyrillic alphabet and Bulgarian language.

I edited manually the main category's links but inside them is a mess.

I mean that:

teenproblems.eu/international-teen-section/ - main category

teenproblems.eu/index.php?topic=33.0 - inside this category...

So how can we made the URL'S of new topics to be converted :
topic name: Здравейте
url to be: hxxp:teenproblems.eu/zdraveite [nonactive]

Any advice,and sorry for my bad english

GearHeadCamping

When I click on a thread, the url shows a description for a different thread.

A few days ago, I created a test thread.  I then deleted the test thread, after my testing was finished.  I see that when I click on one of the threads, it shows the name of the test thread in the URL. 

This is only happening in one board and only on some threads in that board.

My forum is hxxp:ocjeepruns.com/forum/oc-motorsports-runs-and-events-forum/ [nonactive]

Any help is appreciated.

Jade Elizabeth

I moved my domain. Nothing works. Please help me change the urls from the old ones to the new ones!
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Grr I got it. That was seriously unnecessary hassle....does it have to be like that? Can't I have a maintenance button to click?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

vbgamer45

Well the hard is if you are rewriting actions that would be the only way to reset the links with the custom script
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

Any chance we can have the action rewriting subsystem be a little smarter please?

Having it scan the index.php file for actions is only any good if 1) mods only ever do that (I know at least one of mine didn't modify $actionArray) and 2) users don't have mods that add them via hooks (which several of mine do as do plenty of others)

This could be done by attaching something to the integrate_actions hook (but checking periodically to make sure it's the last hook), but probably better for all concerned would be having pretty_run_maintenance() actually call integrate_actions to scoop up any that add themselves via hooks.

If I'm reading it correctly, Subs-PrettyUrls.php should be the place to do this:

preg_match_all('~\'([^\']+)\'\\s*=>~', $actionArrayText[0], $actionArray, PREG_PATTERN_ORDER);
$context['pretty']['action_array'] = $actionArray[1];


Code (add after) Select
if (function_exists('call_integration_hook'))
{
$dummy = array();
call_integration_hook('integrate_actions', array(&$dummy));
$context['pretty']['action_array'] += array_keys($dummy);
}


Untested, but if I'm reading it correctly this should do the trick to scoop up anything from hooks.
Holder of controversial views, all of which my own.


Jade Elizabeth

Why can't it just use $boardurl? Some of my mods use hooks too :/
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Arantor

Um... I don't really know how to reply to that first part... it's nothing whatsoever to do with $boardurl.

The problem is the .htaccess file generated. The way Pretty URLs works is by knowing all the actions and building an .htaccess file that has all the actions in it to catch in the rewrite rules, because it has to sift out the actions before it redirects to boards.
Holder of controversial views, all of which my own.


Arantor

vbgamer: Any chance of updating Pretty URLs as mentioned above? It would greatly improve compatibility with mods.
Holder of controversial views, all of which my own.


vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Skaty

What should i do to relief my database, i think pretty url is tiring it. is it ? 

Arantor

Quote from: Arantor on November 09, 2013, 05:02:11 PM
vbgamer: Any chance of updating Pretty URLs as mentioned above? It would greatly improve compatibility with mods.

Please add it, I would rather have it around sooner rather than later because something I want to add in 2.1 for performance reasons will absolutely screw up Pretty URLs handling for mods that use it (which they should) and I'll make sure that the new changes get propagated back through that hook instead of you having to jump through the extra hoops required to support it.

(Basically, I'm adding the facility to package-info.xml to declare actions much as one can declare hooks in 2.1, to avoid having to create a file loaded every page unnecessarily.)
Holder of controversial views, all of which my own.


vbgamer45

Changes made published
Pretty URLs 1.1.1
+ Smarter rewriting subsystem for actions Thanks to Arantor


If you want to be added to svn access let me know it is hosted on google code.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

Thanks - but I don't really have time to sit and work on that as well :(
Holder of controversial views, all of which my own.


nfpuu1u

Hi,

Quote from: vbgamer45 on November 12, 2013, 03:39:40 PM
Changes made published
Pretty URLs 1.1.1
+ Smarter rewriting subsystem for actions Thanks to Arantor

just wanted to update my SMF 2.0.6 running Pretty URLS 1.1 to the new package. Because i don't want to uninstall the old package only for one single changed file i compared the changes and just noted that the changes above was only added to:

SMF1-1/Subs-PrettyUrls.php

but not to:

SMF2-0/Subs-PrettyUrls.php

in the current PrettyUrls1.1.1.zip. Are those changes not needed for SMF 2.0.x?

Arantor

The changes wouldn't even be applicable in 1.1.x because the call_integration_hook functionality doesn't even exist in 1.1.
Holder of controversial views, all of which my own.


Advertisement: