News:

Join the Facebook Fan Page.

Main Menu

Pretty URLs

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

Previous topic - Next topic

Dannii

Okay, this is an experimental package that will hopefully 301 redirect SEO4SMF topic and board URLs to the ones used in this mod. I can't really test it, but as it's very simple code, I'm pretty sure it will work fine. After you've installed Pretty URLs, upload and install this package too.
"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."

Kevin Paquet

Oh, ok, thanks :D
Anyway, I'm having a problem, I had a forum category named
<font color="red">Announcements</font> and then with the mod installed, I clicked on it, it brought me to an error page x_X
I edited the category to simply, announcements, but still error

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."

Kevin Paquet

http://pinoyteens.net click on the announcements so you'll see.. error page

Col

Eldecar,

I think Pasaway is using HTML in the board title to change the text colour to red. The HTML is being passed into the URL - not a failed attempt at using HTML to colour the word 'Announcement' in Pasaway's post here! I can't be certain because the board is now working and the colour is standard.

Dannii

I can't tell everything when it's switched off! :)
"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."

Kevin Paquet

Quote from: Col on September 01, 2007, 08:23:37 AM
Eldecar,

I think Pasaway is using HTML in the board title to change the text colour to red. The HTML is being passed into the URL - not a failed attempt at using HTML to colour the word 'Announcement' in Pasaway's post here! I can't be certain because the board is now working and the colour is standard.

Sorry, I have had the mod uninstall now, since my new members were not able to enter the Introduction forum since  I have had named it <font color="orange">Introduction</font> before I installed the mod

Dannii

What you can do is remove the <font> tag (which is just terrible HTML btw!), delete the database settings, reinstall the mod, and then add it back again.
"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."

Kevin Paquet

smf_pretty_urls_cache
smf_pretty_topic_urls

that?

Dannii

No, pretty_board_lookup and pretty_board_urls from smf_settings.
"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."

Kevin Paquet

IDK how to do that :(
How about dropping the said above?

Dannii

You can try uploading this file in the same location as SSI.php and running it. Remember to delete it afterwards!
http://prettyurls.googlecode.com/svn/trunk/uninstall.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."

Kevin Paquet

Uhm, and where is SSI.php located? :(

Dannii

Usually wherever your forum's index.php is...
"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."

viulian

I encountered several issues while trying to get pretty urls installed.

First, after reading this whole thread, I decided the best way is to get the SVN version. Which I did, put all the files in Base/ directory in a zip, and uploaded as package.
Tests went fine, and when I hit the "Install" button, it sits a while (let's say 30 seconds) then it complains about "Hacking Attempt...".

After investigating the files in the package, I saw that .php files were copied into the Souces directory so I decided to copy install.php into the main folder (/community/) alongside with SSI.php and accessed it by URL.

And then something strange happens, and still is:

Load average started to increase slowly, from something 0.02 to now:

load average: 54.27, 43.52, 27.76

and continues to rise.

As I'm writting this, it got to 56.82 (watching it using top - have an SSH account too).

However, I'm not able to kill the process (it's been running for 35 mins now), nor do I see any data being populated in the two additional tables.

One thing: I have mkportal installed - and some redirects I did by hand previously in my .htaccess file (for example removing links with PHPSESSION).

Ok, load is now 72.59, 56.82, 36.63

Time to call the sysadmin :)

Kevin Paquet


Dannii

QuoteFirst, after reading this whole thread, I decided the best way is to get the SVN version.
It's not... various things in SVN are at different stages of development, so unless you absolutely need bug fixes, I wouldn't recommend using SVN.

How big is your forum?
"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."

viulian

Well, yes, you are right about SVN. I was eager to have the bug with the board names containing ' chars fixed :)
I don't even know if the way I tried the manual installation was the correct one.

Forum is ~50.000 posts in ~ 4100 threads.

The machine required a reboot after reaching load of 250. The system is a dedicated one (only a couple of domains hosted) and it usually hovers around 100 processes, most idle. During the 'rush' it went to 400 processes, and before it reached too much load I started to get "Too many connections" when trying to connect to MySQL.

The story continues :D system was rebooted, but somehow the install.php (the one next to SSI.php) got started again via a redirect or something, and the same 'rush' started all over again.
I figured out that if a lot of httpd processes are started, there's a chance that the install.php might call itself or something, so I tried

rm ~/htdocs/community/install.php
rm ~/htdocs/community/Sources/Pretty*.php

In a couple of minutes everything went back to normal.

I have to go now, but I'll enter later and explain how I tried to install the plugin manually (do not know if I did it correctly, that is).

viulian

#638
Ok, I tried installing the 0.7 version, here's what I get:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'o-noua-provocare"), (3180, "traieste-clipa"), (3181, "sexul-a-fi-sau-a-nu-fi!"),' at line 3
File: [...]/htdocs/community/Sources/Subs-PrettyUrls.php
Line: 233


About the manual installation, here are the steps I did:

a) tried installing the base from SVN - complained about hacking alert.
b) checked if the new tables are in the database - they were but no data was present. Sources/ folder seemed to contain the .php files in the package.
c) checked the install.php file, it had a header saying that the recommended way was the "Package manager", etc, decided to give it a shot by accessing the URL. (I don't have Error log active)
d) Put install.php alongside with SSI.php and give it a go.

I did not apply any changes in the .xml files, just copied install.php in the forum's baseurl and started it O:) I know it's a stupid way to do - but I was extreeeemely tired and somehow thought that the install.php is smart enough to also apply the .xml file or something.

Dannii

#639
QuoteForum is ~50.000 posts in ~ 4100 threads.
Okay.. that should be alright. Just checking it wasn't some 2 million post thing. I wouldn't have though 4k would be a problem, but maybe it does need something to split the queries up.

QuoteThe story continues :D system was rebooted, but somehow the install.php (the one next to SSI.php) got started again via a redirect or something, and the same 'rush' started all over again.
I figured out that if a lot of httpd processes are started, there's a chance that the install.php might call itself or something, so I tried
Hmmm, I don't see how it could restart itself. It just runs straight through once.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'o-noua-provocare"), (3180, "traieste-clipa"), (3181, "sexul-a-fi-sau-a-nu-fi!"),' at line 3
File: [...]/htdocs/community/Sources/Subs-PrettyUrls.php
Line: 233
Is there anyway you can get the whole query? Check the forum's error log, it hopefully will be there.

QuoteI did not apply any changes in the .xml files, just copied install.php in the forum's baseurl and started it O:) I know it's a stupid way to do - but I was extreeeemely tired and somehow thought that the install.php is smart enough to also apply the .xml file or something.
It doesn't, but seeing as install.php is the last thing to be done, it's possible the xml file changes were finished already.
"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: