News:

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

Main Menu

Pretty URLs

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

Previous topic - Next topic

rd

Can you please change the extension? Like instead of (-) can you make the mod place a (_) for space?

The (_) is better for SEO, and if you added this then this mod will be waaayyyy better then simpleSEF.

Thanks,

vbgamer45

Can you send me a link to an article where it says _ is better than - for search engine rankings
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

Dannii

You can change it yourself by editing Subs-PrettyUrls.php.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

KensonPlays


Owner of Mesozoic Haven

Nao 尚

Quote from: vbgamer45 on February 02, 2010, 05:44:18 PM
Added some new filters to provide pretty urls support for some mods and uploaded it to the modsite.

prettyurls-extras-1.0-RC.zip - Provides rewrite filters for mods including seo4smf, Tinyportal Articles, Tagging System, Download System, ezPortal Pages, SMF Gallery, SMF Articles, SMF Classifeds, and SMF Store
Do you plan to add support for more mods yourself?
Or allow mod authors to add custom filters?
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

vbgamer45

Yes. I plan to add more filters from mod authors. Quickly did the mods that I know.
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

luismanson

there is an error on the smf parser when you add link to a post or topic with "!!" in the urls without URL tags... it will cut the link, can we make some workaround??

IE:
original: http://google.com/exclamation!!!!!
created link: http://google.com/exclamation

peterf

Hi again,

I have just installed this mod and the URL's are saying "oops this  link appears to be broken"
Is there an easy fix?

Here is a link to the test page
http://www.window-tools.com/windows/index.php?action=admin;area=pretty;sa=test

Thanks

vbgamer45

Do you have mod_rewrite enabled if you are using apache? Or if you are using IIS you need isapi_rewrite
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

Dannii

Quote from: luismanson on February 03, 2010, 01:27:39 PM
there is an error on the smf parser when you add link to a post or topic with "!!" in the urls without URL tags... it will cut the link, can we make some workaround??

IE:
original: http://google.com/exclamation!!!!!
created link: http://google.com/exclamation
You'll have to use [url] tags. This is a problem with SMF, not this mod.

peterf, does your server support everything this mod needs?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

peterf

Thanks vbgamer,

I am using cpanel, where would I enabled mod_rewrite? The pretty url files are in my sources folder.

Peter

peterf


Quote from: luismanson on February 03, 2010, 01:27:39 PM

peterf, does your server support everything this mod needs?

I would think so it seems to support everything else I have needed, but to tell the truth I don't know,

Peter

peterf

I also installed SimpleSEF would this be causing the problems?

I have tried to change the settings in options to "all files are writable" but it dosn't seem to let me, and I was going to try and install again once all the files were writable, may this have worked?

Peter

vbgamer45

That would cause issues you can only have one url rewriting mod so you either pick Pretty Urls or SimpleSEF
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

peterf

Thanks again vbgamer, I un installed both and reinstalled pretty and it now works fine.

Thanks,

Peter

vbgamer45

Glad you got it working!
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

rd

Let me try to find the article.

Nao 尚

Quote from: vbgamer45 on February 03, 2010, 09:33:23 AM
Yes. I plan to add more filters from mod authors. Quickly did the mods that I know.
Thanks.

In case you want to add support for Aeva Media sooner rather than later... Here's my code.
The following should take charge of /media/, /media/album/123/, /media/item/123/ and all download variants (/media/media/123/, as silly as it sounds -- can't really change the sub-action's name. :P) It's untested so use with caution. :)

// Pretty URLs for Aeva Media
$prettyFilters['aeva'] = array(
'description' => 'Aeva Media filter',
'enabled'  => 0,
'filter'  => array(
'priority'  => 38,
'callback'  => 'pretty_aeva_filter'
),
'rewrite'  => array(
'priority'  => 38,
'rule'  => array(
'RewriteRule ^media/(thumba?|preview)/([0-9]+)/?(.*)$ index.php?action=media;sa=media;in=$2;$1;$3 [L,QSA]',
'RewriteRule ^media/(?:(album|item|media)/([0-9]+)/?)?(.*)$ index.php?action=media;sa=$1;in=$2;$3 [L,QSA]',
),
),
'title'  => 'Aeva Media Pretty Filter <a href="http://aeva.noisen.com/" target="_blank">Website</a>'
);


As for the filter, it's harder because it's based off the stuff I wrote 2 years ago. Hopefully it's still valid in the latest PrettyURLs... (I've changed some of the code on-the-fly to avoid using a subdomain, since I don't believe subdomains are supported by PrettyURLs anyway.)


// Filter Aeva Media URLs
function pretty_aeva_filter($urls)
{
global $boardurl;

$pattern = array(
'~.*[?;&]action=media;sa=media;in=([0-9]+);(thumba?|preview)(.*)~S',
'~.*[?;&]action=media;sa=(album|item|media);in=([0-9]+)(.*)~S',
'~.*[?;&]action=media(.*)~S',
);
$replacement = array(
$boardurl . '/media/$2/$1/?$3',
$boardurl . '/media/$1/$2/?$3',
$boardurl . '/media/?$2',
);
foreach ($urls as $url_id => $url)
if (!isset($url['replacement']) && strpos($url['url'], 'action=media') !== false)
$urls[$url_id]['replacement'] = preg_replace($pattern, $replacement, $url['url']);
return $urls;
}
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

vbgamer45

Thanks Nao have added the code for Avea Media filters and committed it.
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

Nao 尚

Lol... Tu quoque, vb!! ;D
Sorry, it just makes me laugh how everybody tends to misspell Aeva... The easier ones say 'AEVA' (all caps), then there's the super-classic 'AVEA' (I believe it's a Turkish word, that would explain), recently saw 'AEVEA' and 'EVEA', now apart from your 'Avea' in this post, I see you logged the commit as 'Aveva'...
Maybe I should have just used Cyna Media, like I was planning... I would have had a chance of it having been spelt correctly, lol.

Anyway, joke aside, thanks for the commit! I forgot I had commit powers, too. Maybe I'll use them in the future if I ever install a clean PrettyURLs 1.x on a test site. Right now I feel so awfully disconnected from it.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Advertisement: