Pretty URLs

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

Previous topic - Next topic

Dannii

Remove the row with asterixs from Subs-PrettyUrls.php, and delete those topics from smf_pretty_topic_urls, then run maintenance.
"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."

sombra

#3801
it dosent give me the uninstall option :( only delete

do i presede to delete?

edit: found the uninstall

¡Este paquete no puede ser desinstalado, ya que no tiene desinstalador!

Por favor, contacta al autor del mod para mayor información.

this mod dosent have uninstaller contac the mod maker

Atoa

Here go
<?php
// Version: 2.0 RC1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context, $settings, $options, $txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 RC1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;

/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}

// The main sub template above the content.
function template_html_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
, $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
       <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
       <link rel="icon" href="/favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset='
, $context['character_set'], '" />
<meta name="description" content="'
, $context['page_title_html_safe'], '" />
<meta name="keywords" content="'
, $context['meta_keywords'], '" />
<script language="JavaScript" type="text/javascript" src="'
, $settings['default_theme_url'], '/scripts/script.js?rc1"></script>
<script language="JavaScript" type="text/javascript" src="'
, $settings['default_theme_url'], '/scripts/theme.js?rc1"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
, $settings['theme_url'], '";
var smf_default_theme_url = "'
, $settings['default_theme_url'], '";
var smf_images_url = "'
, $settings['images_url'], '";
var smf_scripturl = "'
, $scripturl, '";
var smf_iso_case_folding = '
, $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "'
, $context['character_set'], '";', $context['show_pm_popup'] ? '
if (confirm("'
. $txt['show_personal_messages'] . '"))
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");'
: '', '
var ajax_notification_text = "'
, $txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
, $txt['modify_cancel'], '";
// ]]></script>
<title>'
, $context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// The ?rc1 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['theme_url'], '/style', $context['theme_variant'], '.css?rc1" />';

echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/css/print.css?rc1" media="print" />';

// IE7 needs some fixes for styles.
if ($context['browser']['is_ie7'])
echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/css/ie7.css" />';
// ..and IE6!
elseif ($context['browser']['is_ie6'])
echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/css/ie6.css" />';
// Firefox - all versions - too!
elseif ($context['browser']['is_firefox'])
echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/css/ff.css" />';

// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/css/rtl.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
, $scripturl, '?action=help" />
<link rel="search" href="'
. $scripturl . '?action=search" />
<link rel="contents" href="'
, $scripturl, '" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
, $context['forum_name_html_safe'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
, $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
, $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
, $scripturl, '?board=', $context['current_board'], '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
{
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
}


echo '<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
, $settings['default_theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode = 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode = 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode = 'newwindow';
else
$mode = 'none';
}
else
$mode = 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
, $settings['images_url'], '";
NcodeImageResizer.MODE = "'
, $mode, '";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? 0 : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? 0 : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
, $txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
, $txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
, $txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
, $txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>'
;

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// Create the main header object.
var mainHeader = new smfToggle("upshrink", '
, empty($options['collapse_header']) ? 'false' : 'true', ');
mainHeader.useCookie('
, $context['user']['is_guest'] ? 1 : 0, ');
mainHeader.setOptions("collapse_header", "'
, $context['session_id'], '");
mainHeader.addToggleImage("upshrink", "/upshrink.gif", "/upshrink2.gif");
mainHeader.addTogglePanel("user_section");
mainHeader.addTogglePanel("news_section");
// ]]></script>'
;

echo '
</head>
<body>'
;
}

function
template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_info;

echo
'
<div id="wrapper">
<!-- Header -->
<div id="header">

  <div id="news">
   <h2>'
, $txt['news'], '</h2>
   <p>'
, $context['random_news_line'], '</p>
    </div>
                      </div>

     <div id="forumheaderback">
 <!-- Menu -->
 '
, template_menu(), '
</div>
                      <div id="void"></div>
<!-- Main Content -->
<div id="content">'
;

if (!$user_info['is_guest'])
{
echo '
 <div id="forumheaderback">
                                <div id="main-1"><div id="main-2"><div id="main-3"><div id="main-4"><div id="main-5">
<div id="forumheader">
'
, !empty($context['user']['avatar']['image']) ? '<div id="myAvatar">' . $context['user']['avatar']['image'] . '</div>' : '';

echo '
'
, $txt['hello_member'], ' <strong>', $context['user']['name'], '</strong>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt['msg_alert_you_have'], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];

echo '.<br />';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<strong>'
, $txt['maintain_mode_on'], '</strong><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
, $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

echo '
<a href="'
, $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="'
, $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
, $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}

echo '
'
, $context['current_time'], '.
                               </div>
</div>

</div></div></div></div></div>          
<div id="main-6"><div id="main-7"><div id="main-8">
</div></div></div>

<div id="void"></div>'
;
}
elseif ($user_info['is_guest'])
{
echo '
                       <div id="main-1"><div id="main-2"><div id="main-3"><div id="main-4"><div id="main-5">
<div id="forumheaderback">

                               <div id="forumheader">
<p><strong>'
, sprintf($txt['welcome_guest'], $txt['guest_title']), '</strong></p>

                        <form action="'
, $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
                        <input type="text" name="user"  size="10" />
                        <input type="password" name="passwrd"  size="10" />
                        <input type="submit" value="Entrar" />
                        <input type="hidden" name="hash_passwrd" value="" />
<br /><label for="cookieneverexp">Ficar sempre online
                        <input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
                        </form>
                               </div>
</div>

</div></div></div></div></div>          
<div id="main-6"><div id="main-7"><div id="main-8">
</div></div></div>

<div id="void"></div>'
;
}
     
// The main content should go here.
if (empty($context['outside_forum']))
{
echo '
<div id="main-1"><div id="main-2"><div id="main-3"><div id="main-4"><div id="main-5">
<div id="mainarea">'
;

 // Show the navigation tree.
theme_linktree2();
}

}

function
template_body_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '

</div></div></div></div></div>          
<div id="main-6"><div id="main-7"><div id="main-8">
</div></div></div>
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '<div id="void"></div>

                               <div id="main-1"><div id="main-2"><div id="main-3"><div id="main-4"><div id="main-5">
                               <div id="footer">
<div id="footerarea">
       <span class="normal text">'
, theme_copyright(), '<br />','©2009 Santu&aacute;rio RPG Maker. <a href="http://creativecommons.org/licenses/by-nc-nd/2.5/br/"><b>Alguns direitos reservados.</b></a>','<br />','<a href="#header">Voltar para o topo &uarr;</a>','</span>';

// Show the load time?
if ($context['show_load_time'])
echo '<br /><span class="smalltext">'. $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</span>';

echo '
</div></div></div></div></div>
<div id="main-6"><div id="main-7"><div id="main-8">
</div></div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</div>



<div id="void-bellow"></div>'
;

}






function
template_html_below()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo '
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree2()
{
global $context, $settings, $options;

echo '<div id="linktree">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '">' . $tree['name'] . '</a>' : $tree['name'];

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '
</div>'
;
}

function
theme_linktree()
{
return;
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

echo '
                    <div id="main-1"><div id="main-2"><div id="main-3"><div id="main-4"><div id="main-5">
                    <div class="nav_menu">
 <ul>'
;

foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a ', $button['active_button'] ? ' class="active"' : '' , ' href="', $button['href'], '"><span>', $button['title'], '</span></a></li>';

echo '
</ul>
</div>

</div></div></div></div></div>          
<div id="main-6"><div id="main-7"><div id="main-8">
</div></div></div>

'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $custom_td = '')
{
global $settings, $context, $txt, $scripturl;

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '<a href="' . $value['url'] . '"' . (isset($value['active']) ? ' class="active"' : '') . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '><span>' . $txt[$value['text']] . '</span></a>';

if (empty($buttons))
return '';

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
, $direction != 'top' ? '_bottom' : '', '">
<ul class="clearfix">
<li>'
, implode('</li><li>', $buttons), '</li>
</ul>
</div>'
;
}

?>

Dannii

sombra, emulate SMF 2.0 RC1

atoa, I can't see any problems with that. Are you still getting errors?
"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."

Atoa

the problem isn't in the index

It's that the pretty url overlap the chat functions.

if you want to check by your self, try using the chat + shout box from this mod: http://www.simplemachines.org/community/index.php?topic=257973.0 with the pretty url with the "Rewrite Board URLs" + "Rewrite Topic URLs" + "Rewrite Action URLs" checked.

The chat no longer connects (you still can see it, and the shout box)

sombra

#3805
ok thanks that worked but now i get an error in de uninstall

   Ejecutar Modificación     ./Sources/Admin.php     Prueba fallida

what manualy change i need to make?

heres what the admin.php has

'theme' => array(
'label' => $txt['theme_admin'],
'file' => 'Themes.php',
'function' => 'ThemesMain',
'custom_url' => $scripturl . '?action=admin;area=theme;sa=admin',
'icon' => 'themes.gif',
'subsections' => array(
'admin' => array($txt['themeadmin_admin_title']),
'list' => array($txt['themeadmin_list_title']),
'reset' => array($txt['themeadmin_reset_title']),
'edit' => array($txt['themeadmin_edit_title']),
),
),
'ads' => array(
'label' => $txt['ad_management'],
'file' => 'Ads.php',
'function' => 'Ads',
'custom_url' => $scripturl . '?action=admin;area=ads;sa=main',
'icon' => 'themes.gif',
'subsections' => array(
'main' => array($txt['ad_management_main']),
'add' => array($txt['ad_management_add']),
'reports' => array($txt['ad_management_reports']),
'settings' => array($txt['ad_management_settings']),
'credits' => array($txt['ad_management_credits']),
),
),



'pretty' => array(
'label' => $txt['pretty_admin_menu'],
'file' => 'PrettyUrls.php',
'function' => 'PrettyInterface',
'custom_url' => $scripturl . '?action=admin;area=pretty',
),
),
),
'layout' => array(
'title' => $txt['layout_controls'],
'permission' => array('manage_boards', 'admin_forum', 'manage_smileys', 'manage_attachments', 'moderate_forum'),


isint the same as the unisntaller tells me

this is the one the uninstaller tell me

'theme' => array( 'label' => $txt['theme_admin'], 'file' => 'Themes.php', 'function' => 'ThemesMain', 'custom_url' => $scripturl . '?action=admin;area=theme;sa=admin', 'icon' => 'themes.gif', 'subsections' => array( 'admin' => array($txt['themeadmin_admin_title']), 'list' => array($txt['themeadmin_list_title']), 'reset' => array($txt['themeadmin_reset_title']), 'edit' => array($txt['themeadmin_edit_title']), ), ), 'pretty' => array( 'label' => $txt['pretty_admin_menu'], 'file' => 'PrettyUrls.php', 'function' => 'PrettyInterface', 'custom_url' => $scripturl . '?action=admin;area=pretty', ),

so im a little confuced ::)

RickJ

Quote from: Dannii on June 17, 2009, 07:53:46 AM
Remove the row with asterixs from Subs-PrettyUrls.php, and delete those topics from smf_pretty_topic_urls, then run maintenance.

Dannii, what folders should I expect to find those files in?

...I'm sorry if I sound stupid...but I am :(
Rick.

(I do search before asking, so please pardon me if I missed something :) )

Atoa

@Dany
Yes. When i Activate the pretty url the chat is disconected.

Rhandy

Hello Dannii!

I need your help here please...

I just want to add this:
http://www.sitename.com/boardname/topicname/post/15/
15 = topic name

Normally is like this:

http://www.sitename.com/boardname/topicname/

And for repeated posts:

http://www.sitename.com/boardname/topicname-1/


I want that all urls says: "/post/15/"
To avoid the "-" for repeated posts...

Help me please.
This is pretty confusing for me...

Someone on Google Code told me that this can be made modifying the Filters and the Callbacks, but i don't know how...

Help me here please...


Thanks!

Dannii

Quote from: Atoa on June 17, 2009, 12:31:57 PM
the problem isn't in the index

It's that the pretty url overlap the chat functions.

if you want to check by your self, try using the chat + shout box from this mod: http://www.simplemachines.org/community/index.php?topic=257973.0 with the pretty url with the "Rewrite Board URLs" + "Rewrite Topic URLs" + "Rewrite Action URLs" checked.

The chat no longer connects (you still can see it, and the shout box)
I'm guessing it has relative URLs then. Does it work with the latest snapshot?

sombra, okay proceed with the uninstallation, and then manually remove the pretty section from that array. What's happened is that another mod has been installed and so the pretty section is no longer the next one after the theme section.

Quote from: RickJ on June 17, 2009, 02:48:41 PM
Quote from: Dannii on June 17, 2009, 07:53:46 AM
Remove the row with asterixs from Subs-PrettyUrls.php, and delete those topics from smf_pretty_topic_urls, then run maintenance.

Dannii, what folders should I expect to find those files in?

...I'm sorry if I sound stupid...but I am :(
Subs-PrettyUrls.php is in Sources, smf_pretty_topic_urls is a database table, so use phpmyadmin to access it, and maintenance is the third icon in the pretty urls admin page.

Rhandy, as I said on google code, you'll have to learn a bit of PHP. It is not difficult. Look at the example pages and the Filters wiki 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."

Dannii

What URLs do they occur for?

You could try this change in Querystring.php:

Code (find) Select
// Check for pretty board URLs too, and possibly redirect if oldschool queries were used.
Code (add after) Select
$context['pretty']['query_string']['board'] = $_REQUEST['board'];
"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."

mic_comte

 Hello,
I have the following problem:
- I have insrtalled SMF 1.1.9
- Then I loaded pretty urls 0.9.3

Now the urls are pretty (like "www.mydomain.com/Help/"), but each time I want to see one of those pages, here is what I have:

"
Not Found
The requested URL /equalgenders/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.33 Server at www.equalgenders.com [nofollow] Port 80
"

Any idea?

Dannii

Sure your server supports mod_rewrite and .htaccess?
"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."

Atoa

#3813
I have the latest snapshot.

But as i said, i don't know how to add exceptions.

How *exactly* can i add exceptions? (yes i'm noob)

Also, is possible to add the topic ID to the link?
Something like:
http://myforum/board/topic-name-123

that's because the pretty url olny take in consideration the topic name, but what would happen if 2 topics has the same name?

EDTI.:

Here is some images to help you undertand what happens:

This is the chat:


if i check the optins "Topic" and "Actions" nothing happens


but ii i check the option "Board"...


The chat is disconnected:


The same happens to the shout box on the board index.

Dannii

Try:

RewriteRule ^chat(.*) ./chat$1 [L,QSA]

And if two topics have the same name it will add the ID automatically. Don't worry.
"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."

Atoa

QuoteRewriteRule ^chat(.*) ./chat$1 [L,QSA]
Where i do it? '-' (Super noob here \o)

Dannii

Add it to the top of your .htaccess file.
"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."

Atoa

This also disconect the chat (but that time give me a message error)

I think there's no easy way to do this. Only something specially done for this situation.
Thanks anyway, this is an great mod, too bad it don't work for me =[

_Anthony_

Dannii, you should release a version where you can check if your host requires RewriteBase.

Albitos

#3819
Hi!
I've just installed Pretty URLs on my new forum. I want to make it SEO-friendly, but there is one problem about duplicate content in posts. When you add any reply to topic, you'll get new link to that topic. I mean every heading of post has its own link! Not just #asdasd part, but completely new link.

Small example:
hxxp:exmaple.com/klient-3/tutorial-ventrilo/ [nonactive]
hxxp:exmaple.com/klient-3/tutorial-ventrilo/msg9/#msg9 [nonactive] - link to first message
hxxp:exmaple.com/klient-3/tutorial-ventrilo/msg10/#msg10 [nonactive] - link to second message

I think that links should be like that:
hxxp:exmaple.com/klient-3/tutorial-ventrilo/ [nonactive]
hxxp:exmaple.com/klient-3/tutorial-ventrilo/#msg9 [nonactive] - link to first message
hxxp:exmaple.com/klient-3/tutorial-ventrilo/#msg10 [nonactive] - link to second message

And my question is: Is there any way to get rid of that behaviour? I know that SMF generates similar links without this addon. Can you explain me what for?

Sorry for my english, I hope everything in my post is possible to understand :).

Besides of that, i think Pretty URLs are great! Thanks for that, especially for SMF 2.0RC1 support.

GOD DAMN IT! CAPTCHA :/

Advertisement: