Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
Xbox Leaderboards 5
Cookiebar Panel 70
AD Gallery 151
SyntaxHighlighte... 63
Newsletters v4.03 168
Facebook Like Box 202
Newsletters v4.02 79
Metro 235
Facebook Connect 215
Shoutbox Panel 185
Redactor for PHP... 127
MI Floating Side... 132
Facebook Login/R... 180
Avatar Studio v2.03 215
Relationship Sta... 121
Popular Addons
iTheme2 5908
Arise 5869
User Control v1.23 4680
Event Calendar 4129
Photowidget panel 3921
Radio-Theme red2... 3394
Highslide Gallery 3359
CSS/JavaScript D... 3275
Facebook Connect... 3055
Dynamic Menu 2945
Slideshow Lightb... 2768
L-AMANT 2689
Enigma 2670
2Dark 2624
Black 2618
View Thread
Who is here? 1 guest(s)
 Print Thread
SEO URLs for PHP-Fusion | Alpha Testing
Ankur
Hello Guyz,

I have Coded an Infusion which will provide you the ability to make your website URLs SEO Friendly. I hope that you will like it.

I tested it thoroughly but I think that people would test it more better.

Infusion Algorithm:

This infusion is based on REGEX/Regular Expression search.

1. Search for :
http://mysite.com/news.php?readmore={some number}

2. Replace it with :
http://mysite.com/News-{some number}-News-Description

3. Similarly do this for other URLs of Core.

Working:

As you know, it is quite impossible to implement it for all kind of URLs in the system, on basis of using Regex, you may find some little areas to be normal as they are in the system.

But I've tried my best to make each and every possible URL to be user friendly.

Testing and Reporting:

Currently, its Live Demo and Testing is done at : http://fusion8.co...

Please Test it by Downloading and Installing it from below and kindly Report any "Errors" from the Error Log.

Installation:

1. Download and install seo_friendly_urls_panel and Infuse it.

2. Add the Panel seo_friendly_urls_panel to Panels and Display it on all pages if you are adding it as Upper/Lower Panel.

3. A Small Change in maincore.php :

Find :
Download source  Code
define("TRUE_PHP_SELF", $current_page);



Replace with :
Use this Code if you have Choose SEO URLs Type as Plain : http://yoursite.c...
Download source  Code
if (preg_match("/\/(administration)\//", $current_page))
{
   define("TRUE_PHP_SELF", $current_page);
}
else if (preg_match("/".preg_replace("/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $settings['opening_page'])."/", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $current_page)))
{
   define("TRUE_PHP_SELF", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "/$1", $current_page));
}
else
{
   define("TRUE_PHP_SELF", $current_page);
}





Use this Code if you have Choose SEO URLs Type as HTML : http://yoursite.c...
Download source  Code
if (preg_match("/\/(administration)\//", $current_page))
{
   define("TRUE_PHP_SELF", $current_page);
}
else if (preg_match("/".preg_replace("/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $settings['opening_page'])."/", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $current_page)))
{
   define("TRUE_PHP_SELF", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "/$1.html", $current_page));
}
else
{
   define("TRUE_PHP_SELF", $current_page);
}





Done !!!

EDIT : Sorry I forgot to include the code from HTACCESS

Also, You must paste the code in your .htaccess file.

.htaccess File attached now !
Ankur attached the following files:
seo_friendly_urls_panel.zip [10.68kB / 131 Downloads]
htaccess.zip [1.62kB / 125 Downloads]

Edited by Ankur on 18-07-2012 17:30
 
http://ankurthakur.in/
Halisson Ricardo
-

Seems like a great job. This feature already is natively in version 8? I'm sorry, but I'm still not fully up to date on the project v8. Smile

-
Halisson Ricardo
PHP-Fusion Senior Developer
NSS Brazil Admin Leader
.
.
 
www.bbomsuportefree.com.br
Rush_
that's good. but not...
for each link replaced it need to make a db query to get "news-description". do u think its normal, me not. brrrr
 
http://fusion.annetlab.ru
Sprunkas
Download source  Code
define("[b]TURE[/b]_PHP_SELF", $current_page);


i think it's mistake, here need to be TRUE i think.
Edited by Sprunkas on 17-07-2012 16:29
 
jikaka
@Ankur, my anti-virus swears at this link
www.rusfusion.ru - russian nss
 
www.rusfusion.ru
Ankur
halisson wrote:

-

Seems like a great job. This feature already is natively in version 8? I'm sorry, but I'm still not fully up to date on the project v8. Smile

-


Thats a custom Mod for 7.02+, no where related to v8 Smile

Rush_ wrote:

that's good. but not...
for each link replaced it need to make a db query to get "news-description". do u think its normal, me not. brrrr


This doesn't work in that way which will make bunch of DB Queries to database. Here is how it works :

1. Find How many News links are there on the page.
Ex: http://mysite.com/news.php?readmore=1
http://mysite.com/news.php?readmore=2
http://mysite.com/news.php?readmore=3

And it will combine it to a single/1 query :
dbquery("SELECT news_subject FROM ".DB_NEWS." WHERE news_id IN(1,2,3) " )

And this is all done before the page loads. Hence, time efficient and memory efficient Wink

Sprunkas wrote:

i think it's mistake, here need to be TRUE i think.


Oops ! Sorry ! You're right ! Actually, I was testing this on an old version, in which it is TURE_PHP_SELF by mistake...

jikaka wrote:

@Ankur, my anti-virus swears at this link


Thats surely not due to this, but due to co.cc link Cool
 
http://ankurthakur.in/
jikaka
great work!
www.rusfusion.ru - russian nss
 
www.rusfusion.ru
Ankur
Hoping for more feedback and errors... or I may proceed to submit it to Addons...

jikaka wrote:

great work!


Thanks... Smile
 
http://ankurthakur.in/
Yodix
A great solution. You would not have anything against it, to use it in modification for PHP-Fusion v8? Smile
Happy Hunger Games! And may the odds be ever in your favor.
 
http://www.on-deck.eu
Sprunkas
I tested at my site this addon. I saw that when replacing maincore.php:

Download source  Code
define("TRUE_PHP_SELF", $current_page);



with:

Download source  Code
if (preg_match("/\/(administration)\//", $current_page))
{
   define("TRUE_PHP_SELF", $current_page);
}
else if (preg_match("/".preg_replace("/(.*)(\.php|\.html)?/", "$1", $settings['opening_page'])."/", preg_replace("/(.*)(\.php|\.html)?/", "$1", $current_page)))
{
   define("TRUE_PHP_SELF", preg_replace("/(.*)(\.php|\.html)/", "$1", $current_page));
}
else
{
   define("TRUE_PHP_SELF", $current_page);
}




Then don't displays forum threads at the main page.
 
Ankur
Sprunkas wrote:

I tested at my site this addon. I saw that when replacing maincore.php:

Then don't displays forum threads at the main page.


Really ? You forgot to change Site Opening Page link in Main Settings, I guess.

However, What is your website link? It would be more useful Cool

Yodix wrote:

A great solution. You would not have anything against it, to use it in modification for PHP-Fusion v8? Smile


Pardon me... but I didn't got your point... hmm?

Sorry for my bad english... Frown
 
http://ankurthakur.in/
jikaka
instead of this:
http://fusion8.co.cc/Article-Category-2-PHP-Fusion-v7-Tutorials


better way:
http://fusion8.co.cc/article-category-2-php-fusion-v7-tutorials


best of all urls in lower case
www.rusfusion.ru - russian nss
 
www.rusfusion.ru
Ankur
jikaka wrote:

instead of this:
http://fusion8.co.cc/Article-Category-2-PHP-Fusion-v7-Tutorials


better way:
http://fusion8.co.cc/article-category-2-php-fusion-v7-tutorials


best of all urls in lower case


That can be simply achieved by changing text in seo_friendly_urls_panel/includes/seo_functions.php Good
 
http://ankurthakur.in/
Sprunkas
After editing maincore.php:
img3.imageshack.us/img3/3953/91929617.png
Before editing maincore.php:
img29.imageshack.us/img29/2524/23545615.png

P.S Forum threads only displays when you tick box in the panel to display at all pages.
P.S.S Not only last forum threads not displaying at main page.
Edited by Sprunkas on 18-07-2012 10:47
 
Yodix
Ankur wrote:

Sprunkas wrote:

I tested at my site this addon. I saw that when replacing maincore.php:

Then don't displays forum threads at the main page.


Really ? You forgot to change Site Opening Page link in Main Settings, I guess.

However, What is your website link? It would be more useful Cool

Yodix wrote:

A great solution. You would not have anything against it, to use it in modification for PHP-Fusion v8? Smile


Pardon me... but I didn't got your point... hmm?

Sorry for my bad english... Frown

Can I use this plugin as a modification to the PHP-Fusion v8? Suffice it to just slightly modify it Frown
Happy Hunger Games! And may the odds be ever in your favor.
 
http://www.on-deck.eu
spunk
Nice! Very very good work! Good

And yes... the forum_thread_lists_panel is not working.

But otherwise on my Testsite SEO works well, i donīt see any problems...
 
http://www.bdsm-ansichten.com
Ankur
Sprunkas wrote:

P.S Forum threads only displays when you tick box in the panel to display at all pages.
P.S.S Not only last forum threads not displaying at main page.


spunk wrote:

And yes... the forum_thread_lists_panel is not working.


Weird Frown

This is working OK for me.

Please ensure that you have set correct Site Opening Page in Settings --> Main --> Site Opening Page

In SEO Admin Settings, if you have choosen the URL Template as Plain (http://yoursite.com/news), then site opening page should be news
Otherwise, if you have choose the template as HTML (http://yoursite.com/news.html), then site opening page should be news.html Cool
 
http://ankurthakur.in/
spunk
Hmmm Opening Page is: news.html

There is no forum_thread_list_panel Frown

http://dev.spicke...
 
http://www.bdsm-ansichten.com
Ankur
spunk wrote:

Hmmm Opening Page is: news.html

There is no forum_thread_list_panel :|

http://dev.spicke...


Try this Code in replacement in maincore.php : It works for me !

Download source  Code
if (preg_match("/\/(administration)\//", $current_page))
{
   define("TRUE_PHP_SELF", $current_page);
}
else if (preg_match("/".preg_replace("/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $settings['opening_page'])."/", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "$1", $current_page)))
{
   define("TRUE_PHP_SELF", preg_replace("/\/([a-zA-Z0-9_]+)(\.php|\.html)?/", "/$1.html", $current_page));
}
else
{
   define("TRUE_PHP_SELF", $current_page);
}



 
http://ankurthakur.in/
spunk
Ahhh THIS works!

Thank you Ankur! Good

The Code in Post #1 is different...
 
http://www.bdsm-ansichten.com
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Php Fusion BR. Error creating table version translated into Portuguese in Brazil. Installation Issues 2 17-06-2013 05:16
Fusion Defender - (original: : Optional admin password) Roadmap 8 16-06-2013 02:02
Help with Fusion Chat Panels and Infusions 1 12-06-2013 02:46
SEO-Fusion Official releases [Infusions] 130 30-05-2013 16:32
How does the password encryption on php fusion work? User Administration 4 17-05-2013 19:40
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue