News:

Join the Facebook Fan Page.

Main Menu

Pretty URLs

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

Previous topic - Next topic

Doug Heffernan

Quote from: BigSerge on April 01, 2022, 12:02:11 PMThe only small problem I have is the Pretty URLs link on the Configuration part of the Admin Panel, and when I click this link, I get the fatal error you can see on the screenshots. So the only "problem" is this link that for some reason stays there.

You get that error because the files that the links need to work are not present. What about the default theme, does the link appear there as well or only in the custom theme? When you removed the code manually, did you make sure to undo the changes from the custom themes as well?

BigSerge

QuoteYou get that error because the files that the links need to work are not present. What about the default theme, does the link appear there as well or only in the custom theme? When you removed the code manually, did you make sure to undo the changes from the custom themes as well?

I just tried, and on Default Theme - Core, the link is also there, and the fatal error too.

Yes, I always check the boxes to install every Mod in both themes, and to uninstall too. So it means that whatever it is causing this small problem, is affecting both themes.

Thank you

Doug Heffernan

Quote from: BigSerge on April 01, 2022, 04:40:25 PM
QuoteYou get that error because the files that the links need to work are not present. What about the default theme, does the link appear there as well or only in the custom theme? When you removed the code manually, did you make sure to undo the changes from the custom themes as well?

I just tried, and on Default Theme - Core, the link is also there, and the fatal error too.

Yes, I always check the boxes to install every Mod in both themes, and to uninstall too. So it means that whatever it is causing this small problem, is affecting both themes.

Thank you

Can you please attach the ManageBoards.template.php and Admin.php files here?

BigSerge

QuoteCan you please attach the ManageBoards.template.php and Admin.php files here?

Done. The Admin.php was inside the Sources folder, and the ManageBoards.template.php was inside default's theme folder. Hope it is what you asked.

Thank you

Doug Heffernan

Quote from: BigSerge on April 01, 2022, 06:01:43 PM
QuoteCan you please attach the ManageBoards.template.php and Admin.php files here?

Done. The Admin.php was inside the Sources folder, and the ManageBoards.template.php was inside default's theme folder. Hope it is what you asked.

Thank you

I thought that you said that you had removed all the mod 's code manually from the files :D

Anyways, at the Admin.php file find and remove the following code:

'pretty' => array(
'label' => (isset($txt['pretty_urls']) ? $txt['pretty_urls'] : 'Pretty URLs'),
'file' => 'PrettyUrls.php',
'function' => 'PrettyInterface',
'custom_url' => $scripturl . '?action=admin;area=pretty',
),

Save the changes and reupload the file back overwritting the one in the server.

That will remove the mod link from the Admin Panel.

My advice, if I may, go through all the files that the mod edits, once again, and double check them again.


BigSerge

QuoteI thought that you said that you had removed all the mod 's code manually from the files :D

I did, following the instructions on the parse, but I looked right below the code where it says to add the pretty urls code, and saw the code for the ad management mod, and I did not look below. Damn, well done. So it was this piece of code.

Thanks a lot, and sorry for bothering with this  ;)

Doug Heffernan

Quote from: BigSerge on April 01, 2022, 06:27:12 PM
QuoteI thought that you said that you had removed all the mod 's code manually from the files :D

I did, following the instructions on the parse, but I looked right below the code where it says to add the pretty urls code, and saw the code for the ad management mod, and I did not look below. Damn, well done. So it was this piece of code.

Thanks a lot, and sorry for bothering with this  ;)

No worries, you did not bother me at all. Glad to have been of help :)

Sebastiii

Hello,

I'm running into an issue with the latest version of the MOD.
It happens on SMF 2.0.19, but not on SMF 2.1.1.

I have set to receive email when a new post is done, etc.
After the upgrade of version 2.5, link in the received email is not pretty change:

For ex :
Now I receive this :
http://127.0.0.1/public_html/forum/index.php?topic=8260.new;topicseen#new
That should be :
http://127.0.0.1/public_html/forum/journaux/(journal)-de-jack/new/?topicseen#new
You can see URL are local because, I'm trying to figure out why it happens on the copy on the forum we used.
But, it's the same issue with fresh installation of SMF 2.0.19 and Pretty Urls 2.5.

I have noticed this after the upgrade on official running SMF forum.

So after investigating, I have found that commented out that part of code in the file : Subs-PrettyUrls.php

Line 13 :
    if (isset($_REQUEST['action']))
    {
        if ($_REQUEST['action'] == 'post2')
            return $buffer;
    }

To :
    // Need to comment out that part to be able to have pretty link in email
    /*if (isset($_REQUEST['action']))
    {
        if ($_REQUEST['action'] == 'post2')
            return $buffer;
    }*/

And all is working correctly, I have tried to disable the "action" settings with original code, but it doesn't work.

On Subs-PrettyUrls.php from 2.1.1 SMF install, this part of code is present and works, so not sure why it happens !
Thanks.

vbgamer45

Hmm that does sound like a bug. I just don't remember the reason why I disabled it to begin with.
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

Sebastiii

Ok, thanks @vbgamer45 for your answer, hoping that it will not break anything !

Alpay

Hello,
 
   I have upgraded.. v.2.2 to 2.5..
   But, board not translate.

   Exp:   https://www.diablofanturkiye.com/3/diablo-immortal-2-haziranda-her-yerde/

   Patch file is ok. Where should I pay attention?


vbgamer45

Click on the pretty urls link in the manage boards section and enter a custom url.
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

Alpay

Quote from: vbgamer45 on April 25, 2022, 03:39:00 PMClick on the pretty urls link in the manage boards section and enter a custom url.

Not work..



exp : https://www.diablofanturkiye.com/3/

vbgamer45

What did you change it to? Any special characters? If so avoid them.
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

Alpay

Quote from: vbgamer45 on April 25, 2022, 03:53:53 PMWhat did you change it to? Any special characters? If so avoid them.

php 5.6 to 7.4 :)
..

Prettymod delete and fresh setup..

2: in_array() expects parameter 2 to be array, null given
File: /home/xx/diablofanturkiye.com/Sources/PrettyUrls-Filters.php
: 340

if (in_array($matches[2], $context['pretty']['action_array']))
board and action not working..
profile and topic working :)

vbgamer45

Any install failtures?

Are you rewriting actions? on your board
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

Alpay


vbgamer45

That error makes sense if (in_array($matches[2], $context['pretty']['action_array'])) is empty.
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

Alpay

Then it works like this : https://diablofanturkiye.com/temelbilgiler/diablo-iii-kutsal-bilgi-kaynagi/

while browsing the site : https://diablofanturkiye.com/13/diablo-iii-kutsal-bilgi-kaynagi/

:)
How can I fix?



DB:



.htaccess
PRETTYURLS MOD BEGINS
# Pretty URLs mod
# https://www.smfhacks.com/prettyurls-seo-pro.php
# .htaccess file generated automatically on: April 27, 2022, 17:54

RewriteEngine on
RewriteBase /

# Rules for: profiles
RewriteRule ^profile/([^/]+)/?$ ./index.php?pretty;action=profile;user=$1 [L,QSA]

# Rules for: actions
RewriteRule ^(agreement|acceptagreement|activate|admin|announce|attachapprove|bookmarks|buddy)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(buddies|calendar|clock|collapse|coppa|credits|deletemsg|display)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(dlattach|editpoll|editpoll2|mediapro|badgeawards|emailuser|findmember|gpbp)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(gpbpmanage|forum|portal|gamercard|groups|help|helpadmin|im)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(projects|jseditor|jsmodify|jsoption|lock|lockvoting|login|login2)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(logout|markasread|mergetopics|media|mgallery|mlist|moderate|modifycat)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(modifykarma|movetopic|movetopic2|notify|notifyboard|notifyannouncements|openidreturn|pm)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(post|post2|printpage|profile|quotefast|quickmod|quickmod2|recent)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(register|register2|reminder|removepoll|removetopic2|reporttm|requestmembers|restoretopic)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(search|search2|sendtopic|sitemap|smstats|suggest|spellcheck|splittopics)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(stats|sticky|feedsadmin|tags|theme|trackip|about:mozilla|about:unknown)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(unread|unreadreplies|verificationcode|viewprofile|vote|viewquery|viewsmfile|who)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(calreminder|\.xml|NewsSubscribe|alisveris|xmlhttp|canliyayin|paragon|builder)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(immortalbuilder|paragon2|paragonupdate|forum)/?$ ./index.php?pretty;action=$1 [L,QSA]

# 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]

# PRETTYURLS MOD ENDS
RewriteEngine on

RewriteCond %{QUERY_STRING} ^[^=]*$
RewriteCond %{QUERY_STRING} %2d|\- [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule .? - [F,L]

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^sitemap2.xml$ /index.php?action=sitemap;xml

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://diablofanturkiye.com/$1 [R=301,L]   

jed84

Quote from: gevv on February 16, 2022, 12:03:14 PMHi,

Https or non-http links are broken




forum ;  hxxp:site.com/forum [nonactive]

link added to topic (without http or https):  hxxp:site.com/forum [nonactive]  or another site link  hxxp:anothersite.com [nonactive]

clickable link html output


<a href="https://site.com/forum///site.com/forum/" class="bbc_link" target="_blank" rel="noopener">site.com/forum/</a>





<a href="https://site.com/forum///anothersite.com" class="bbc_link" target="_blank" rel="noopener">anothersite.com</a>



SMF 2.1.1, Pretty Urls 2.5 PHP 7.4

Has this been resolved?

I am having an exact problem.
My forum is in a subfolder.

Any text within the post that has a domain address - but is not a link - is also converted into a link and it has a wrong prefix.

Advertisement: