By Philippe on Tuesday, 03 October 2017
Posted in Technical Issues
Likes 0
Views 879
Votes 0
Hello,

I have just purchased sh404SEF because I need to adapt the urls of my site (under development).

I made the choice to use EasyDiscuss only through EasySocial Groups (thanks to the EasyDiscuss Group App).
But because EasyDiscuss remains an independent extension of EasySocial, there is an inconsistency of the urls for Google SEO.

Here is the default format of urls :
Url of a EasySocial Group1 : domain.com/groups/group1
Url of a EasyDiscuss Post1 asked from a Group1 : domain.com/forum/post1

And here's what I'd like to have instead :
Url of a EasySocial Group1 : domain.com/groups/group1
Url of a EasyDiscuss Post1 asked from a Group1 : domain.com/groups/group1/forum/post1

To summarize, I would like the EasyDiscuss URLs to automatically include groups and the alias of the corresponding Groups names.

I contacted the support of sh404SEF before you, he answered that StackIdeas would be more able to help me because you already wrote a sh404SEF plugin for EasyDiscuss.

So I have to modify the file you wrote here : components/com_easydiscuss/sef_ext/com_easydiscuss.php

In concrete terms, I know that I must include the alias value of the cluster_id (corresponding to the EasySocial Group name of the EasyDiscuss Post)...

Thank you
Philippe
Yes, this will be possible to append the group alias into discussion URL if you using Sh404sef extension but you have to hack into that file as what you mentioned at above.
·
Tuesday, 03 October 2017 20:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Arlex. I am pleased to learn that it is possible !

Please, could you give me some advices or suggestions of codes ?
Thank you again.

Philippe
·
Tuesday, 03 October 2017 20:45
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome, you can try following code which use to determine whether this current discussion post is under Easysocial group.

[gist type="php"]
// pass in the discussion id into post lib
$post = ED::post($id);

// You can use this method to determine this current discussion post is it posted from Easysocial group
$isClusterPost = $post->isCluster();

// Require this file to load Easysocial lib
require_once JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php';

// Once you define the $post lib, you can use this to retrieve this discussion group id
$cluster = ES::cluster($post->cluster_id);

// Then this will return the group alias for you.
$clusterAlias = $cluster->getAlias();
[/gist]

Hope this will help.
·
Wednesday, 04 October 2017 14:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you very much Arlex for your precious help.
I'm going to try.

Please do not close this post yet.
Philippe
·
Wednesday, 04 October 2017 16:52
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome.
·
Wednesday, 04 October 2017 18:33
·
0 Likes
·
0 Votes
·
0 Comments
·
I have not succeeded yet because it is complex.

But would not it be simpler to directly modify EasyDiscuss files, in order to automatically have : domain.com/groups/groupname/forum/postname ?
To avoid using sh404SEF.

Thank you.
·
Thursday, 05 October 2017 00:31
·
0 Likes
·
0 Votes
·
0 Comments
·
But would not it be simpler to directly modify EasyDiscuss files, in order to automatically have : domain.com/groups/groupname/forum/postname ?
To avoid using sh404SEF.

Currently our extension router doesn't support to work this way because each extension also have their own router structure.

The reason why Sh404sef can work this way is because this extension can allow user to beautify their SEF URL format as long as those non-sef URL stored correctly into Sh404sef section.
·
Thursday, 05 October 2017 13:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Okay I see.

I realize that I am unable to make the changes myself to sef_ext/com_easydiscuss.php.
With CSS I manage a little, but not the php which is too complex.

So I think I will appeal to your customization services.

Thank you Arlex.
·
Thursday, 05 October 2017 20:20
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome Philippe

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Friday, 06 October 2017 10:57
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post