• Home
  • Get help
  • Ask a question
Last post 1 hour 44 min ago
Posts last week 89
Average response time last week 30 min
All time posts 67711
All time tickets 10463
All time avg. posts per day 21

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.

#6071 – article id sprerated in the sef url

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.
Wednesday, 13 November 2019 04:29 UTC
battarov
 hi
1- when trying to enable the add article id to joomla articles vie sh404 config.
the article id not being seperated but attached to the article alias,

as an example:
domain.com/categorey/articeid-articlealias
but I need tge url to generated as the following
domain.com/categorey/articeid/articlealias

how to do so please.

2- I have joomla articles and after installing them , I decide to migrate the articles to easyblog which have the feature to migrate joonla's articles .

so in this case ,
does sh404 generates the redirections from old url to the new one.
Wednesday, 13 November 2019 08:04 UTC
wb_weeblr
Hi

but I need tge url to generated as the following

domain.com/categorey/articeid/articlealias



how to do so please.
That's not possible within sh404SEF. You would need to do some custom PHP coding to achieve that. Not impossible but a bit complicated unless you're a programmer.

does sh404 generates the redirections from old url to the new one.
It won't do that automatically as it has no idea that you installed something or transfered content from one component to another. However, sh404SEF has a very strong redirection tool so it should be possible to do that. It all depends on:

- the number of articles
- the URL structure "before" (ie with Joomla articles)
- the new URL structure (ie with Easyblog)

1 - If the number of articles is small, you can just manually add redirects one by one

2 - The sh404SEF aliases tool lets you create "generic" redirections (documentation is here), for instance you can have things like:

from: /category-1/{*}/{*}.html
to: /blog/easyblog-category-1/{*}-{*}.html

This would redirect for instance, /joom-cat/12/test-article.html to /blog/easy-cat/12-test-article.html. It would also redirect all the URLs that follow the same pattern.

So if you create your Easyblog categories and articles titles exactly the same, you should be able to use only a small number of redirection rules, maybe just one.

Best regards




-
 
Wednesday, 13 November 2019 15:02 UTC
battarov
hi
thanks for your help
That's not possible within sh404SEF. You would need to do some custom PHP coding to achieve that. Not impossible but a bit complicated unless you're a programmer.

please to direct me how to achive that.
I can read php and made samll custumizations in the code if a programer guided me.
thanks
Wednesday, 13 November 2019 15:21 UTC
wb_weeblr
Hi

please to direct me how to achive that.

I can read php and made samll custumizations in the code if a programer guided me.
We cannot do that as part of support, support is only for usage and settings of sh404SEF.

The general rule is as follow:

- create a file: /libraries/weeblr/sh404sef_functions.php
- in that file, paste the following code:

<?php
/**
 * sh404SEF hooks file
 */

defined('_JEXEC') or die();

ShlHook::add(
	'sh404sef_after_plugin_build',
	function ( $string, $vars, $pluginType, $extPluginPath ) {

		if (
			'com_content' == wbArrayGet( $vars, 'option', '' )
			&&
			'article' == wbArrayGet( $vars, 'view', '' )
		) {
			// enter your code here
                       var_dump($string);
                       var_dump($vars);
		}

		return $string;
	}
);


This code allows you to modify the URL as sh404SEF built it. In the area where I marked "//enter your code here" you have variables available:

$string is the SEF URL that sh404SEF built
$vars is an array with the non-sef vars, for instance
$vars['option'] is 'com_content', $vars['view'] is 'article', $vars['id'] is '12', $vars['Itemid'] is '34'

Based on that you can decide to modify the $string SEF URL as you want.

Best regards

 
Wednesday, 13 November 2019 15:33 UTC
battarov
thanks a lot
sorry but still need help
what is the code to add exactly in case this is the url I need to the joomla articles

/menu_alias/custom word/article_id/article_alias

sorry again but I have no experiense to do that without an example.
Wednesday, 13 November 2019 15:45 UTC
wb_weeblr
Hi

what is the code to add exactly in case this is the url I need to the joomla articles
I don't have any example to provide for this as I've never had any such request. Like I said, customizations are not part of support, the URL format you want is definitely not something sh404SEF can do out of the box.

Best regards
 
Thursday, 28 November 2019 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
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.