Page 1 of 1

Content Alias not working with CMSMS 1.6.3

Posted: Thu Aug 13, 2009 1:27 pm
by mfal55
Does anyone know if this is in the process of being fixed?  I noticed it was submitted under the Bug Tracker tab.

Nothing displays on the Content Alias module page (Extensions > Content Alias) and Content Alias doesn't appear as an option under the Content drop down on pages.

Thanks!

Re: Content Alias not working with CMSMS 1.6.3

Posted: Thu Aug 13, 2009 2:54 pm
by alby
mfal55 wrote: Does anyone know if this is in the process of being fixed?  I noticed it was submitted under the Bug Tracker tab.

Nothing displays on the Content Alias module page (Extensions > Content Alias) and Content Alias doesn't appear as an option under the Content drop down on pages.
Content Alias is an "content type" and not work in 1.6.X
However you can use "Page Internal" content type (it's a option in drop down)

Alby

Re: Content Alias not working with CMSMS 1.6.3

Posted: Thu Aug 13, 2009 3:02 pm
by mfal55
Hi Alby,
thanks for your reply.  Are you referring to Page Internal Link?  That's not exactly what I'm looking for, but if that's my only option here then OK. 

Does anyone know if there is any plans to make Content Alias usable for 1.6.X? 

Re: Content Alias not working with CMSMS 1.6.3

Posted: Tue Sep 01, 2009 3:03 am
by Lew
I followed the instructions at

   http://forum.cmsmadesimple.org/index.php?topic=35063.0

and made the following changes to  ContentAliases.module.php  (found in Modules/ContentAliases/)

1. Find the SetParameters function, and change it to:

Code: Select all

function SetParameters()
{
    if ($GLOBALS['CMS_VERSION'] < 1.6) 
    {
            if (method_exists($this, 'registercontenttype')) 
            {
                $this->RegisterContentType( 'ContentAlias'
                                          , dirname(__FILE__).DIRECTORY_SEPARATOR.'contenttype.contentalias.php'
                                          , 'Content Alias'
                                          ) ;
            }
      }
}
2.  Insert (usually at the top just before the GetName() function) the following function:

Code: Select all

function ContentAliases() 
{
        $this->CMSModule();
        $this->InstalledModules = array();
        if ($GLOBALS['CMS_VERSION'] >= 1.6) {
            parent::CMSModule();
            $this->RegisterContentType( 'ContentAlias'
                                      , dirname(__FILE__).DIRECTORY_SEPARATOR.'contenttype.contentalias.php'
                                      , 'Content Alias'
                                      ) ;
        }
}    

This worked for me (and I also sent the mods to the author).  The modified XML file is attached to this post.

Good Luck!

Lew

Re: Content Alias not working with CMSMS 1.6.3

Posted: Tue Sep 01, 2009 12:09 pm
by mfal55
Thanks so much Lew!  This is wonderful!

Would you happen to know if they plan to fix/add this to the 1.6X version?  Or will we need to continue to hack as we upgrade or do new installs?

Thanks for your help.

Re: Content Alias not working with CMSMS 1.6.3

Posted: Tue Sep 01, 2009 7:02 pm
by Lew
Glad it worked for you.  [Note:  if you just modified the source yourself, remember that you have to go to Modules page, uninstall the ContentAliases module, then re-install it in order for changes to be picked up.  Took me a few minutes of head-scratching when it kept showing "ModuleName() not defined properly" ...]

I have no idea if/when it will be "officially" updated for v1.6 --- if anyone knows how to officially create/submit mods into the source code repository, feel free to do so.  Personally, I would love to see this content type moved into the core.  I have created very few websites without using Content Alias somewhere.

Lew