Pretty URLs

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

Previous topic - Next topic

Dannii

Put the .htaccess file back to how it was when it was working.

I see the JS errors. I have to go now though, I'll try and help you more next week.

Would you be willing to let me have temporary FTP access on your server, so I can try various things to see what will work?
"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."

Analogiker

Its modified witout RewriteRule ^chat(.*)....

Atoa

#3882
None of the solutions suggeted works for me.

Btw.: i had all the chat files writtable (chmod: 0777) and still not working.

Btw2.: wich is the difference between having "Enable URL rewriting" checkd and unchecked (i tested with it checked and unchecked).
Just curious about if will be useful having acrtivaded once i get the pretty ulr working with the chat.

Antes

Quote from: Dannii on June 19, 2009, 09:34:03 PM
Antes, I can't see that page with the devs account.

Quote from: mark7144 on June 19, 2009, 06:22:34 PM
What's wrong with my attitude? My current version works fine, I don't need anything fixed and therefore it's not worth my time to upgrade now when I'd rather wait for 1.1.

Only thing I need fixed is the '!' bug but you are not going to do that.
Because 0.9 is beta software and it will take so little time to upgrade anyway. If you're not running the latest software I won't be able to help if you get into trouble in the future... and you can always remove !'s yourself, it's not hard.

i'm sorry my stupidness ... i made changes in hurry then failed on save ... can you look it again when you are free :)

primetime

#3884
I just installed this MOD on my forum and it immediately caused my chat to not function. I uninstalled the MOD but now no one can chat. The chat was the main thing my members used!!!


Edit:.. I deleted the .htaccess and chat works now.
          dont think I will install this MOD anymore.

Dannii

Hi primetime, this software is only a release candidate, so when you install it, be aware of the risks. A RC means that it is basically complete, and I just want people to test it a little more before I release 1.0 gold. We have indeed found a couple of small bugs. But it's better to find them now than in 1.0 itself!

That said, I know what this current problem is, and I will fix it for 1.0. Basically it is adding the wrong URL to the <base> tag.

When I release 1.0 itself, hopefully there will be none of these issues. Please try it again then. If there are issues, then I will quickly release 1.0.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."

primetime

Quote from: Dannii on June 20, 2009, 10:50:31 AM
Hi primetime, this software is only a release candidate, so when you install it, be aware of the risks. A RC means that it is basically complete, and I just want people to test it a little more before I release 1.0 gold. We have indeed found a couple of small bugs. But it's better to find them now than in 1.0 itself!

That said, I know what this current problem is, and I will fix it for 1.0. Basically it is adding the wrong URL to the <base> tag.

When I release 1.0 itself, hopefully there will be none of these issues. Please try it again then. If there are issues, then I will quickly release 1.0.1.

That sounds like a plan Danni. I will keep an eye out for the next release.

Prime

deZio

Hello!

I have problem with chat too.
When I was on 0.9 I used: RewriteRule ^chat/?$ ./chat/index.php [L,QSA] in .htaccess and it works fine but now it doesnt work. I have tried all tree solutions:
RewriteRule ^chat/?$ ./chat/index.php [L,QSA]
RewriteRule ^chat(.*) ./chat$1 [L,QSA]
RewriteRule ^chat/? ./chat/index.php [L,QSA]
and neither of them worked. It starts to print page but have problem with including css and js files i think.  I have attached SS.

And I think I have found a bug. Links "Go Top" and "Go Down" doesnt work. It create link "http://site.com/forum/#lastPost" instead "http://site.com/forum/board/topic/?topicseen#lastPost".

P.S. Quoting works fine.

Atoa

@deZio
The same problem here i posted it on the Ajax Chat

deZio

OMG. I notice now that problem exist in smilies too. I will have to disable it for now.

Dannii

#3890
Okay there are too many problems with 1.0RC, so I recommend going back to 0.9.3. It's back on the download pages.

If you want to be notified when I fix the bugs, watch this page: http://code.google.com/p/prettyurls/issues/detail?id=75

Sorry everyone!

Edit: I have fixed them now, so install 1.0RC 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."

Arkangel

   
topic answer error:
http://i43.tinypic.com/34pased.gif

do not display images in response topic

Özgür

Quote from: Arkangel on June 20, 2009, 11:11:05 PM
   
topic answer error:
http://i43.tinypic.com/34pased.gif

do not display images in response topic


And if you try to reply, "add quote" in reply page not worked.

<a onclick="return insertQuoteFast(42375);" href="#top">Add Quote</a>
Buton linked site.com/#top, and if you try to add quote you redirect to boardurl.
So Long

Özgür

#3893
The problem is in the this code..
$buffer = str_replace('<head>', '<head><base href="' . $boardurl . '/" />', $buffer);
In QueryStrings.php. I think base not truly selected from js..
So Long

Atoa

Thank to sun king's hepl I got my chat + pretty url working.

the code he added was RewriteRule ^chat/?$ ./chat/index.php [L,QSA]

My problem was with 1.0RC.

In the begin, the mistake was mine, but when changed to 1.0RC, I did right once but don't noticed it working (and since i'm a noob i didn't know it was right) xD

Thanks for all your support. This mod is so great and i'm happy to have it woriking with the chat.

ryanhellyer

Great to see that this now into the RC stage! I had a poke at this quite a while back and in the end decided not to use it due to some of the bugs. But it is looking much more polished now. Great work Dannii and whoever else contributed to this project!

EDIT: Darn, looks like the RC isn't the best version anymore :(

I have some questions though.

(1) How much extra load does this put on the server? That's probably hard to quantify, but does it make a measurable difference?
(2) Does it work by output buffering the entire page content, then just replacing all of the URL's with pretty ones?
(3) I'm assuming the rewrite rules wouldn't cause any troubles for me if I wanted to create a new page such as http://domain.com/ where the the forum index is http://domain.com/index.php. Am I correct? Or could that screw up somehow?

Question #3 is because I'm looking to write a simple portal for a new forum I'm intending to launch. I was intending to rewrite a PHP file as the domain root so that I can have a home page whilst keeping the forum still in the main root of the site.

mkress

very great mod!

I want to extend the filters to have pretty urls for this mod: http://custom.simplemachines.org/mods/index.php?mod=486 (View Single Category).
Thou you can call a single category e.g with index.php?c=1

this what I have so far:
The filter added in pretty-urls config area:
"cat": {
        "description": "Rewrite Category URLs.",
        "enabled": 1,
        "filter": {
            "priority": 70,
            "callback": "pretty_categories_filter"
        },
        "rewrite": {
            "priority": 80,
            "rule": "RewriteRule ^cat/([^/]+)/?$ ./index.php?pretty;c=$1 [L,QSA]"
        },
        "title": "Categories"
    }

the filter-function:
//    Filter categories
function pretty_categories_filter($urls)
{
    global $scripturl, $boardurl, $modSettings, $db_prefix;

    $pattern = '~' . $scripturl . '(.*[?;&])c=([0-9]+)(.*)~S';
    $query_data = array();
    foreach ($urls as $url_id => $url)
    {
        //    Get the profile data ready to query the database with
        if (!isset($url['replacement']))
            if (preg_match($pattern, $url['url'], $matches))
            {
                $urls[$url_id]['cat_id'] = (int) $matches[2];
                $urls[$url_id]['match1'] = $matches[1];
                $urls[$url_id]['match3'] = $matches[3];
                $query_data[] = $urls[$url_id]['cat_id'];
            }
    }

    //    Query the database with these profile IDs
    if (count($query_data) != 0)
    {
        $catNames = array();
        $query = db_query("
            SELECT ID_CAT, name
            FROM {$db_prefix}categories
            WHERE ID_CAT IN (" . implode(', ', $query_data) . ")", __FILE__, __LINE__);
        while ($row = mysql_fetch_assoc($query))
            $catNames[$row['ID_CAT']] = pretty_generate_url($row['name']);
        mysql_free_result($query);

        //    Build the replacement URLs
        foreach ($urls as $url_id => $url)
            if (isset($url['cat_id']))
                if (strpos($catNames[$url['cat_id']], '%2F') !== false)
                    $urls[$url_id]['replacement'] = $boardurl . '/cat/' .$url['match1'] . 'c=' . $catNames[$url['cat_id']] . $url['match3'];
                else
                $urls[$url_id]['replacement'] = $boardurl . '/cat/' . $catNames[$url['cat_id']] . '/' . $url['match1'] . $url['match3'];
    }
    return $urls;
}


if I activate the filter and run pretty url maintenance, the urls get rewritten.
But if I call the categories I always stay at forum-root page.
So can someone please tell me, werhe I have to do the reverse to get the category-id from the category-name?

sneijder23

Hello, I have a problem...  Upon clicking additional options error gives me 404 because opens me with this route www.mysite.com/javascript:swapOptions (),  I have noted it that passes me the same thing with the emails for example upon clicking an email leaves me www.mysite.com/[email protected], knows the solution?  Thanks. 

remi_naija

I installed this mod and it wrecked my account. Had to uninstall it with my tail between my legs. What do I do? I have seen this:

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

but I don't know what where to find this example.htaccess or where to download the extension-non stuff.

Who can help out here?

Dannii

Those instructions are very old. Go follow the first section of the trouble shooting page instead.
"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: