Content Alias not working with CMSMS 1.6.3

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
mfal55
Forum Members
Forum Members
Posts: 131
Joined: Fri Jan 09, 2009 10:00 pm

Content Alias not working with CMSMS 1.6.3

Post 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!
alby

Re: Content Alias not working with CMSMS 1.6.3

Post 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
mfal55
Forum Members
Forum Members
Posts: 131
Joined: Fri Jan 09, 2009 10:00 pm

Re: Content Alias not working with CMSMS 1.6.3

Post 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? 
User avatar
Lew
Forum Members
Forum Members
Posts: 12
Joined: Wed Dec 05, 2007 2:44 pm

Re: Content Alias not working with CMSMS 1.6.3

Post 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
Attachments

[The extension xml has been deactivated and can no longer be displayed.]

mfal55
Forum Members
Forum Members
Posts: 131
Joined: Fri Jan 09, 2009 10:00 pm

Re: Content Alias not working with CMSMS 1.6.3

Post 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.
User avatar
Lew
Forum Members
Forum Members
Posts: 12
Joined: Wed Dec 05, 2007 2:44 pm

Re: Content Alias not working with CMSMS 1.6.3

Post 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
Post Reply

Return to “Modules/Add-Ons”