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

mark7144

Quote from: Dannii on September 21, 2008, 09:44:29 PM
QuoteWhen you do, please can you have it so it automatically does a 301 of the old address.
I don't know about this, it could add a lot of overhead.
I say this without any idea of how difficult it is but maybe have it so it adds a 301 but then in the admin panel there is a function that removes all the 301s... after all it only needs to be there short term for Google to pick it up.

brianjw

Hi Dannii,

I was wondering if there is some way to make folders on my site to stop thinking they are boards and bringing it to the homepage of my site.

Yes, I know I can use:
RewriteRule ^proxy/?$ ./proxy/index.php [L,QSA]
but I want a way where it will only create the urls if the boards are made. SO if there is no board or action in SMF called proxy then it will automatically take my to the proxy folder with the index.php in it without using the above code.

Possible? ???
Thanks :)

tescojim

Hi Dannii!

A fast question. I using TP with prettyurls-extras. And my link look this:

hxxp:www.mydomain.info/page/something/ [nonactive]
(article category type block)

How modify the "page" subpage name for all (!!) urls? Where is the "page" name? Where I find this name to modify?

Many Thanks!

Dannii

Quote from: brianjw on September 22, 2008, 10:09:58 PM
Hi Dannii,

I was wondering if there is some way to make folders on my site to stop thinking they are boards and bringing it to the homepage of my site.

Yes, I know I can use:
RewriteRule ^proxy/?$ ./proxy/index.php [L,QSA]
but I want a way where it will only create the urls if the boards are made. SO if there is no board or action in SMF called proxy then it will automatically take my to the proxy folder with the index.php in it without using the above code.

Possible? ???
Thanks :)
Hmm, yeah it would be possible, though I'm not too sure how. You can use conditions to check if directories exist, but I've never used them myself.

Quote from: tescojim on September 23, 2008, 06:51:15 AM
Hi Dannii!

A fast question. I using TP with prettyurls-extras. And my link look this:

http://www.mydomain.info/page/something/(article category type block)

How modify the "page" subpage name for all (!!) urls? Where is the "page" name? Where I find this name to modify?

Many Thanks!
What is page referring to? It could be almost anything.
"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."

goldenboy48

Hello Dannii,

I was wondering if it would be possible only to have letters, numbers and "-" in my URLs.

Characters like ( ) * are not put into the URL even if the Topic Subject has it........

How can I achieve the above, if possible?

Thank You

Dannii

You can remove those lines from the big array in Subs-Prettyurls.php. You can change existing topics by manually editing them in the pretty_topic_urls table, or you could just empty that table.
"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."

mark7144

I had a 'Reply' button that showed for guests and when they clicked on it it would basically ask them to login but now it returns a 404, please can you explain why?

http://www.murraysworld.com/talk/sports-forum/formula-1/msg371489/index.php?action=login

if ($context['user']['is_guest'] && !$context['can_reply'])
$buttonArray[] = '<a href="index.php?action=login">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';

Dannii

You need to use absolute URLs, by adding $scripturl.
"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."

mark7144

Thanks but now I get a parse error whenever I go into a topic:

if ($context['user']['is_guest'] && !$context['can_reply'])
       $buttonArray[] = '<a href="', $scripturl, '?action=login">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';
   

Dannii

You have to use . when you're joining strings like that.
"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."

mark7144

Thanks a lot, that worked :)

goldenboy48

#2451
Quote from: Dannii on September 24, 2008, 03:12:07 AM
You can remove those lines from the big array in Subs-Prettyurls.php. You can change existing topics by manually editing them in the pretty_topic_urls table, or you could just empty that table.

Thanks for that. I won't change any old URLs so I just edited Subs-Prettyurls.php

I have a question. I can't find this value.

How to remove * ' * this character from that file? I couldn't find a different line for it?

I DON'T want a URL like this one

http://ecric.net/forums/staff/one-more's-test/msg8069/?topicseen#new

I WANT a URL like this

http://ecric.net/forums/staff/one-more-test/msg8069/?topicseen#new

Thanks.

Dannii

It's the line starting with \x12 or chr(18).
"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."

londonhogfan

is it safe to use this with 2.0 beta4 yet?

Dannii

I've had no time to test, but I believe it is, if you emulate beta 3.
"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."

goldenboy48


Apllicmz

when update next time dont forget portuguese and brazilian
<file name="$languagedir/Modifications.portuguese.php" error="skip">
        <operation>
            <search position="end"></search>
            <add><![CDATA[
//    Pretty URLs mod
//    Interface texts
$txt['pretty_admin_menu'] = 'Pretty URLs';
$txt['pretty'] = array(
    'url' => 'Pretty URL',
    'url_desc' => 'Um fragmento URL usado para Quadro e tópicos.<br /><div class="smalltext">Note: este será processado como apenas um conjunto limitado de caracteres são permitidos - outros caracteres serão convertidos. Deixe em branco para usar o nome bordo.</div>',
);

//    Settings descriptions
$txt['pretty_board_lookup'] = 'A serialized array of <tt>URL => ID_BOARD</tt> pairs, used for processing <tt>$_GET[\'board\']</tt>. Pode haver mais de uma URL para cada quadro.';
$txt['pretty_board_urls'] = 'A serialized array of <tt>ID_BOARD => URL</tt> pares, utilizado para a geração de substituição Pretty URLs.';
$txt['pretty_enable_filters'] = 'Define se a prettify absolutamente nada. 0 para não, para a 1 sim.';
$txt['pretty_filters'] = 'Uma panóplia de filtrar dados serializada.';
$txt['pretty_filter_callbacks'] = 'Uma chamada de função array serializada nomes, ordenadas por prioridade. Não edite manualmente este, editar o <tt>pretty_filters</tt> setting instead.';
$txt['pretty_root_url'] = 'O URL base usado pelo conselho de administração e filtros tema, que por padrão é o mesmo que <tt>$boardurl</tt>.';
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.brazilian.php" error="skip">
        <operation>
            <search position="end"></search>
            <add><![CDATA[
//    Pretty URLs mod
//    Interface texts
$txt['pretty_admin_menu'] = 'Pretty URLs';
$txt['pretty'] = array(
    'url' => 'Pretty URL',
    'url_desc' => 'Um fragmento URL usado para Quadro e tópicos.<br /><div class="smalltext">Note: este será processado como apenas um conjunto limitado de caracteres são permitidos - outros caracteres serão convertidos. Deixe em branco para usar o nome bordo.</div>',
);

//    Settings descriptions
$txt['pretty_board_lookup'] = 'A serialized array of <tt>URL => ID_BOARD</tt> pairs, used for processing <tt>$_GET[\'board\']</tt>. Pode haver mais de uma URL para cada quadro.';
$txt['pretty_board_urls'] = 'A serialized array of <tt>ID_BOARD => URL</tt> pares, utilizado para a geração de substituição Pretty URLs.';
$txt['pretty_enable_filters'] = 'Define se a prettify absolutamente nada. 0 para não, para a 1 sim.';
$txt['pretty_filters'] = 'Uma panóplia de filtrar dados serializada.';
$txt['pretty_filter_callbacks'] = 'Uma chamada de função array serializada nomes, ordenadas por prioridade. Não edite manualmente este, editar o <tt>pretty_filters</tt> setting instead.';
$txt['pretty_root_url'] = 'O URL base usado pelo conselho de administração e filtros tema, que por padrão é o mesmo que <tt>$boardurl</tt>.';
]]></add>
        </operation>
    </file>
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end"></search>
            <add><![CDATA[
//    Pretty URLs mod
//    Interface texts
$txt['pretty_admin_menu'] = 'Pretty URLs';
$txt['pretty'] = array(
    'url' => 'Pretty URL',
    'url_desc' => 'Um fragmento URL usado para Quadro e tópicos.<br /><div class="smalltext">Note: este será processado como apenas um conjunto limitado de caracteres são permitidos - outros caracteres serão convertidos. Deixe em branco para usar o nome bordo.</div>',
);

//    Settings descriptions
$txt['pretty_board_lookup'] = 'A serialized array of <tt>URL => ID_BOARD</tt> pairs, used for processing <tt>$_GET[\'board\']</tt>. Pode haver mais de uma URL para cada quadro.';
$txt['pretty_board_urls'] = 'A serialized array of <tt>ID_BOARD => URL</tt> pares, utilizado para a geração de substituição Pretty URLs.';
$txt['pretty_enable_filters'] = 'Define se a prettify absolutamente nada. 0 para não, para a 1 sim.';
$txt['pretty_filters'] = 'Uma panóplia de filtrar dados serializada.';
$txt['pretty_filter_callbacks'] = 'Uma chamada de função array serializada nomes, ordenadas por prioridade. Não edite manualmente este, editar o <tt>pretty_filters</tt> setting instead.';
$txt['pretty_root_url'] = 'O URL base usado pelo conselho de administração e filtros tema, que por padrão é o mesmo que <tt>$boardurl</tt>.';
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.brazilian.php" error="skip">
        <operation>
            <search position="end"></search>
            <add><![CDATA[
//    Pretty URLs mod
//    Interface texts
$txt['pretty_admin_menu'] = 'Pretty URLs';
$txt['pretty'] = array(
    'url' => 'Pretty URL',
    'url_desc' => 'Um fragmento URL usado para Quadro e tópicos.<br /><div class="smalltext">Note: este será processado como apenas um conjunto limitado de caracteres são permitidos - outros caracteres serão convertidos. Deixe em branco para usar o nome bordo.</div>',
);

//    Settings descriptions
$txt['pretty_board_lookup'] = 'A serialized array of <tt>URL => ID_BOARD</tt> pairs, used for processing <tt>$_GET[\'board\']</tt>. Pode haver mais de uma URL para cada quadro.';
$txt['pretty_board_urls'] = 'A serialized array of <tt>ID_BOARD => URL</tt> pares, utilizado para a geração de substituição Pretty URLs.';
$txt['pretty_enable_filters'] = 'Define se a prettify absolutamente nada. 0 para não, para a 1 sim.';
$txt['pretty_filters'] = 'Uma panóplia de filtrar dados serializada.';
$txt['pretty_filter_callbacks'] = 'Uma chamada de função array serializada nomes, ordenadas por prioridade. Não edite manualmente este, editar o <tt>pretty_filters</tt> setting instead.';
$txt['pretty_root_url'] = 'O URL base usado pelo conselho de administração e filtros tema, que por padrão é o mesmo que <tt>$boardurl</tt>.';
]]></add>
        </operation>
    </file>


<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end"></search>
            <add><![CDATA[
//    Pretty URLs mod
//    Interface texts
$txt['pretty_admin_menu'] = 'Bonito URLs';
$txt['pretty'] = array(
    'url' => 'Bonitos URL',
    'url_desc' => 'Um fragmento URL usado para Quadro e t&oacute;picos.<br /><div class="smalltext">Note: este ser&aacute; processado como apenas um conjunto limitado de caracteres s&atilde;o permitidos - outros caracteres ser&atilde;o convertidos. Deixe em branco para usar o nome bordo.</div>',
);

//    Settings descriptions
$txt['pretty_board_lookup'] = 'A serialized array of <tt>URL => ID_BOARD</tt> pairs, used for processing <tt>$_GET[\'board\']</tt>. Pode haver mais de uma URL para cada quadro.';
$txt['pretty_board_urls'] = 'A serialized array of <tt>ID_BOARD => URL</tt> pares, utilizado para a gera&ccedil;&atilde;o de substitui&ccedil;&atilde;o Bonito URLs.';
$txt['pretty_enable_filters'] = 'Define se a prettify absolutamente nada. 0 para n&atilde;o, para a 1 sim.';
$txt['pretty_filters'] = 'Uma panóplia de filtrar dados serializada.';
$txt['pretty_filter_callbacks'] = 'Uma chamada de fun&ccedil;&atilde;o array serializada nomes, ordenadas por prioridade. N&atilde;o edite manualmente este, editar o <tt>pretty_filters</tt> setting instead.';
$txt['pretty_root_url'] = 'O URL base usado pelo conselho de administra&ccedil;&atilde;o e filtros tema, que por padr&atilde;o &eacute; o mesmo que <tt>$boardurl</tt>.';
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.brazilian.php" error="skip">
        <operation>
            <search position="end"></search>
            <add><![CDATA[
//    Pretty URLs mod
//    Interface texts
$txt['pretty_admin_menu'] = 'Bonito URLs';
$txt['pretty'] = array(
    'url' => 'Bonitos URL',
    'url_desc' => 'Um fragmento URL usado para Quadro e t&oacute;picos.<br /><div class="smalltext">Note: este ser&aacute; processado como apenas um conjunto limitado de caracteres s&atilde;o permitidos - outros caracteres ser&atilde;o convertidos. Deixe em branco para usar o nome bordo.</div>',
);

//    Settings descriptions
$txt['pretty_board_lookup'] = 'A serialized array of <tt>URL => ID_BOARD</tt> pairs, used for processing <tt>$_GET[\'board\']</tt>. Pode haver mais de uma URL para cada quadro.';
$txt['pretty_board_urls'] = 'A serialized array of <tt>ID_BOARD => URL</tt> pares, utilizado para a gera&ccedil;&atilde;o de substitui&ccedil;&atilde;o Bonito URLs.';
$txt['pretty_enable_filters'] = 'Define se a prettify absolutamente nada. 0 para n&atilde;o, para a 1 sim.';
$txt['pretty_filters'] = 'Uma panóplia de filtrar dados serializada.';
$txt['pretty_filter_callbacks'] = 'Uma chamada de fun&ccedil;&atilde;o array serializada nomes, ordenadas por prioridade. N&atilde;o edite manualmente este, editar o <tt>pretty_filters</tt> setting instead.';
$txt['pretty_root_url'] = 'O URL base usado pelo conselho de administra&ccedil;&atilde;o e filtros tema, que por padr&atilde;o &eacute; o mesmo que <tt>$boardurl</tt>.';
]]></add>
        </operation>
    </file>





Dannii

Okay thanks. That's for 0.8.4? I'll probably wait till 1.0 is finished to add extra languages sorry.
"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."

goldenboy48

Is there new stuff coming for 1.0?

Dannii

No, it will just be the completed form of 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."

Advertisement: