Advertisement:

Author Topic: Pretty URLs 1.0 - Updated for SMF 2.0  (Read 1558898 times)

Offline SMFHacks.com Team

  • Jr. Member
  • **
  • Posts: 233
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Pretty URLs 1.0 - Updated for SMF 2.0
« on: January 31, 2007, 10:56:43 AM »
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:
  • http://domain.com/board/topic/
  • http://domain.com/profile/user/
  • http://domain.com/unreadreplies/
Pretty URLs will work with SMF 1.1 and 2.0. It requires an Apache webserver with support for mod_rewrite and .htaccess files.

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

Project home page

Overview and installation info

Download!

Need help? Check the trouble shooting page first!

Pretty URLs is released under a new BSD licence
Copyright (c) 2006-2014 The Pretty URLs Contributors

If you want help here, please post live URLs which I can access. Thanks!
« Last Edit: July 21, 2014, 02:21:34 PM by SMFHacks.com Team »
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline KGIII

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,293
  • Gender: Male
  • If you can build it, I can wreck it.
    • Web Hosting
Re: Pretty URLs 0.9.2
« Reply #1 on: January 31, 2007, 11:27:22 AM »
* 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?

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: Pretty URLs 0.9.2
« Reply #2 on: January 31, 2007, 12:50:38 PM »
Can you post a screen shoot?   :)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,649
  • Gender: Male
  • Premium SMF Themes
    • idesign360 on Facebook
    • @idesign360 on Twitter
    • idesign360.com/
Re: Pretty URLs 0.9.2
« Reply #3 on: January 31, 2007, 07:03:35 PM »
Bump!

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: Pretty URLs 0.9.2
« Reply #4 on: January 31, 2007, 07:32:47 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

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: Pretty URLs 0.9.2
« Reply #5 on: January 31, 2007, 08:35:26 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."

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: Pretty URLs 0.9.2
« Reply #6 on: January 31, 2007, 08:38:27 PM »
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."

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: Pretty URLs 0.9.2
« Reply #7 on: January 31, 2007, 09:05:27 PM »
I don't get the idea of what this mod is suppose to do. Can anyone explain ? :(

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
"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."

Offline webmistress

  • Semi-Newbie
  • *
  • Posts: 83
    • Forum for customers and potential customers
Re: Pretty URLs 0.9.2
« Reply #9 on: January 31, 2007, 09:22:06 PM »
I just installed this and highly recommend it.  

Offline Vinspire

  • Sr. Member
  • ****
  • Posts: 852
  • Gender: Male
    • The Box Of Heart Forum
Re: Pretty URLs 0.9.2
« Reply #10 on: January 31, 2007, 09:51:18 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ː :)

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: Pretty URLs 0.9.2
« Reply #11 on: January 31, 2007, 09:58:27 PM »
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."

Offline GetRank

  • Semi-Newbie
  • *
  • Posts: 26
    • Webmaster Tools and Seo Tools
Re: Pretty URLs 0.9.2
« Reply #12 on: January 31, 2007, 10:30:06 PM »
can someone help install this mod to RC3 ?

errors in RC3 (top of the forum)
Code: [Select]
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)

Code: [Select]
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']);
« Last Edit: January 31, 2007, 10:37:33 PM by Toma-HawK »

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: Pretty URLs 0.9.2
« Reply #13 on: January 31, 2007, 10:38:19 PM »
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."

Offline NEMINI

  • SMF Hero
  • ******
  • Posts: 1,570
  • Gender: Male
Re: Pretty URLs 0.9.2
« Reply #14 on: January 31, 2007, 11:00:33 PM »
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:
Code: [Select]
<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:
Code: [Select]
<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.
 
« Last Edit: January 31, 2007, 11:02:39 PM by NEMINI »
signatures are boring.

Offline NEMINI

  • SMF Hero
  • ******
  • Posts: 1,570
  • Gender: Male
Re: Pretty URLs 0.9.2
« Reply #15 on: January 31, 2007, 11:04:36 PM »
I should add the above is found in Major.xml in the prettyurls-ext-none_0_3.tar.gz package
signatures are boring.

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: Pretty URLs 0.9.2
« Reply #16 on: January 31, 2007, 11:09:14 PM »
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."

Offline KGIII

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,293
  • Gender: Male
  • If you can build it, I can wreck it.
    • Web Hosting
Re: Pretty URLs 0.9.2
« Reply #17 on: February 01, 2007, 08:30:50 AM »
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?

Offline NEMINI

  • SMF Hero
  • ******
  • Posts: 1,570
  • Gender: Male
Re: Pretty URLs 0.9.2
« Reply #18 on: February 01, 2007, 05:13:12 PM »
I've a few modsinstalled myself:
Code: [Select]
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.

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: Pretty URLs 0.9.2
« Reply #19 on: February 01, 2007, 07:55:37 PM »
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.
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."