• Welcome to Simple Machines Community Forum. Please login or sign up.
November 27, 2021, 07:36:06 AM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


Pretty URLs

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

Previous topic - Next topic

MarcusJ

Quote from: vbgamer45 on March 08, 2010, 07:38:19 PM
Updated for SMF 2.0 RC3!

Thank you!  And thank you for all the speedy updates to your mods.   :-*

vbgamer45

No problem heh I counted about 39 here on this site and plus my paid addons was another 8 or 9
Community Suite for SMF - Take your forum to the next level built for 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

roco

Hi :)

Realy Great Mod!
Butt my webserver isnt Apache :(
..nevermind..

I have another problem please look here: http://www.simplemachines.org/community/index.php?topic=368899.msg2530981#msg2530981

I wrote a mod, which translates "current topic" Unfortunately, the link structure does not allow the cutting of characters like: ; or =
In this mod example link to the Google Translator look like this:


<a href="http://translate.google.com/translate?hl=en&amp;sl=', $txt['lang_dictionary'], '&amp;tl=de&amp;u=', $scripturl, '?topic=', $context['current_topic'], '.0.html" title="Ins Deutsche übersetzen [DE]" target="_blank"><img src="', $settings['default_theme_url'], '/images/gtflags/de.png" alt="[DE]" style="border:none;" /></a>


You see this? -

http://translate.google.com/translate?hl=en&amp;sl=', $txt['lang_dictionary'], '&amp;tl=de&amp;u=', $scripturl, '?topic=', $context['current_topic'], '"

Can you please, to match it to the Pretty URL's, or vice versa? Or maybe there is a possibility of the local exemption Pretty URLs?

My knowledge of mod_rewrite is incomplete, himself, does not help it if someone could help me with this?
Is it possible that both modifications were at the same time?
Please help in this matter.

Yours :)
roco

PS. Sorry for my english..

kosaic

March 09, 2010, 07:47:21 PM #5003 Last Edit: March 09, 2010, 07:51:16 PM by kosaic
To further Clarify Roco's post (as I'm the one having the problem :) ) , here are additional details.

I have Pretty URL's mod turned on. .htaccess file is as follows:
# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]


Now, the Google Translate Flag mod is trying to execute the following line from the Display.template.php

<a href="http://translate.google.com/translate?hl=en&amp;sl=', $txt['lang_dictionary'], '&amp;tl=en&amp;u=', $scripturl, '?topic=', $context['current_topic'], '.0.html" title="Translate into English [EN]" target="_blank"><img src="', $settings['default_theme_url'], '/images/gtflags/us.png" alt="[EN]" style="border:none;" /></a>

Here is what is showing up in the source code of the page when it executes:
<a href="http://fundyschutzhund.ca/forums/welcome/media-gallery-photo's-video's-hd-video's-now-up-!!!!!/" title="Translate into English [EN]" target="_blank"><img src="http://fundyschutzhund.ca/forums/Themes/default/images/gtflags/us.png" alt="[EN]" style="border:none;" /></a>

Here is what Should be showing up in the source of the HTML:
<a href="http://translate.google.com/translate?hl=en&sl=en&tl=de&u=http://fundyschutzhund.ca/forums/bh/bh-general-information/" title="Translate into English [EN]" target="_blank"><img src="http://fundyschutzhund.ca/forums/Themes/default/images/gtflags/us.png" alt="[EN]" style="border:none;" /></a>

This portion of the URL is being cut completely off:
http://translate.google.com/translate?hl=en&sl=en&tl=de&u=

If I turn off Pretty URL's, all works just fine with the Google translate flag mod.

Thoughts ? Suggestions ?

Can the .htaccess re-write lines be tweaked to accomodate? Something else ?

Regards,
K

calvinhobbes

I am getting error in package installation

   1.   Execute Modification   SMF2-0/Sources.xml   Modification parse error
2.   Execute Modification   SMF2-0/Sources.xml   Modification parse error
3.   Execute Modification   SMF2-0/BoardsAndTopics.xml   Modification parse error
4.   Execute Modification   SMF2-0/BoardsAndTopics.xml   Modification parse error
5.   Execute Modification   SMF2-0/Themes.xml   Modification parse error
6.   Execute Modification   SMF2-0/Themes.xml   Modification parse error


I just installed a fresh copy of SMF 2.0 RC3, Aeva and Ad Management before trying to install pretty url mod.

What's gone wrong ?

vbgamer45

It looks like the package didn't get uploaded correctly or it failed to extract the files check the error log for more information.
Community Suite for SMF - Take your forum to the next level built for 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

calvinhobbes

You are right, there is nothing wrong with the mod, on my local server it's installing correctly. Thanks.

Andy1122

My post url is messed up
I posted the problem on a different board and got no response before I found this board for Pretty urls ...so I am seeking your help right here  http://www.simplemachines.org/community/index.php?topic=369632.0



I post again
QuoteI have a problem with my site url – it is not pulling the correct post-title-name for the url. I got things messed up somehow and had to do a backup recently after I mistakenly deleted all the site posts. 

However I did the last back-up but all the post urls are all screwed up as each post has the url address not related to the post showing. I have the Pretty-url mod enabled on my site and with it each post url should give the site url along with the post title but it doesn't. However, it shows the url of another unrelated post in another board in the browser address bar.

After my back-up, I didn't noticed it until a member informed me of the issue. I tried to fix it at the phpMyAdmin but can't. The browser has the right post name but the url address bar has the wrong url title name.

For example:
Post title:  How to upload a file
Board name: Tip Bits
Current post url:  mysite-name(dot)com/tip-bits/9-month-old-marriage-dissolves-her-dirtiest-secrets-exposed/msg18016/?topicseen#new


Now the ... 9-month-old-marriage-dissolves-her-dirtiest-secrets-exposed... is the name/topic of another post (not the post displayed on the screen), it happens like this all my posts. And again, I do not have up to 18016 posts or messages on my site (I used to before the back-up), it is down to 17846 after the back-up.


I need some help please

Thanks

Andy1122

Can anyone help out with this issue above?

Özgür

Truncate the smf_pretty_topic_urls (or something like that) table in DataBase. (What is phpMyAdmin?)
So Long

Andy1122

Quote from: Daydreamer on March 11, 2010, 11:44:12 PM
Truncate the smf_pretty_topic_urls (or something like that) table in DataBase. (What is phpMyAdmin?)

If I truncate the smf_pretty_topic_urls, I believe I am deleting the rows. Is that right? What next do I need to do to fix refresh the urls. Thanks Daydreamer

dynaweb

Easy (but dirty) fix, dodge the htaccess rewrite by tweaking the case of the url.  Google doesnt seem to mind...

old

<a href="http://translate.google.com/translate?hl=en&amp;sl=', $txt['lang_dictionary'], '&amp;tl=es&amp;u=', $scripturl, '?topic=', $context['current_topic'], '.0.html" title="Traducción al espanol [ES]" target="_blank"><img src="', $settings['default_theme_url'], '/images/gtflags/es.png" alt="[ES]" style="border:none;" /></a>

new
<a href="http://translate.google.com/translate?hl=en&amp;sl=', $txt['lang_dictionary'], '&amp;tl=es&amp;u=', ucfirst($scripturl), '?topic=', $context['current_topic'], '.0.html" title="Traducción al espanol [ES]" target="_blank"><img src="', $settings['default_theme_url'], '/images/gtflags/es.png" alt="[ES]" style="border:none;" /></a>



Quote from: kosaic on March 09, 2010, 07:47:21 PM
To further Clarify Roco's post (as I'm the one having the problem :) ) , here are additional details.

I have Pretty URL's mod turned on. .htaccess file is as follows:
# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]


Now, the Google Translate Flag mod is trying to execute the following line from the Display.template.php

<a href="http://translate.google.com/translate?hl=en&amp;sl=', $txt['lang_dictionary'], '&amp;tl=en&amp;u=', $scripturl, '?topic=', $context['current_topic'], '.0.html" title="Translate into English [EN]" target="_blank"><img src="', $settings['default_theme_url'], '/images/gtflags/us.png" alt="[EN]" style="border:none;" /></a>

Here is what is showing up in the source code of the page when it executes:
<a href="http://fundyschutzhund.ca/forums/welcome/media-gallery-photo's-video's-hd-video's-now-up-!!!!!/" title="Translate into English [EN]" target="_blank"><img src="http://fundyschutzhund.ca/forums/Themes/default/images/gtflags/us.png" alt="[EN]" style="border:none;" /></a>

Here is what Should be showing up in the source of the HTML:
<a href="http://translate.google.com/translate?hl=en&sl=en&tl=de&u=http://fundyschutzhund.ca/forums/bh/bh-general-information/" title="Translate into English [EN]" target="_blank"><img src="http://fundyschutzhund.ca/forums/Themes/default/images/gtflags/us.png" alt="[EN]" style="border:none;" /></a>

This portion of the URL is being cut completely off:
http://translate.google.com/translate?hl=en&sl=en&tl=de&u=

If I turn off Pretty URL's, all works just fine with the Google translate flag mod.

Thoughts ? Suggestions ?

Can the .htaccess re-write lines be tweaked to accomodate? Something else ?

Regards,
K

FSS to HTML Widget [nofollow] - Snowboarding Forums [nofollow]

chase78

Changing of url for thread

How can I change:
http://ladybarbar.com/forums/all-host-bars-singapore/club-gio-gio/
To:
http://ladybarbar.com/forums/all-host-bars-singapore/club-giorgio-lavender/

I tried going to SQL and change myphpadmin and the linkage does not work. ie. u click from the main forum to the new link it does not load the page.

Thanks alL!

roco

Hello :)

@dynaweb Verry Thank You! :)

Your fix "works 100% perfect" (like He said @kosaic)
That was exactly what was needed - the vitamine!

Quote from: dynaweb on March 12, 2010, 04:07:43 PM
Easy (but dirty) fix, dodge the htaccess rewrite by tweaking the case of the url.  Google doesnt seem to mind...

old

<a href="http://translate.google.com/translate?hl=en&amp;sl=', $txt['lang_dictionary'], '&amp;tl=es&amp;u=', $scripturl, '?topic=', $context['current_topic'], '.0.html" title="Traducción al espanol [ES]" target="_blank"><img src="', $settings['default_theme_url'], '/images/gtflags/es.png" alt="[ES]" style="border:none;" /></a>

new
<a href="http://translate.google.com/translate?hl=en&amp;sl=', $txt['lang_dictionary'], '&amp;tl=es&amp;u=', ucfirst($scripturl), '?topic=', $context['current_topic'], '.0.html" title="Traducción al espanol [ES]" target="_blank"><img src="', $settings['default_theme_url'], '/images/gtflags/es.png" alt="[ES]" style="border:none;" /></a>


This is great news that these two modifications can co-exist!

Thx bro and women-warior is yours:



Best Regards :)
roco

atfosan

March 14, 2010, 04:23:01 PM #5014 Last Edit: March 15, 2010, 06:34:44 AM by atfosan
If it possible add Russian and Russian-utf8 translations from attachments to next release.

Could anyone tell me how can I make all links on board "/forum/board_name" instead of simple "board_name"?
I use portal and this is very useful for navigation. That's why this option could be very nice.
my SMF project - school site: forum with PortaMx and SimpleSEF mods

darubillah

hi,

I want a small modification I want to end my topic links with .html

at this time I have a url

http:// domain.com/board-name/topic-name/

now i want it like

http:// domain.com/board-name/topic-name.html

I have changed it in .htaccess

from
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]

to
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)(.html)?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]

Now problem is that its not changing the link on topics in forum. its still showing url like
http:// domain.com/board-name/topic-name/

Cesarion

I have a problem with this mod, when the active sections of the forum are not accessible. He says that does not work, before activating the mod tells me that some areas or topics may fail. Is there any solution for these sections and topics that pretty url indicates that we may fail?

It also occurs to me that if I change the name of a forum area called anthers still rises in the url, but I run pretty url tool to solve problems the url still shows the previous name.

azhriel

when i install this mod everything seems ok until i experience this error... when i click the more stats

it ask for the username & password of my server

as it is linked to www.myforum.com/stats

and not www.myforum.com/index.php?action=stats as a default of smf

how can i solve this... i am using smf 1.1.11

sorry for my english

vbgamer45

Community Suite for SMF - Take your forum to the next level built for 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

azhriel


Advertisement: