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

Dannii

Did you install the base package?
"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."

SacmaliK

There are a lot of mistakes, Somebody fatal :@

My Mods
Veoh Bbc Tag:here
Topic get Keywords:here
...

Dannii

Piggie, I think i've fixed it. I added a link to index.php, so the base package won't uninstall. I'll include the fix in the next version.

SacmaliK: ?
"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."

Piggie

That's great, and very much appreciated.

You mean, you've altered the installed package, so the unistaller won't work? That's fine. I'm competant enough to that manually if I ever should need to do so, or just alter the uninstaller.

Thanks.

Dannii

#184
Sorry, I added a line to index.php that will break the uninstaller. It won't be hard to change manually.
I'm glad it's working for you :)

How many people put html tags in their board names?
"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."

Piggie

Hi eldʌkaː,

As per my PM, I did sort out the problem with access to some boards. I had used some HTML tags in board titles, but even after removing them the problem remained. I tried editing the pretty_board_urls table, but that just broke the forum again. I eventually forced an uninstall, and manual edited the index.php. After everything looked OK, I reinstalled (and created a new pretty table, by renaming the old one), and again altered the index.php file to match the way you had it. I have noticed since though that boards with an apostrophe in the title are still affected. Fortunately, this was on an empty board that I had decided not to use, so no real problem, but something for you to look at maybe.

Again, Thanks. All is working fine now. :)

Dannii

Yeah quotes/apostrophes can cause some problems.
I could possibly filter out the html tags, if that would be useful for many people. If I don't, I do plan on adding a way to easily change the urls in the admin panel, without having to mess with the database.
"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."

Daniel15

#187
Eldacar, using version 0.4 of your Pretty URLs base package, I get these errors:
Quote
Notice: unserialize() [function.unserialize]: Error at offset 200 of 504 bytes in /var/www/dev/daniel15-web/forum/index.php on line 77

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/dev/daniel15-web/forum/index.php:77) in /var/www/dev/daniel15-web/forum/Sources/Load.php on line 1945

Warning: Cannot modify header information - headers already sent by (output started at /var/www/dev/daniel15-web/forum/index.php:77) in /var/www/dev/daniel15-web/forum/Sources/Load.php on line 1949

Warning: Cannot modify header information - headers already sent by (output started at /var/www/dev/daniel15-web/forum/index.php:77) in /var/www/dev/daniel15-web/forum/Sources/Subs.php on line 3174

Warning: Cannot modify header information - headers already sent by (output started at /var/www/dev/daniel15-web/forum/index.php:77) in /var/www/dev/daniel15-web/forum/Sources/Subs.php on line 3175

Warning: Cannot modify header information - headers already sent by (output started at /var/www/dev/daniel15-web/forum/index.php:77) in /var/www/dev/daniel15-web/forum/Sources/Subs.php on line 3181

Warning: Cannot modify header information - headers already sent by (output started at /var/www/dev/daniel15-web/forum/index.php:77) in /var/www/dev/daniel15-web/forum/Sources/Subs.php on line 3184

$modSettings['pretty_board_urls'] contains:
Quote
a:18:{i:2;s:13:"announcements";i:1;s:18:"general-discussion";i:5;s:11:"web-hosting";i:6;s:24:"computers-and-technology";i:8;s:10:"staff-only";i:19;s:11:"suggestions";i:12;s:23:"the-'thank-you'-board";i:4;s:12:"general-chat";i:3;s:7:"smfshop";i:20;s:27:"smf-akismet-spam-protection";i:10;s:11:"smf-captcha";i:13;s:17:"userbar-generator";i:7;s:20:"shop-button-requests";i:11;s:22:"completed-shop-buttons";i:17;s:6:"coding";i:14;s:5:"items";i:16;s:21:"installation-problems";i:15;s:18:"completed-requests";}

EDIT: My bad, it was an apostrophe in a board name that was causing this.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Dannii

In index.php
Code (find) Select
$context['pretty']['board_urls'] = unserialize($modSettings['pretty_board_urls']);
Code (replace) Select
$modSettings['pretty_board_urls'] = str_replace("'", "\\'", $modSettings['pretty_board_urls']);
$context['pretty']['board_urls'] = unserialize($modSettings['pretty_board_urls']);
I'm not sure that's the best fix, I might try adding the slashes into it when I update the database..
"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."

Lemming

Hi,

just a little question: Is this mod just a "simple version" of this big mod:
http://custom.simplemachines.org/mods/index.php?mod=518
?

ziycon

I've tried but with no luck, can anyone tell me how to remove the '/0/' from the end of the links and put '.html'?????

Thanks in advance.

Daniel15

Quote from: ziycon on March 20, 2007, 12:36:39 AM
I've tried but with no luck, can anyone tell me how to remove the '/0/' from the end of the links and put '.html'?????

Thanks in advance.
As far as I know, the /0/ is for what page number you're on (the second page is /1/, etc.). I could be wrong though, as I haven't really looked into this mod yet.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Dannii

#192
Quote from: Lemming on March 19, 2007, 08:27:04 PMjust a little question: Is this mod just a "simple version" of this big mod: http://custom.simplemachines.org/mods/index.php?mod=518 ?
No, It's a completely different mod written by different people using different methods. Besides, mine is better, it doesn't leave the topic numbers in the URLs ;). I wouldn't say it's simpler, I'd say the other mod is bloated. I have no intention to add sitemaps or social bookmarks, they should be a separate mod. Feel free to try both though :)

Quote from: ziycon on March 20, 2007, 12:36:39 AMI've tried but with no luck, can anyone tell me how to remove the '/0/' from the end of the links and put '.html'?????
You can't currently, but you're perfectly free to write an ext-html package! :D That's why I've written the mod as it is, to allow this kind of extensibility. I won't write an ext-html package as I prefer extension-less urls (and so does Time Berners-Lee), but someone else can. I can give them SVN access too.
However as Daniel15 said, you'd need to keep the 0, it refers to the page. You could however change it to topicname.0.html The second page would actually be the number of posts-per-page setting, just as it is with normal SMF urls. You should know that Dan!
"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."

Daniel15

QuoteYou should know that Dan!
Oops, my bad :P... Yeah, I should have known that ;)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Lemming

All right  ;D

Mh you say that there are no IDs of topics in the URIs - so how can I find out the ID of a topic (for example for SSI polls)?  :)

Dannii

At the moment the other links (mod actions etc) don't have Pretty URLs, so you could check there. When they're rewritten.. I'm not sure lol.
"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."

goitalone

Ok, so this mod is unsafe correct?

schled

I've jumped in the deep end and installed this mod on a live site... hope it isn't unsafe. I haven't noticed any show stoppers. Rather I am really pleased with how well it is working!

goitalone

I am too afraid to install it until I hear some better news but the last few posts here suggested otherwise.

Let me know if it's safe er not.

Also, would this conflict with the search engine friendly URL's option turned on or if it were turned on while this mod was installed?


schled

I am not completely familiar with the SEO mod but I thought that you wouldn't use both mods at the same time as they do very similar things. My guess would be that there would be conflicts between the two mods.

Advertisement: