Advertisement:

Author Topic: Pretty URLs  (Read 2333418 times)

Offline MoleDJ

  • Newbie
  • *
  • Posts: 1
Re: Pretty URLs 1.0 - Updated for SMF 2.0
« Reply #7320 on: September 18, 2015, 06:38:25 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

Code: [Select]
<link href="android-app://com.quoord.tapatalkpro.activity....

However, PrettyURLs is prepending the base URL of the forum to it, so it becomes
Code: [Select]
<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 :

Code: [Select]
// 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.

Offline MESWEB

  • Full Member
  • ***
  • Posts: 407
  • Gender: Male
    • Don't let errors.win
Re: Pretty URLs
« Reply #7321 on: September 21, 2015, 08:09:22 PM »
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?

Offline FroschLee

  • Semi-Newbie
  • *
  • Posts: 95
Re: Pretty URLs
« Reply #7322 on: October 08, 2015, 05:20:53 PM »
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/??

Offline Duartes

  • Semi-Newbie
  • *
  • Posts: 78
Re: Pretty URLs
« Reply #7323 on: October 13, 2015, 06:15:50 PM »

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

Offline NoobDeveloper

  • Jr. Member
  • **
  • Posts: 331
Re: Pretty URLs
« Reply #7324 on: October 25, 2015, 01:33:30 PM »
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 ?


Code: [Select]
e.g: URL : http://custom.simplemachines.org/mods/?mod=636
Code: [Select]
after: http://custom.simplemachines.org/mods/?mod=636/msg121

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: Pretty URLs
« Reply #7325 on: October 29, 2015, 11:50:15 PM »
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

Code: [Select]
<link href="android-app://com.quoord.tapatalkpro.activity....

However, PrettyURLs is prepending the base URL of the forum to it, so it becomes
Code: [Select]
<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 :

Code: [Select]
// 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.
Code: [Select]
if (substr($match,0,10) == 'javascript')
continue;

Add after
Code: [Select]
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 :'-(

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,054
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Pretty URLs
« Reply #7326 on: October 29, 2015, 11:55:19 PM »
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

Offline SMFHacks.com Team

  • Full Member
  • ***
  • Posts: 440
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Re: Pretty URLs
« Reply #7327 on: October 30, 2015, 12:03:22 AM »
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.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline Gryzor

  • Sr. Member
  • ****
  • Posts: 790
  • Gender: Male
  • CPCwiki.eu - The Amstrad CPC Encyclopaedia!
    • CPCWiki
Re: Pretty URLs
« Reply #7328 on: October 30, 2015, 04:04:31 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 :)

Offline webrookie

  • Semi-Newbie
  • *
  • Posts: 19
    • Online Chemistry Tutor
Re: Pretty URLs
« Reply #7329 on: November 05, 2015, 08:00:35 AM »
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

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: Pretty URLs
« Reply #7330 on: November 05, 2015, 08:13:21 AM »
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?

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: Pretty URLs
« Reply #7331 on: November 05, 2015, 08:29:17 AM »
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.

Offline webrookie

  • Semi-Newbie
  • *
  • Posts: 19
    • Online Chemistry Tutor
Re: Pretty URLs
« Reply #7332 on: November 05, 2015, 11:39:34 AM »
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.
« Last Edit: November 05, 2015, 11:51:29 AM by webrookie »

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: Pretty URLs
« Reply #7333 on: November 05, 2015, 12:00:47 PM »
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.

Offline webrookie

  • Semi-Newbie
  • *
  • Posts: 19
    • Online Chemistry Tutor
Re: Pretty URLs
« Reply #7334 on: November 05, 2015, 12:19:45 PM »
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.

Offline webrookie

  • Semi-Newbie
  • *
  • Posts: 19
    • Online Chemistry Tutor
Re: Pretty URLs
« Reply #7335 on: November 05, 2015, 12:24:32 PM »
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.

Offline videoed

  • Jr. Member
  • **
  • Posts: 182
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: Pretty URLs
« Reply #7336 on: November 10, 2015, 03:20:18 PM »
Attached you will find the Spanish translation for v1.1.3, both in UTF-8 format and using entities for use with Latin1

Bests,

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,054
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Pretty URLs
« Reply #7337 on: November 10, 2015, 03:25:11 PM »
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

Offline t2hol

  • Semi-Newbie
  • *
  • Posts: 24
Re: Pretty URLs
« Reply #7338 on: November 16, 2015, 10:05:47 AM »
Could you please add feature to support Vietnamese ?

Thanks

Offline videoed

  • Jr. Member
  • **
  • Posts: 182
  • Gender: Male
  • Ramón Cutanda
    • videoedicion.org
Re: Pretty URLs
« Reply #7339 on: November 16, 2015, 10:18:06 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:

Code: [Select]
        <require-file name="PrettyUrls.english.php" destination="$languagedir" />
3. Add afterwards:

Code: [Select]
        <require-file name="PrettyUrls.vietnamese.php" destination="$languagedir" />
4. Look for:

Code: [Select]
        <remove-file name="$languagedir/PrettyUrls.english.php" />
6. Add:

Code: [Select]
        <remove-file name="$languagedir/PrettyUrls.vietnamese.php" />
Bests,