Pretty URLs

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

Previous topic - Next topic

SMFHacks.com Team

Link to the mod

Pretty URLs is a URL management package for Simple Machine Forums (SMF).

It is simple, powerful, extensible and free. Most of all, it is pretty! Its main purpose is to rewrite the important SMF URLs, like these:

Works with both Apache and Nginx (Requires rules to be copied to Nginx configuration).

  • http://domain.com/board/topic/
  • http://domain.com/profile/user/
  • http://domain.com/unreadreplies/

Pretty URLs will work with SMF 2.1.x, SMF 2.0x, SMF 1.1.x It requires an Apache webserver with support for mod_rewrite and .htaccess files.

prettyurls-extras-1.0-RC.zip - Provides rewrite filters for mods including seo4smf, Tinyportal Articles, Tagging System, Download System, ezPortal Pages, SMF Gallery, SMF Articles, SMF Classifieds, and SMF Store

Need more SEO and features? Check out Pretty Urls SEO Pro https://www.smfhacks.com/prettyurls-seo-pro.php

Overview and installation info

Need help? Check the trouble shooting page first!

Pretty URLs is released under a new BSD licence
Copyright (c) 2006-2023 The Pretty URLs Contributors
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

KGIII

* KGIII decides to poke at it seeing as no one else seems to have made much use of it.

Wish me luck. ;)

Anything I need to know before hand? (Going to try it on a dev site first I suppose so, I probably won't actually get a response from you before I've broken stuff.)

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

RoarinRow

Can you post a screen shoot?   :)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Mick.


RoarinRow

Quote from: BlueDevil on January 31, 2007, 07:03:35 PM
Bump!

I installed on my test server and didn't see anything that jumped out on me.  It was looing a my base URL, but no sure what it was supposed to do.

I deleted for now.

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Dannii

Quote from: RoarinRow on January 31, 2007, 12:50:38 PM
Can you post a screen shoot?   :)
There isn't anything to post a screen shot of. It changes the urls of your forum, not the templates.

You can see an example of it at: http://dev.eldacar.com/prettyurls/index.php
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Dannii

Links: (I can't edit the above sorry)

Home page: http://code.google.com/p/prettyurls/
Source code: http://prettyurls.googlecode.com/svn/trunk/
Download: http://code.google.com/p/prettyurls/downloads/list
Example/dev forum: http://dev.eldacar.com/prettyurls/

Please post and spam anything you like in the dev forum, especially if it uses funky characters.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Vinspire

I don't get the idea of what this mod is suppose to do. Can anyone explain ? :(

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

webmistress

I just installed this and highly recommend it.  

Vinspire

Quote from: eldʌkaː on January 31, 2007, 09:13:12 PM
Turn http://dev.eldacar.com/prettyurls/index.php?topic=1.0 into http://dev.eldacar.com/prettyurls/general-discussion/welcome-to-smf/0/ :)

Oh i c .... I got the idea and I think it is Awesome. Will check it out later.

Thanks for the explaination and such a great mod eldʌkaː :)

Dannii

To install:
  • Download and install the base package from the mod site.
  • Using FTP, rename example.htaccess to .htaccess
  • Download the extension-none (and the TP-ext-none if you use TinyPortal) package from the Package List, or just from the site directly, and then install them.

    Please note that this mod is still in beta testing (by you!), so there could be problems. I've been using it my live site for a few months though, and haven't had any serious issues.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GetRank

#12
can someone help install this mod to RC3 ?

errors in RC3 (top of the forum)

Notice: Undefined index: pretty_board_urls in /home/****/public_html/forum/index.php on line 75

Notice: unserialize(): Argument is not a string in /home/****/public_html/forum/index.php on line 75


Quote from: index.php line 75$context['pretty']['board_urls'] = unserialize($modSettings['pretty_board_urls']);

error during the installation (to RC3)

Fatal error: Call to undefined function: generateprettyurl() in /home/****/public_html/forum/Packages/temp/prettyurls-base_0_3/install.php on line 34

Quote from: install.php line 34$pretty_text = generatePrettyUrl($row['name']);

Dannii

1.1 RC3 isn't supported sorry. Can you upgrade to 1.1.1?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

NEMINI

#14
Hit an error on Sources/BoardIndex.php  found it to be related to using the board viewers mod.  The fix was to make one change to the installation routine

change:
<operation>
<search position="replace"><![CDATA[
'new' => empty($row_board['isRead']) && $row_board['posterName'] != '',
'topics' => $row_board['numTopics'],
'posts' => $row_board['numPosts'],
'href' => $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0">' . $row_board['boardName'] . '</a>'
);
]]></search>
<add><![CDATA[
'new' => empty($row_board['isRead']) && $row_board['posterName'] != '',
'topics' => $row_board['numTopics'],
'posts' => $row_board['numPosts'],
'href' => $modSettings['pretty_root_url'] . '/' . (isset($context['pretty']['board_urls']) ? $context['pretty']['board_urls'][$row_board['ID_BOARD']] : $row_board['ID_BOARD']) . '/0/',
);
$this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']]['link'] = '<a href="' . $this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']]['href'] . '">' . $row_board['boardName'] . '</a>';
]]></add>
</operation>

to:
<operation>
<search position="replace"><![CDATA[
'href' => $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0">' . $row_board['boardName'] . '</a>'
);
]]></search>
<add><![CDATA[
'href' => $modSettings['pretty_root_url'] . '/' . (isset($context['pretty']['board_urls']) ? $context['pretty']['board_urls'][$row_board['ID_BOARD']] : $row_board['ID_BOARD']) . '/0/',
);
$this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']]['link'] = '<a href="' . $this_category[$row_board['ID_PARENT']]['children'][$row_board['ID_BOARD']]['href'] . '">' . $row_board['boardName'] . '</a>';
]]></add>
</operation>


The string is still unique and what I removed remained uneditted anyway so no real need for it to be included.
signatures are boring.

NEMINI

I should add the above is found in Major.xml in the prettyurls-ext-none_0_3.tar.gz package
signatures are boring.

Dannii

Hmmm, honestly, I can't remember why I have that long search string. I'll have a look at changing it for the next release :)
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

KGIII

eldʌka...

I will have you know that I had to install that HUGE thing manually. Every last bit (I tried the above tweak but I have a heavily modified forum) of it in the MessageIndex.php file... So far, as near as I can tell, I only missed one comma and everything seems to be working just fine. It installed perfectly on a pretty bare version of SMF but for those of us with modifications (and even with default themes) it is possible but plan on spending a few minutes with it.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

NEMINI

I've a few modsinstalled myself:
1.  TinyPortal 97 1.1.1 FIX 
2. Custom Profile Field Mod
3. Active Members In Topic
4. Coppermine Userpics
5. Treasury
6. SMF Arcade
7. Board Viewers Mod
8. Custom Action Mod
9. Karma Description Mod
10. Merge Double Posts
11. Enhanced Quick Reply
12. Global Announcements
13. Googlebot & Spiders Mod
14. SMF Shoutbox 
15. SMF Links
16. MessagePreviewOnHover
17. New Topic Button
18. SmileyLimit
19. Reason For Editing Mod
20. Automatically Remove Inbox Label Mod
21. Signature Settings Mod
22. SMF Staff Page 
23. Sticky First Post (extends sticky topic)
24. Trim Url
25. User Email System
26. Users Online Today Mod
27. User Post Limit Options
28. Google Member Map
29. Enhanced Calendar
30. RSS Feed Poster
31. Enable/Disable Themes
32. FontandSizeDropdown1.1
33. Ignore user 1.3
34. Pretty URLs - Base
35. Pretty URLs - TinyPortal - Extention: none
36. Pretty URLs - Extention: none


But board viewers was the only one that caused an issue for me.
signatures are boring.

Dannii

Quote from: KGIII on February 01, 2007, 08:30:50 AMI will have you know that I had to install that HUGE thing manually. Every last bit (I tried the above tweak but I have a heavily modified forum) of it in the MessageIndex.php file... So far, as near as I can tell, I only missed one comma and everything seems to be working just fine. It installed perfectly on a pretty bare version of SMF but for those of us with modifications (and even with default themes) it is possible but plan on spending a few minutes with it.
Ouch! yeah the 51kb one is pretty crazy.. Surely they all weren't conflicting though? Only a few changes should have had problems. And as I plan on adding a ob_exit filter, it won't matter if a few get missed.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Advertisement: