Skip to Content Skip to Menu

plug-in CB Blogs - changes the alias of the text?

  • warlocksp
  • warlocksp
  • OFFLINE
  • Posts: 28
  • Thanks: 0
  • Karma: 0
6 years 8 months ago - 6 years 8 months ago #302025 by warlocksp
Good afternoon,
Tell me please,

Question:
When a user creates a blog, everything is fine.
After editing, does the alias of the text change?

Example:
When creating it turns out: /blog/###/testirovanie-bloga
Click edit and save , it turns out: /blog/###/testirovanie-bloga-2
Each time it is alternated with "-2" or without it.

That is, "-2" is added to the alias of the text
Last edit: 6 years 8 months ago by warlocksp.

Please Log in or Create an account to join the conversation.

  • warlocksp
  • warlocksp
  • OFFLINE
  • Posts: 28
  • Thanks: 0
  • Karma: 0
6 years 7 months ago #302373 by warlocksp
The answer is:
www.joomlapolis.com/forum/198-cb/238564-plug-in-cb-blogs-changes-alias-text
********************
This block of code in the file "plug_cbblogs\models\joomla25.php":
Code:
while ( $table->load( array( 'alias' => $alias, 'catid' => $article->get( 'catid' ) ) ) ) { $matches = null; if ( preg_match( '#-(\d+)$#', $alias, $matches ) ) { $alias = preg_replace( '#-(\d+)$#', '-' . ( $matches[1] + 1 ). '', $alias ); } else { $alias .= '-2'; } }

Delete:
Code:
else { $alias .= '-2'; }

And there will be happiness.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum