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

massdog.com, can you reverse the 1.1.9 upgrade patch, uninstall Pretty urls, then upgrade to 1.1.9 again?

Alternatively, how many other mods do you have? You could always upload fresh files from the full upgrade package.

devil_jin, emulate 2.0 RC1.
"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."

zaks_bg

Thank you for this great mod. However - there is a problem with our forum which is in Cyrillic. It tries to convert the letters in English and ruins the words, but I just wants the urls to contain the words in Cyrillic.

Dannii, could you please be so kind to provide solution for this one.

Thank you!

devil_jin

Quote from: Dannii on September 23, 2009, 05:15:08 AM
devil_jin, emulate 2.0 RC1.

Thanks for the quick reply Dannii however I am a noob at this so it would be great if u can explaing how I am suppose to do it.

Thanks for your time and patience.

Özgür

#4343
Mail issue still ongoing.
And say

Fatal error: Maximum execution time of 60 seconds exceeded in /forum/Sources/PrettyUrls-Filters.php on line 99

I don't have any error log in my error logs. My email has 4 link.
I think rewrite in mails bad idea. Because email sending already hard..

And i writing a package for my filters. I guess i will share in next week. ( Tagging system, smf media gallery, SMF Articles, Downloads System, SMF projects.) All these filters should inlclude name in url.Ex: board.com/tags/ex-tags/55/
So Long

Dannii

zaks_bg, sorry but I won't be able to do anything for non latin characters for a long time.

Quote from: devil_jin on September 23, 2009, 04:03:44 PM
Quote from: Dannii on September 23, 2009, 05:15:08 AM
devil_jin, emulate 2.0 RC1.

Thanks for the quick reply Dannii however I am a noob at this so it would be great if u can explaing how I am suppose to do it.

Thanks for your time and patience.
Read back a few pages, or read the SMF docs.

[Daydreamer]... ughh... Did you ever have problems with links in emails not working?

Comment out this line in Subs-Post.php to stop rewriting emails:
$message = pretty_rewrite_buffer($message);

Do you know how to use svn?
"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."

Facundo


Hello.
There will be some way to make this mod on Windows IIS?

devil_jin

Hmm went through the page where u have mentioned remove .2 but I am very confused on how to do it guess your too busy to answer such stupid question..

NP will drop the idea to install it as of now...

PS: Will wait for a version from you which I can install on SMF 2.0 RC1.2 directly ..

Dannii

Quote from: Facundo on September 24, 2009, 12:09:44 AM

Hello.
There will be some way to make this mod on Windows IIS?
IIS7 apparently comes with an official rewrite module, so you should be able to get it working. I don't know what that will involve.

Quote
PS: Will wait for a version from you which I can install on SMF 2.0 RC1.2 directly ..
There won't be one.
Want an answer? Go to your package manager. Click "Advanced". Put SMF 2.0 RC1 in the box. Easy. It would have been easier to search for it.
"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."

Afro

I cant seem to access my admin area on my wordpress blog.

i can see the fron page after adding RewriteRule ^sammilla/?$ ./sammilla/index.php [L,QSA] to the .htaccess file

but i when i click on admin link there, it bounces back to the main domain

the blog is www.afrowall.com/sammilla

the admin area should be www.afrowall.com/sammila/wp-admin

probinson77

After installing this mod a few days ago, I discovered that 2 of my boards (which are child boards, although that doesn't seem to matter... see below) are no longer accessible.  In IE, it just sits there and eventually times out when you click the link.  In Firefox, I get the error message attached.

Both of the affected forums have a single quote (') in their name, which I assume is the common denominator for why the redirect fails.  To verify this, I created another board (NOT a child board) with a (') in its name, and it also fails with the same redirect error.

Thanks in advance for your help.

probinson77

I just answered my own question!

For those of you who may have the same problem, here is how you fix it;

Go to Admin -> Forum -> Boards -> Modify Boards

Click on the Pretty URLs link next to the board giving you the problem.

In my test example, my board was called That's a test.  So I added thats-a-test (without the single quote) and then clicked Make primary and voila!  No more problem.

Dannii

Akpaka, then add this to your .htaccess too:

RewriteRule ^sammilla/wp-admin/?$ ./sammilla/wp-admin/index.php [L,QSA] Or whatever it needs to be.
"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."

SAFAD

Quote
You can add characters to the big array in Subs-PrettyUrls.php, I used to have them in there. But it didn't work very well. You can get the old version at: http://code.google.com/p/prettyurls/source/browse/branches/0.8/Base/SMF2-0/Subs-PrettyUrls.php (For SMF 1.1 look under SMF1-1) Only copy the array, not the whole file.

this looks WOW
what to add ?
new chars for array ?
or add em to the current <= if this it won't be simple
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

zaks_bg

Quote from: Dannii on September 23, 2009, 11:58:45 PM
zaks_bg, sorry but I won't be able to do anything for non latin characters for a long time.

This is very unfortunate to hear. There is a guy that did something similar for wordpress. Maybe you could use some of his code - at least this will allow for better transition from Cyrillic to Latin letters -> this is what he does and it works good in converting them perfectly. Currently Pretty URLs is converting the letters in a very strange manner.

<?php
/*
Plugin Name: Cyr-Cho
Version: 0.1
Plugin URI: http://kaloyan.info/blog/wp-cyr-cho
Description: Converts slugs with Cyrillic characters into Latin ones
Author: Kaloyan K. Tsvetkov
Author URI: http://kaloyan.info/
*/

/////////////////////////////////////////////////////////////////////////////

/**
* @internal prevent from direct calls
*/
if (!defined('ABSPATH')) {
return ;
}

/**
* The directory path to the plugin
*/
define('WP_CYRCHO_DIR'dirname__FILE__ ));

/**
* @internal prevent from second inclusion
*/
if (!isset($wp_cyrcho)) {

/**
* Initiating the plugin...
* @see wp_cyrcho
*/
$wp_cyrcho = new wp_cyrcho;
}

/////////////////////////////////////////////////////////////////////////////

/**
* Cyr-Cho (Cyrillic Slugs)
*
* Original idea by Loshia: http://loshia.com/2007/05/17/cyrillic-slugs
*
* @author Kaloyan K. Tsvetkov <[email protected]>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
Class wp_cyrcho {

/**
* Transliteration map
* @var array
*/
var $transliteration = array(
192 => 'a',
193 => 'b',
194 => 'v',
195 => 'g',
196 => 'd',
197 => 'e',
198 => 'zh',
199 => 'z',
200 => 'i',
201 => 'y',
202 => 'k',
203 => 'l',
204 => 'm',
205 => 'n',
206 => 'o',
207 => 'p',
208 => 'r',
209 => 's',
210 => 't',
211 => 'u',
212 => 'f',
213 => 'h',
214 => 'ts',
215 => 'tch',
216 => 'sh',
217 => 'sht',
218 => 'a',
220 => 'y',
222 => 'yu',
223 => 'ya',
224 => 'a',
225 => 'b',
226 => 'v',
227 => 'g',
228 => 'd',
229 => 'e',
230 => 'zh',
231 => 'z',
232 => 'i',
233 => 'y',
234 => 'k',
235 => 'l',
236 => 'm',
237 => 'n',
238 => 'o',
239 => 'p',
240 => 'r',
241 => 's',
242 => 't',
243 => 'u',
244 => 'f',
245 => 'h',
246 => 'ts',
247 => 'tch',
248 => 'sh',
249 => 'sht',
250 => 'a',
252 => 'y',
254 => 'yu',
255 => 'ya'
);

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

/**
* Constructor
*
* Places the plugin hooks, and initiates the admin if necessary
*/
Function wp_cyrcho() {

// attach the hooks
//
add_filter('sanitize_title', array($this'convert'), 0);

// start the admin pages ...
//
if (is_admin()) {

require_once(
WP_CYRCHO_DIR '/wp-admin/wp-admin.php'
);
new wp_cyrcho_admin(1);
}
}

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

/**
* Converts the Cyrillic chars to their latin equivalent.
*
* @param string $value
* @return string
*/
Function convert($value) {

$string $this->utf2win1251($value);

   $result '';
for($i 0$i strlen($string); $i++) {
if (ord($string[$i]) > 128) {
$result .= $this->transliteration[ord($string[$i])];
} else {
       $result .= $string[$i];
       }
       }

return $result;
}

/**
* Converts a UTF-encoded string into a Win1251-encoded one
*
* @param string $string
* @return string
*/
Function utf2win1251($string) {

$out '';

for ($i=0$i<strlen($string); $i++) {
$c1 substr ($string$i1);
$byte1 ord ($c1);

if ($byte1>>== 6) { /* 110x xxxx, 110 prefix for 2 bytes unicode */
$i++;
$c2 substr ($string$i1);
$byte2 ord ($c2);

$byte1 &= 31/* remove the 3 bit two bytes prefix */
$byte2 &= 63/* remove the 2 bit trailing byte prefix */
$byte2 |= (($byte1 3) << 6); /* last 2 bits of c1 become first 2 of c2 */
$byte1 >>= 2/* c1 shifts 2 to the right */

$word = ($byte1<<8) + $byte2;
if ($word==1025$out .= chr(168);                    // ?
elseif ($word==1105$out .= chr(184);                // ?
elseif ($word>=0x0410 && $word<=0x044F$out .= chr($word-848); // ?-? ?-?
else { 
$a dechex($byte1);
$a str_pad($a2'0'STR_PAD_LEFT);
$b dechex($byte2);
$b str_pad($b2'0'STR_PAD_LEFT);
$out .= "&#38;#x".$a.$b.";";
}
} else {
$out .= $c1;
}
}

return $out;
}

//--end-of-class--
}


Dannii

Quote from: SAFAD on September 24, 2009, 10:54:06 AM
Quote
You can add characters to the big array in Subs-PrettyUrls.php, I used to have them in there. But it didn't work very well. You can get the old version at: http://code.google.com/p/prettyurls/source/browse/branches/0.8/Base/SMF2-0/Subs-PrettyUrls.php (For SMF 1.1 look under SMF1-1) Only copy the array, not the whole file.

this looks WOW
what to add ?
new chars for array ?
or add em to the current <= if this it won't be simple

I suggest replacing the current array with the array from that file. Leave all the other stuff as it is 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."

Afro

Quote from: Dannii on September 24, 2009, 10:35:03 AM
Akpaka, then add this to your .htaccess too:

RewriteRule ^sammilla/wp-admin/?$ ./sammilla/wp-admin/index.php [L,QSA] Or whatever it needs to be.

worked good. thanks

anto74

Hi Danii,
thanks for this beautiful Mod!
I installed now in my forum macroforum.org
Now the mod is disabled: before activate it, i must create htaccess?
In htaccess file, i must write ......?
Sorry for my english
Thanks
Antonio

massdog.com

Quote from: Dannii on September 23, 2009, 05:15:08 AM
massdog.com, can you reverse the 1.1.9 upgrade patch, uninstall Pretty urls, then upgrade to 1.1.9 again?

Alternatively, how many other mods do you have? You could always upload fresh files from the full upgrade package.

devil_jin, emulate 2.0 RC1.
only 4 packages
1.     Fight Spam      0.1       [ Uninstall ]  [ List Files ]  [ Delete ]
2.    Pretty URLs    0.9.3    [ Uninstall ] [ List Files ] [ Delete ]
3.    Hide SMF Version    1.0.3c    [ Uninstall ] [ List Files ] [ Delete ]
4.    SimplePortal
iam afraid if i got error when i tried to downrgade and upgrade again

sombra

i have smf 2.0 rc1.2 and pretty url Pretty URLs      0.9.1

i want to update it but what are the benefits and how can i do it i dont know alot about this stuff and a little hand will help


Özgür

Quote from: Dannii on September 23, 2009, 11:58:45 PM
[Daydreamer]... ughh... Did you ever have problems with links in emails not working?

Comment out this line in Subs-Post.php to stop rewriting emails:
$message = pretty_rewrite_buffer($message);

Do you know how to use svn?
I don't have problem for for links in email. And i change subs-posts.php. I can send email now.
Whatyou mean by svn? You mean using revision packages or creating one? =)
So Long

Advertisement: