News:

Wondering if this will always be free?  See why free is better.

Main Menu

Pretty URLs

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

Previous topic - Next topic

Dannii

Quote from: Özgür´ on April 29, 2009, 11:57:14 AM
http://code.google.com/p/prettyurls/issues/detail?id=59
Dannii i write some code and work me.. Are you interested?
I'm vazgec

Subs-Prettyurls.php
Find

// Output the file
$handle = fopen($boarddir . '/.htaccess', 'w');
fwrite($handle, $htaccess);
fclose($handle);

Replace

// open htaccess
$fh = fopen($boarddir . '/.htaccess', 'r');
// read data
$theData = fread($fh, filesize($boarddir . '/.htaccess'));
// close htaccess
fclose($fh);
// copy file line from "# Pretty URLs mod" up.
$part = explode('# Pretty URLs mod', $theData);
// open file
$handle = fopen($boarddir . '/.htaccess', 'w');
// Write pretty and other code
fwrite($handle, $part[0].$htaccess);
// close file
fclose($handle);

Hey thanks, but I'll probably write it myself. There needs to be more error checking, in case there is no .htaccess file, or there's no Pretty URLs section yet. And, it needs to be able to leave code after this mod's section alone as well.

Thanks for those extra filters, I'll have a look at them.
"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."

master2oo8

Quote from: Dannii on April 28, 2009, 07:30:18 PM
Using phpMyAdmin can you check what encoding the smf_asdfgpretty_urls_cache table has? Maybe try converting it to UTF-8?
thx, it works now

keiths

When I include the SSI.php file in one of my external PHP scripts, it removes all quotes around href's.  So if I have something in my code like this:

<link rel="stylesheet" type="text/css" href="/css/stylesheet.css" />

When I include SSI.php, it changes it to this

<link rel="stylesheet" type="text/css" href=/css/stylesheet.css />

or if I have this:

<a href="#">

It changes it to this:

<a href=>

I have tested it an found that this is being caused by prettyURLs.  Do you know what I need to do to fix this?

Dannii

It's a bug in 0.9.2. Use 0.9.
"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."

keiths

I had a problem getting 0.9 to work with smf 2.0 rc1

Dannii

Emulate a 2.0 beta version then.
"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."

keiths

I'm not sure what you mean.

TDNY

Hi,
  On vers 1.1.8 default core, can we fix the 404 file not found error when we shrink the header?
Thanks,
TD

Dannii

Quote from: keiths on May 01, 2009, 07:34:57 AM
I'm not sure what you mean.
Use the box at the bottom of the package manager.

Quote from: TDNY on May 01, 2009, 07:57:02 PM
Hi,
  On vers 1.1.8 default core, can we fix the 404 file not found error when we shrink the header?
Thanks,
TD
Use 0.9 for now.
"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."

af3

#3469
Dannii: I hope you can help me to use this mod with wordpress .htaccess like

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d


The forum is a subdir of the wordpress installation but also a subdomain i.e. accessed at http://forum.domain.com
I tried this but still doesnt work..

rewritecond %{REQUEST_URI} !^/forum/


Any idea how? thanks.

TDNY

Thanks for the advice and the mod Dannii. I got a test failed via pkg mgr on the manage board template . It changed all of the code except for this part.

<td width="10%" align="right"><a href="', $scripturl, '?action=manageboards;sa=board;boardid=', $board['id'], '">', $txt['mboards_modify'], '</a></td>
<td width="10%" style="padding-right: 1ex;" align="right">', allowedTo('admin_forum') ? '<a href="' . $scripturl . '?action=manageboards;sa=pretty;boardid=' . $board['id'] . '">' . $txt['pretty_modify_board_url'] . '</a>' : '', '</td>


I went thru and made the change manually and it seems to be working great with no errors. Thanks again,
TD

dzinerfusion

hi what do i have to add to the hdtaccess so my js menu will work and my logo links to my homepage

helpdivya

#3472
QuotePretty URLs 0.9.2 has several significant bugs, and it is recommended to go back to 0.9, which you can get at the downloads page. Sorry if you have experienced these bugs, I hope to fix them soon.
Also, all versions of Pretty URLs break the noindex check, meaning all topics and boards will not be indexed. If this matters to you, please remove the meta tag from your index template, or disable this mod. If you decide to uninstall this mod, the Reverter package is essential! Get it at the downloads page.

I was the one that brought this to the forum notice please check this http://www.simplemachines.org/community/index.php?topic=306543.0

Now you said
QuoteIf this matters to you, please remove the meta tag from your index template, or disable this mod

I don't intend to remove the mod but please let us know in details the workaround that you mention by removing the meta tag from index template file.

I mean details of what code we need to change in index template and what that will do in terms of indexing.

My current index template has this code <meta name="robots" content="INDEX, FOLLOW">' which I modified. Earlier it was <meta name="robots" content="NOINDEX">'

Also when are you going to get some free time to fix this? Please help.

shanksta13

Without wanting to sift through 174 pages worth of posts (and the search turned up nothing), I need to ask a question.

I'm using a custom bridge.  For my bridge, my forum is accessed through the URL "mysite/message-board".  However, the Pretty URL mod is still rewriting the URLs to use the source path, which is "mysite/messageboard".  Is there any way to change this so that the Pretty URLs mod rewrites to "mysite/message-board"?

I have my forum URL set to "mysite/message-board" in the Admin panel, but Pretty URLs doesn't seem to read that.  My css styles don't work on the "mysite/messageboard" links, so it's very important that I can get it configured to "mysite/message-board", where the forum will be properly wrapped through the bridge.

Dannii

Quote from: af3 on May 02, 2009, 12:45:30 AM
Dannii: I hope you can help me to use this mod with wordpress .htaccess like

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d


The forum is a subdir of the wordpress installation but also a subdomain i.e. accessed at http://forum.domain.com
I tried this but still doesnt work..

rewritecond %{REQUEST_URI} !^/forum/


Any idea how? thanks.
Add something to the beginning of your wordpress .htaccess that will just pass everything in /forum/ (or whatever your sub directory is) straight through. I'm not sure exactly how you'd do that sorry.

Quote from: bluesinjid on May 02, 2009, 06:06:39 PM
hi what do i have to add to the hdtaccess so my js menu will work and my logo links to my homepage
Just install 0.9 instead.

Quote from: helpdivya on May 03, 2009, 03:35:39 AM
QuotePretty URLs 0.9.2 has several significant bugs, and it is recommended to go back to 0.9, which you can get at the downloads page. Sorry if you have experienced these bugs, I hope to fix them soon.
Also, all versions of Pretty URLs break the noindex check, meaning all topics and boards will not be indexed. If this matters to you, please remove the meta tag from your index template, or disable this mod. If you decide to uninstall this mod, the Reverter package is essential! Get it at the downloads page.

I was the one that brought this to the forum notice please check this http://www.simplemachines.org/community/index.php?topic=306543.0

Now you said
QuoteIf this matters to you, please remove the meta tag from your index template, or disable this mod

I don't intend to remove the mod but please let us know in details the workaround that you mention by removing the meta tag from index template file.

I mean details of what code we need to change in index template and what that will do in terms of indexing.

My current index template has this code <meta name="robots" content="INDEX, FOLLOW">' which I modified. Earlier it was <meta name="robots" content="NOINDEX">'

Also when are you going to get some free time to fix this? Please help.
Check that topic again, I've fixed it in SVN now! :)

Quote from: shanksta13 on May 03, 2009, 04:15:39 AM
Without wanting to sift through 174 pages worth of posts (and the search turned up nothing), I need to ask a question.

I'm using a custom bridge.  For my bridge, my forum is accessed through the URL "mysite/message-board".  However, the Pretty URL mod is still rewriting the URLs to use the source path, which is "mysite/messageboard".  Is there any way to change this so that the Pretty URLs mod rewrites to "mysite/message-board"?

I have my forum URL set to "mysite/message-board" in the Admin panel, but Pretty URLs doesn't seem to read that.  My css styles don't work on the "mysite/messageboard" links, so it's very important that I can get it configured to "mysite/message-board", where the forum will be properly wrapped through the bridge.
Follow the second section of the trouble shooting page.
"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."

gourav

@Dannii This mod is pron to huge Validation errors?
Just yesterday i did validation of my forum and i was shocked
to see its was more than 600 errors :o , I immedately removed the pretty URL
and now errors were only 13 but as there are lots of pretty urls posted in
my forum i have to reinstall it again ? so please tell me what is the solution of
removing validation errors due to pretty url?

just check the errors of my forum:
http://validator.w3.org/check?uri=http%3A%2F%2Fgstek.info%2Fforum%2Findex.php

Dannii

gourav, yes 0.9.2 removes the quotes. This isn't in itself a problem, only in silly XHTML! However it is causing problems with Javascript. So until I have it fixed, please go back to 0.9.
"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."

gourav

Quote from: Dannii on May 03, 2009, 08:08:29 PM
gourav, yes 0.9.2 removes the quotes. This isn't in itself a problem, only in silly XHTML! However it is causing problems with Javascript. So until I have it fixed, please go back to 0.9.
That's not a good answer?
Anyway why did you removed the quotes from URL's?
In such way pretty url becomes the cause to decrease
the Page rank of a site it means this mod is highly unsafe :(

BTW THE MOD VERSION 0.9 [ one you uploaded now in mod page ]
In incompatible with bet2 RC1 however previously which i used
was fine...

Do you have any edits with the help of which i can add quotes
to all urls??

Dannii

Because it's a bug, I didn't do it on purpose! I will fix it, but I'm busy with uni.
And no the removal of quotes won't effect your page rank at all.
Just emulate beta4...
"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."

marulez

I have just installed it but nothing happened! The URLs have not been changed, I am using SMF 1.1.8

What is there to do?

Advertisement: