Customizing SMF > Modifications and Packages

Pretty URLs 1.0 - Updated for SMF 2.0

<< < (1347/1380) > >>

akbora:

--- Quote from: akbora on July 31, 2012, 01:19:41 PM ---I get a lot of error about this mod. What can I do. The forum is stabil and works perfectly. Thanks


Database Error: Duplicate entry '5360' for key 'PRIMARY'

This error with thousand lines that topics number and

.
.
.

(22596, 'xxxxx-xx-xxxx-xxxxxxx-xxxxx'),
.
.
.
.




--- End quote ---

What about with this problem please? Thanks

PersianDeveloper:
any chances to have this package for other languages ?
for example, I have installed this on a Persian 2.0.2 version SMF forum, but it doesn't understand Persian words and shows like this:
FORUM/---!-!-

I myself have translated several SMF packages, but regarding this one, I am not sure if I can do that

nend:
You can find the file in Subs-PrettyUrls.php. You will need to edit the $characterHash array and put your letter in the array with the corresponding URL legal character.

Example

Before

--- Code: ---'b' => array ('b', 'B'),
--- End code ---

After

--- Code: ---'b' => array ('b', 'B', 'ب'),
--- End code ---

I don't know if that examples is correct because I don't know Persian, but you know better. Translation is a pain, as I am sure some of your characters may not be equal to a English character, do your best though. If you need me to examine the changes afterwards go head and post your file here. ;)

After you do this you may want to wipe all the URL's and have them regenerate on their own to get them updated. If it is a new site then I suggest that this isn't a bad idea, refreshing the URL's, however if it is a old site then it may be.

Jade Elizabeth:
Hey!

I searched the topic and this hasnt been asked (it seems) so I would like to know...can I change the profile link to be user ID instead of username?

Also I have a list of fixes I would like to make...can you help with any of them? Bolded are what I see now...and underneath is what I would like to see :).

/board/?action=post
/board/post

/unread/?all;start=0 AND /unread/?all
/unread/all

/unreadreplies
/unread/replies

/mlist/?sort=registered;start=0 and all other sort URLS, like ones in boards (my poster, date, etc)
/mlist/sort/registered/asc (or desc)

/profile/?area=works;u=1 (and any other profile/mod/admin area)
/profile/area/works/<user ID>

/index.php?action=resources (and all resource areas so category names and link titles are included)
/resources

/pm/
/messages/

/pm/?sa=send;f=inbox;pmsg=0000;u=000
/messages/send

/pm/?f=sent#msg0000
/messages/sent/0000

/index.php
/ (nothing, don't want it to display)

/<board>/<topic>/?action=post;last_msg=00000
/<board>/<topic>/post/00000 (if the last message thing is needed)

/<board>/<topic>/?action=post;msg=00000
/<board>/<topic>/post/00000 (if the msg id is needed)

/about/?sa=staff (and any other sa for any added pages in the future)
/about/staff


Thank you for any help you can give me, I really appreciate it :D. I'm on 2.0.2 if that's relevant :).

nend:

--- Quote from: Jade Elizabeth on August 09, 2012, 06:51:46 AM ---Hey!

I searched the topic and this hasnt been asked (it seems) so I would like to know...can I change the profile link to be user ID instead of username?

Also I have a list of fixes I would like to make...can you help with any of them? Bolded are what I see now...and underneath is what I would like to see :).

--- End quote ---

Maybe it might be easier it create a new topic for this because of some changes are pretty extensive by adding new json code to the filters in the database and adding new functions in the rewrite filters in the sources.

Some of things you are asking I already implemented.

Like

--- Quote ---/index.php
/ (nothing, don't want it to display)

--- End quote ---

Find in PrettyUrls-Filters.php

--- Code: --- // Stitch everything back together, clean it up and return
$replacement = isset($context['pretty']['cached_urls'][$url_id]) ? $context['pretty']['cached_urls'][$url_id] : $url_id;
$replacement .= (strpos($replacement, '?') === false ? '?' : ';') . (isset($PHPSESSID[0]) ? $PHPSESSID[0] : '') . ';' . (isset($sesc[0]) ? $sesc[0] : '') . (isset($session_var[0]) ? $session_var[0] : '') . (isset($fragment[0]) ? $fragment[0] : '');
$replacement = preg_replace(array('~;+|=;~', '~\?;~', '~\?#|;#|=#~', '~\?$|&amp;$|;$|#$|=$~'), array(';', '?', '#', ''), $replacement);
--- End code ---

Add After

--- Code: --- $replacement = str_replace('index.php', '', $replacement);// Remove index.php, who needs it.
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version