• Home
  • Get help
  • Ask a question
Last post 2 hours 9 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67850
All time tickets 10486
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#97 – sh404SEF and easyblog

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Friday, 17 April 2015 09:55 UTC
ebeltjed
 I bought sh404SEF because I want url's like this: www.sitename/name-of-the-blog

How do I arrange that? I had a Wordpress blog before, and used these url's of the articles. I've imported it to Easyblog and don't want to have this component as homepage but as menu item, named like blog.

Now url's are www.sitename/blog/name-of-blog and I want that all old articles and new blogs automatically use this url: www.sitename/name-of-blog.

The guys from easyblog recommend sh404SEF for this, so how do I configure this? I can't manually change url's of hundreds of blogs.

Please help me!

Thanks :)
Friday, 17 April 2015 11:40 UTC
wb_weeblr
HI

Weird that they sent you to us. SEF URLs are build using small files (called plugins), that tells sh404SEF how to build URLs for each component (Joomla has the same sort of files). EasyBlog comes with an sh404SEF plugin that they wrote, to provide support for sh404SEF, so surely they can advice on modification to do what you want.
I think they do it this way because most people like it.

I run EasyBlog on this site, so I'm familiar with it, though in my case I want to have the /blog/ part, and so I'm fine with their plugin.

You can do a modification of that plugin, if you're familiar with doing such thing.
Looking quicky, I think that commenting out line 89 of the file /components/com_easyblog/sef_ext/com_easyblog.php should do what you want. It should look like this:
$easyblogName	= empty($easyblogName) ?  getMenuTitle($option, $task, $Itemid, null, $shLangName) : $easyblogName;
$easyblogName	= (empty($easyblogName) || $easyblogName == '/') ? 'EasyBlog':$easyblogName;

// $title[] = $easyblogName;  // MODIFY HERE: insert // at the beginning of line

$validViews = array('archive','blogger','categories','dashboard','entry','featured',
                    'images','latest','login','myblog','ratings','search','subscription',
					'tags','teamblog','trackback');

You would need to purge urls in sh404SEF so new ones are recreated.

Please don't do this if you're not familiar with such things. In any case, keep a backup copy of the file, so that you can revert the changes.

Also, be aware that those changes will be lost in case of an update of EasyBLog, which may override this file. You may have to redo the changes again.

As you see this is a complex matter, so maybe you can also setup 301 redirects from old URLs to new ones in your .htaccess? There is however an SEO loss in doing that.


Hope this helps

Rgds
 
Monday, 20 April 2015 10:39 UTC
ebeltjed
You did make someone very happy today :) Thanks a lot it is working for me. I haven't problems with /blog in the url, but I needed this because this this were the url's of the blog before migrating from Wordpress.

Thanks a lot!
Monday, 20 April 2015 11:03 UTC
wb_weeblr
Cool then. Keep in mind the bit about updates. We'll have an sh404SEF today (If I can get to do it), and so you'll have to edit again the file.

Closing this ticket now, feel free to open a new one as needed.

Rgds
 
Monday, 20 April 2015 11:20 UTC
ebeltjed
Thanks, I saved this solution for updates and also shared it on the forum of stackideas.
Monday, 20 April 2015 11:46 UTC
wb_weeblr
ok. I'll try to be in touch with them, ideally, they should maybe use the changes I made to their plugin as a base to update theirs, but now is not the right for me to get into that.

Closing this ticket now, feel free to open a new one as needed.

Rgds
 
Wednesday, 22 April 2015 08:30 UTC
ebeltjed
Thanks, it can be closed indeed.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.