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

It should be in the side menu. Are you using a language other than English? You might have to copy the language strings from modifications.english.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."

phpmycoder

Quote from: gigitravels on May 27, 2008, 07:31:55 PM
1. is it possible to remove board names from the URL's? could you please outline the steps (the alternative htaccess lines and the few code modifications required)?

It's possible yes. You'd have to edit the rewrite rules and the callback functions. You'd have to tell me exactly what you want to change them to if you want me to tell you the steps...

all i need is URL's without any board names. so the URL would look like:

www.forum.com/topic/

and that's it. i assume i would need to remove 'board=$1;' from htaccess, comment '$topicData[$url['topic_id']]['pretty_board']' in PrettyUrls-Filters.php, and i might be able to figure out the rest but i'd really have you shortly outline the steps so i won't screw something up there :)


Quote from: gigitravels on May 27, 2008, 07:31:55 PM
2. for an odd reason at least on my board, the action url's in the Admin area, specifically for Packages and Smileys, don't work (i get referred back to the home page). all other admin url's work. any idea???


I don't know why that would be. Anything in the error log? Have you run maintenance?

nothing in php/mysql/apache/smf error logs, and i ran maintenance. but i'd let this be for now, the 'boardless url's' are more important..

thanks a lot for your help!
gigi

CraigPal

I'm using SFM Sitemap but I've noticed the urls haven't changed in the Sitemap. Would this be a problem? I want the search engines to index the new urls. I've tried uninstalling SMF Sitemap but get an error when I do.

Thanks

Anarchy

Quote from: Dannii on May 28, 2008, 07:18:29 AM
It should be in the side menu. Are you using a language other than English? You might have to copy the language strings from modifications.english.php.

yes the language was Turkish for my users , thanks a lot !

Dannii

Quoteall i need is URL's without any board names. so the URL would look like:

www.forum.com/topic/
If you do that, how will it tell boards and topics apart?

QuoteI'm using SFM Sitemap but I've noticed the urls haven't changed in the Sitemap. Would this be a problem? I want the search engines to index the new urls. I've tried uninstalling SMF Sitemap but get an error when I do.
Look back over the past pages (or search) people have asked about this before.
"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."

CraigPal


QuoteLook back over the past pages (or search) people have asked about this before.

I tried searching. Now, if I search for SMF Sitemap and Pretty URLs, all I get is my post above. If I leave out "SMF" all I get are posts of people listing what mods they have installed. Oh well. I guess I've got more reading to do.

I like your mod.

CraigPal

Here's what I did. I backed everything up, uninstalled SMF Sitemap despite the warning. It went without a hitch.  I reinstalled it and the sitemap is now using the Pretty URLs! 

Dannii

How very strange! Good to hear it's working now though.
"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."

CraigPal

Quote from: Dannii on May 29, 2008, 01:22:57 AM
How very strange! Good to hear it's working now though.

It may have been a bug in the previous version of SMF Sitemap.  It didn't seem to add anymore links after I initially installed it. When I went to download the mod, it said that it's now compatible with Pretty URLs. Now, my sitemap xml page is about four times as long and uses the Pretty URLs. If anyone else has the problem I had, I recommend updating to the latest version of SMF Sitemap.

Another possibility is that Pretty URLs have to be installed before SMF sitemap in order for the sitemap to use them. I don't know for sure, I'm just a noob. Maybe my original mod was just corrupt.

phpmycoder

Quote from: Dannii on May 28, 2008, 06:44:54 PM
Quoteall i need is URL's without any board names. so the URL would look like:

www.forum.com/topic/

If you do that, how will it tell boards and topics apart?

I will use the sef mod for topics only (not boards).

CraigPal

Quote from: gigitravels on May 29, 2008, 05:22:07 PM
Quote from: Dannii on May 28, 2008, 06:44:54 PM
Quoteall i need is URL's without any board names. so the URL would look like:

www.forum.com/topic/

If you do that, how will it tell boards and topics apart?

I will use the sef mod for topics only (not boards).

I know there is some debate about this but having the key words of the board name in your URLs might help in SEO.

CraigPal

I'm curious about how the extentionless URLs work. Are they invisible or is there really no extension at all?
I've tried typing in index.html, index.htm, index.php and nothing worked.  How do browsers know what type of page it is if there really is no extension? What type of page IS it anyway?

I know it's pretty trivial but I'm dying to know how that works. I really do appreciate your work.
I've seen people say, in reference to SMF itself things like "this is just unacceptable!" Hey, beggars can't be choosers! Go and buy some software, THEN you might have the right to say such things.

I feel like you go unappreciated sometimes. So, I'd really like to say a big THANK YOU for all your time and work

Dannii

QuoteI will use the sef mod for topics only (not boards).
Ahhhh, okay then. Give me a little bit of time and I'll get back to you.

QuoteI'm curious about how the extentionless URLs work. Are they invisible or is there really no extension at all?
There is none.
QuoteI've tried typing in index.html, index.htm, index.php and nothing worked.  How do browsers know what type of page it is if there really is no extension? What type of page IS it anyway?
Browsers don't care at all about the extension, they determine what to do with the page based on it's MIME type. PHP is still set to send text/html so the browsers are happy.
"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."

malcomxar

Hey, i have just found a problem in my forum and with this particular mod
Teh thing is that I installed this mod in my forum, but there was one particular forum wich I couldn't enter cause it would load a blank page. The forum's name was "Métodos de Pago" (my forum is in spanis :)) and i thought... "maybe if i change the forum's name will do". Did so, but didn't work.
Then i created another forum to move la the topics in "metodos de pago" to it, but i had the same problem (After moving the topics but not before) so i thoung "it must be a topic"
So i started moving one thread by one and enablig/disabling pretty urls after that (took a while xD) till i found the problematic topic and that topic's title was "Duda sobre Western Union".

I thought it was really weird, so i tried using that Title in your url's test forum...
AS you can see, i crahsed down your forum :S
It wasn't my intention to do so, i thought it was an odd thing particularly happening in my forum, thats why i tried in yours.
I really, really really apologize.
Once again i say it wasn't my intention.

Dannii

Ahhh. hmm. I thought I had fixed that bug.
"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."

malcomxar

BTW i am using .     Pretty URLs - Base      0.8.3

Which is the bug?
A word in particular?

Dannii

Yeah union isn't an allowed word. Well it can be, I've just done something weird with the query.
"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

In PrettyUrls-Filters.php
Code (find) Select
$add_new[] = '(' . $row['ID_TOPIC'] . ', "' . addslashes($pretty_text) . '")';
Code (replace) Select
$add_new[] = '(' . $row['ID_TOPIC'] . ', \'' . addslashes($pretty_text) . '\')';
"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."

L'AltroWeb

Hi i have installed this mod and it works fine, except for thanks mod and topX:
This is the error with thanks mod (by Meo):
GET http://darkwolf.altervista.org/forum/annunci-staff/bannati-ed-eliminati-account-con-email-'momentanee'/msg966/index.php?action=thanks&arg=966
document.getElementById(update[0]) has no properties
meo_handleResponse()#msg966 (line 161)
meo_sndReq("thanks", "966")#msg966 (line 151)
onclick(click clientX=0, clientY=0)#msg966 (line 1)
[Break on this error] var update2 = update[0] + 'b';

For topX instead problem is "standard" url.
You can see or test here: http://darkwolf.altervista.org/forum/index.php
Thanks in advance, DarkWolf  :)

Dannii

Can you explain the problem with the thanks mod more please?

The problem with the top 10 mod is that it's using relative rather than absolute URLs.
"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: