News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Pretty URLs

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

Previous topic - Next topic

akbora

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'),
.
.
.
.


SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

MaTheRyS

Thanks, nend, for the tips, i'll look at this.

Arantor, effectively you're right. It's amazing that smf does not handle this problem natively.

Arantor

Quote from: MaTheRyS on July 31, 2012, 04:29:21 PM
Thanks, nend, for the tips, i'll look at this.

Arantor, effectively you're right. It's amazing that smf does not handle this problem natively.

You mean aside from the stealth robots noindex directive it adds when it finds unexpected content in the URL, specifically to deal with what SMF already has (e.g. the duplicate URLs all going to a single place) plus the canonical directive?
Holder of controversial views, all of which my own.


mossite

My pretty URL has been working fine, but today, every link redirect to home page, i need help to correct this
Greatness is Goodness

Mstcool

Seems like there are a lot of errors for this mod?

Tomy Tran

Try to see content of error_log file will help you much. You might have a code to redirect to homepage on 404 page.

nend

Quote from: Mstcool on July 31, 2012, 09:15:16 PM
Seems like there are a lot of errors for this mod?

Not really, this mod basically works right out of the box so I don't know what the commotion it about.


LOVELORD

Hello,

I install Pretty URLs mod and install SA Facebook integration mod.. And all thing working just i have few problems...

On mesegesindex page i have this problem:


Also on facebook I have this problem:


But on my URL Bar I have this adress:
http://www.site.tld/general-discussion/asdsdasdas/

and i want this url been showed on facebook. Is there any way how this can be done?

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'),
.
.
.
.




What about with this problem please? Thanks
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

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
'b' => array ('b', 'B'),

After
'b' => array ('b', 'B', 'ب'),

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 :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

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 :).

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)

Find in PrettyUrls-Filters.php
// 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);


Add After
$replacement = str_replace('index.php', '', $replacement);// Remove index.php, who needs it.

natenkiki2004

Where's the latest version of this mod? nend are you rewriting it or improving upon it? It's hard to follow after 300+ pages :)

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

nairaman

I created a new topic at this link, and here is the quote from there:

Quote from: nairaman on August 19, 2012, 01:25:58 PM
I created a new SMForum 2.0.2 at hxxp:www.howebook.net [nonactive] and I am trying to make the urls SEO-friendly, so I installed the Pretty URLs 1.0 from this link http://www.simplemachines.org/community/index.php?topic=146969.0

It's working fine, but I need to restructure the URL for topics from the current structure which is

hxxp://domain.tld/board/topic

to something like

hxxp://domain.tld/topic-id/topic

so that instead of

howebook.net/phone/master-guide

I should be having something like

howebook.net/1234/master-guide

where topic-id is a number indicating the numeric ID for that topic.

Can anyone guide me as to how I can achieve this. I would be so grateful if anyone could modify the mod accordingly and re-attach the new one here so that I could download and re-install on my forum.

Thanks.  ;D

vbgamer45

Not easily possible. You would have to change the pretty urls code.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

nairaman

Ok. Thanks for the prompt reply. But I would need you to guide me exactly where to go and modify, and the block of code that I need to modify. I am a bit good with PHP so I can at least hazard a try on a fresh installation of SMF on my server.

Blackburn

Gerçek mutluluk mal ve mülke sahip olmak ile değil,akıl ve erdeme sahip olmak ile mümkündür.
Slax Tr - Slax Türkiye Topluluğu adresinden usb ile bile çalışan işletim sisteminin Türkiye sitesine ulaşabilirsin.
Özgür yaşam,özgür insan.

Advertisement: