News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Pretty URLs

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

Previous topic - Next topic

MoleDJ

Quote from: Gryzor on September 18, 2015, 05:40:16 AM
Here's an interesting issue that PrettyURLs causes when used with Tapatalk:

As you know Google has started indexing sites to use with apps, so you can open results in said apps on your mobile devices. Tapatalk seems to be inserting a section of code into the pages to do that, with URLs that begin with


<link href="android-app://com.quoord.tapatalkpro.activity...
.

However, PrettyURLs is prepending the base URL of the forum to it, so it becomes
<link href="http://www.cpcwiki.eu/forum/android-app://com.quoord.tapatalkpro.activity/... (that's my forum btw, obviously).

The Tapatalk team has been extremely helpful in guiding me with that and they're trying to implement a workaround, but I thought I'd mention it here so that maybe PrettyURLs can be updated to prevent that problem?

Thanks!
Hi, i´m Jagoba from Tapatalk. The problem is located in the hook to QuerysString.php, exactly the line that cause that issue is :

// Rewrite the buffer with Pretty URLs!
if (!empty($modSettings['pretty_enable_filters']))
{
require_once($sourcedir . '/PrettyUrls-Filters.php');
$buffer = pretty_rewrite_buffer($buffer); //this function cause the issue
}


I am just testing a Tapatalk plugin update that will solve the issue, hooking us after that change to restore our links back to correct ones, but I think that issue can be affecting other plugins. If this plugins devs need more info feel free on contact me.

MESWEB

Problem there!
I just don't know what happened with some of my links:
If I try modify any post then link has broken:
SMF expect:
?action=post;msg=382
But all links looks like:
?action=post%3bmsg=382

I think this error is from bad coding not utf8. What I need to fix?

FroschLee

Hi Guys;

İ'm using aeva mod 1.4c and prettyurls. İ want to file name on link. For example; i have a picture with name of "Abstract" in album "Pictures". Now i can see this as like as "media/item/3/". How can i change it to media/Album name/File Name/? in example media/Pictures/Abstract/??

Duartes


Hi

I had a SMF forum at this address: http://www.electronica-duartes.com/index.php

I installed Pretty URLs mod in July 2013.
A few days ago, I had to move the forum to this address: http://www.electronica-duartes.com/forum/index.php
From there, I started having problems with the board menu. I had to uninstall the Pretty URLs mod to the menu back to work. For the Pretty URLs old worked installed the Pretty URLs Reverter mod and did the redirect using .htaccess file all the frames of the forum and was placed in the server root. This is an example: RewriteRule ^/?dicas-tvs/(.*)$ /forum/dicas-tvs/$1 [R=301,L]
However, the old Pretty URLs continue giving 404 error.

Everything that has been done is on the page below: http://www.simplemachines.org/community/index.php?topic=540227.0;all#lastPost

Someone I can lend a hand to the Pretty old URLs work again at all in the fórum?

Thank you.

Best regards
Mário Duarte Santos

NoobDeveloper

Hi
I have a simple requirement that my post url should end with /mg121  for some reason. Can you tell me which file to edit ?


e.g: URL : http://custom.simplemachines.org/mods/?mod=636

after: http://custom.simplemachines.org/mods/?mod=636/msg121

nend

Quote from: MoleDJ on September 18, 2015, 06:38:25 AM
Quote from: Gryzor on September 18, 2015, 05:40:16 AM
Here's an interesting issue that PrettyURLs causes when used with Tapatalk:

As you know Google has started indexing sites to use with apps, so you can open results in said apps on your mobile devices. Tapatalk seems to be inserting a section of code into the pages to do that, with URLs that begin with


<link href="android-app://com.quoord.tapatalkpro.activity...
.

However, PrettyURLs is prepending the base URL of the forum to it, so it becomes
<link href="http://www.cpcwiki.eu/forum/android-app://com.quoord.tapatalkpro.activity/... (that's my forum btw, obviously).

The Tapatalk team has been extremely helpful in guiding me with that and they're trying to implement a workaround, but I thought I'd mention it here so that maybe PrettyURLs can be updated to prevent that problem?

Thanks!
Hi, i´m Jagoba from Tapatalk. The problem is located in the hook to QuerysString.php, exactly the line that cause that issue is :

// Rewrite the buffer with Pretty URLs!
if (!empty($modSettings['pretty_enable_filters']))
{
require_once($sourcedir . '/PrettyUrls-Filters.php');
$buffer = pretty_rewrite_buffer($buffer); //this function cause the issue
}


I am just testing a Tapatalk plugin update that will solve the issue, hooking us after that change to restore our links back to correct ones, but I think that issue can be affecting other plugins. If this plugins devs need more info feel free on contact me.

Simple fix, I had similar problems with Open Graph. In PrettyUrls-Filters.php find.
if (substr($match,0,10) == 'javascript')
continue;


Add after
if (substr($match,0,11) == 'android-app')
continue;


Haven't tested it but it should work.

I need to dump some of my work into this fantastic mod. VB where are you hosting files now, Google Code is no longer :'-(

vbgamer45

All my mods are on github
https://github.com/VBGAMER45/SMFMods


Will add that fix now.
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

SMFHacks.com Team

Update!
1.1.3 Thanks to nend
  ! Skip rewriting urls for the tapatalk android app
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Gryzor

Quote from: SMFHacks.com Team on October 30, 2015, 12:03:22 AM
Update!
1.1.3 Thanks to nend
  ! Skip rewriting urls for the tapatalk android app

Ah, TT's latest versions don't have the issue, but good to know :)

webrookie

Hi,
I am using smf 2.0.9.
As for the version of Pretty URLs, the browse packages in admin shows the version as 1.1.2. However the Pretty URLs Administration panel shows this:
Version info
Current version: 1.0RC5
Latest version: 1.1 Download

The issue that I am facing is that while the urls were being written correctly earlier, now the url s appear like this:
http://www.chemtopper.com/smf/ap-chemistry/1087108810801082108610831100108510991077-1082/ [nofollow]
The correct url should be something like:
http://www.chemtopper.com/smf/ap-chemistry/how-many-liters-of-oxygen/ [nofollow]

I am not able to make out why this has happened,
Request your help in sorting this out.
Thanks

nend

That looks awkward.

Are you familiar with phpmyadmin? I say examine the topic table for that topic, maybe there is something awkward in it. Also if the post had a different name before it will use the first name.

The pretty topics table in the database has a limit on how many characters are allowed, maybe this is how it got truncated in the end. VB does the mod check the lenght before inserting into db?

nend

Yeah looks like the db truncated it. I don't know if this would be something to fix or not.

What happened was your topic title was over 80 characters, however the value stored in the database is still usable. Only way to fix it for future is to chop the title before adding or increase the db table size, I vote for the first one if any fix is to be applied. I say if applied because the data is still usable, not pretty but still valid.

webrookie

#7332
Hi,
Thanks for the reply.
However to check I made a small post with the topic as - check post.
The  url generated is http://www.chemtopper.com/smf/ap-chemistry/10821072108810901080108510821080-108210861084/ [nofollow]
I did check from phpmyadmin and the entry there in pretty_topic_urls is:
10821072108810901080108510821080-108210861084

Could you throw  some light on what is going wrong here.

Also how to check that I have the latest version since the  data shown in the package list and pretty url dashboard is different as follows:
browse packages in admin shows the version as 1.1.2. However the Pretty URLs Administration panel shows this:
Version info
Current version: 1.0RC5
Latest version: 1.1 Download

Wouold  it be worth to remove and install again or would it break the links if reinstalled.
Thanks again.

nend

Give this a go change the names in the tables manually and repair the database in the SMF admin panel.

I suspect the large title of the previous topic did something.

webrookie

Hi,
I did try to change the url in the pretty_topic_urls table against the id_topic for the post.
However the url appears the same ie http://www.chemtopper.com/smf/ap-chemistry/10821072108810901080108510821080-108210861084/ [nofollow]
Is there something else also reqd to be changed ?
Thanks again.

webrookie

Also can you let me know about this part:

How to check that I have the latest version since the  data shown in the package list and pretty url dashboard is different as follows:
browse packages in admin shows the version as 1.1.2. However the Pretty URLs Administration panel shows this:
Version info
Current version: 1.0RC5
Latest version: 1.1 Download

Wouold  it be worth to remove and install again or would it break the links if reinstalled.
Thanks again.

Ramón Cutanda

Attached you will find the Spanish translation for v1.1.3, both in UTF-8 format and using entities for use with Latin1

Bests,

vbgamer45

Thanks for the translation
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

t2hol

Could you please add feature to support Vietnamese ?

Thanks
http://www.wpse.net [nofollow]

Ramón Cutanda

Quote from: t2hol on November 16, 2015, 10:05:47 AM
Could you please add feature to support Vietnamese ?

Open the Modifications.english.php file with any simple text editor (notepad or similar NEVER Microsft Word), translate all the strigs and save it as Modifications.vietnamese.php (or whatever the name convention is for your particular language). Then you can share it in this post. Hopefully it will be included in next release of the mod.

If you want to manually add that language, follow these steps:

1. Open the file package-info.xml

2. Inside that file, look for:

        <require-file name="PrettyUrls.english.php" destination="$languagedir" />

3. Add afterwards:

        <require-file name="PrettyUrls.vietnamese.php" destination="$languagedir" />

4. Look for:

        <remove-file name="$languagedir/PrettyUrls.english.php" />

6. Add:

        <remove-file name="$languagedir/PrettyUrls.vietnamese.php" />

Bests,

Advertisement: