Main menu

Forum


The developer takes a few days off for Summer vacation...
...and will be back with charged battery!

From 14 June to 29 June, 2025 included
During this period,
assistance from developer will not be provided.

NEWS: iCagenda 4.0.0-alpha1 will be available for testing for users with a PRO subscription in July!

× Help Forum English

[VIEWED] url register page

  • Lianne
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 2 mois - il y a 11 ans 2 mois #6888 par Lianne
[VIEWED] url register page a été créé par Lianne
Hi,

I like to change the url of the page where users can register for an event, now (website-url/menu-item/)ID-name-of-the-event/event_registration. I should like more: ..../name-of-the-event/registration (and then registration as string, ready for a language-override) How can I reach this?

Thanks!

Lianne
Dernière édition: il y a 11 ans 2 mois par Lyr!C. Raison: [VIEWED]

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 2 mois #6934 par Lyr!C
Réponse de Lyr!C sur le sujet url register page
Hello,

This could be change in route.php, but to be honnest, it is something since a long time in my todo list, to set it as a translation string, but i've completly forgotten it!

Thank you to remind me this issue!
;-)

Cyril

Latest version : iCagenda 3.9.11
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • hunjoeyjay
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 2 mois #6952 par hunjoeyjay
Réponse de hunjoeyjay sur le sujet url register page
Ok, so i opened route.php

I have looked for the line event_details coz search engines keep downgrading my site as it contains underscores in these URLs...

I have changed it to event-details, so it now doesn't work.

There's something else too that i must change I guess. Could any of you help?

Thanks :)
Joseph

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 2 mois #6961 par Lyr!C
Réponse de Lyr!C sur le sujet url register page
Hello!

Yes, strange behaviour due to Joomla routing.

So, replace the 2 "event_details" by "event:details" and it will return "event-details"...

;-)

Latest version : iCagenda 3.9.11
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 2 mois - il y a 11 ans 2 mois #6963 par Lyr!C
Réponse de Lyr!C sur le sujet url register page
Due to difficulties to use a translation string, i will maybe remove "event_details" from url (as in fact, not really needed!)

If you want, you can test this code for router.php, which will remove "event_details", and will display only alias and id of event.
<?php
/**
 *------------------------------------------------------------------------------
 *  iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x
 *------------------------------------------------------------------------------
 * @package     com_icagenda
 * @copyright   Copyright (c)2012-2014 Cyril Rezé, Jooml!C - All rights reserved
 *
 * @license     GNU General Public License version 3 or later; see LICENSE.txt
 * @author      Cyril Rezé (Lyr!C)
 * @link        http://www.joomlic.com
 *
 * @version     3.3.3 2014-03-31
 * @since       1.0
 *------------------------------------------------------------------------------
*/

// No direct access to this file
defined('_JEXEC') or die();


function iCagendaBuildRoute( &$query )
{
		$segments = array();

		// link event
		if(isset($query['layout']) && $query['layout']=='event')
		{
				// Make sure we have the id and the alias
				if (strpos($query['id'], ':') === false)
				{
						$db = JFactory::getDbo();
						$aquery = $db->setQuery($db->getQuery(true)
							->select('alias')
							->from('#__icagenda_events')
							->where('id='.(int)$query['id'])
						);
						$alias = $db->loadResult();

						$query['id'] = $query['id'].':'.$alias;
						//$query['id'] = $alias;
				}

				$segments[] = $query['id'];
				unset($query['id']);

				unset($query['view']);
				unset($query['layout']);
		}

		// link submit
		if(isset($query['layout']) && $query['layout']=='send')
		{
				$segments[] = $query['id'];
				unset($query['id']);

				$segments[]='sending';
				unset($query['view']);
				unset($query['layout']);
		}

		// link registration
		if(isset($query['layout']) && $query['layout']=='registration')
		{
				// Make sure we have the id and the alias
				if (strpos($query['id'], ':') === false)
				{
						$db = JFactory::getDbo();
						$aquery = $db->setQuery($db->getQuery(true)
							->select('alias')
							->from('#__icagenda_events')
							->where('id='.(int)$query['id'])
						);
						$alias = $db->loadResult();

						$query['id'] = $query['id'].':'.$alias;
						//$query['id'] = $alias;
				}

				$segments[] = $query['id'];
				unset($query['id']);

				$segments[]='event_registration';
				unset($query['view']);
				unset($query['layout']);
		}

		// link search
		if(isset($query['view'])&&$query['view']=='search')
		{
				$segments[]='search';
		}

		// link submit
		if(isset($query['view'])&&$query['view']=='submit')
		{
				$segments[]='submission';
				unset($query['view']);
				unset($query['layout']);
		}

		return $segments;
}

function iCagendaParseRoute( $segments )
{
		$app = JFactory::getApplication();
		$menu = $app->getMenu();
		$item = $menu->getActive();
		$vars = array();

		// Count route segments
		$count = count($segments);

		if (in_array('sending', $segments))
		{
				$vars['option']	= 'com_icagenda';
				$vars['view']	= 'submit';
				$vars['layout']	= 'send';
				$vars['id'] 	= $segments[0];
		}
		elseif (in_array('event_registration', $segments))
		{
				$vars['option']	= 'com_icagenda';
				$vars['view']	= 'list';
				$vars['layout']	= 'registration';
				$vars['id'] 	= $segments[0];
		}
		elseif (in_array('search', $segments))
		{
				$vars['option']	= 'com_icagenda';
				$vars['view']	= 'list';
				$vars['layout']	= 'search';
		}
		elseif (in_array('submission', $segments))
		{
				$vars['option']	= 'com_icagenda';
				$vars['view']	= 'submit';
		}
		else
		{
				$vars['option']	= 'com_icagenda';
				$vars['view']	= 'list';
				$vars['layout']	= 'event';
				$vars['id'] 	= $segments[0];
		}
		return $vars;
}

If you test it, thank you for your feedback ;-)

Cyril

Latest version : iCagenda 3.9.11
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Dernière édition: il y a 11 ans 2 mois par Lyr!C.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 2 mois #6994 par Lyr!C
Réponse de Lyr!C sur le sujet url register page

Hi You have closed the forum so I could not leave a thank you or a comment there (+its in French so I got no clue where to leave the comment)
Thank you very much for the codes!

It works perfectly. It grabs the id and alias of the article and adds event-details at the end

Perfect.
Thank you very much. We have improved 4 scores on google.co.uk already:)


Kind regards,
Joseph J


Hello!

I have not closed the forum, but you was not able to answer only because you was not logged-in ;-)

This will be now added officially. It doesn't break old url (with event_details still working!) and add a better looking SEO!
Nice to hear that yu have already increase you google score! ;-)

Thank you for your testing!
Best Regards,
Cyril

Latest version : iCagenda 3.9.11
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: Lyr!C
Temps de génération de la page : 0.112 secondes

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new