Page 1 of 1

Help re {edit} tag please

Posted: Mon Aug 01, 2005 8:00 am
by marit
As a newcomer i'd first like to compliment you with this very neat cms!

Am testing cmsms on a local install. When using the {edit} tag in my test page or template the link results in a 404 Not Found error
as it points to http://localhost/admin/editcontent.php? ... print=true instead of http://localhost/[b]cmsmadesimple[/b]/admin/editcontent.php? etc. etc.

Part of my config.php reads:
$config['root_url'] = 'http://localhost/cmsmadesimple';
$config['root_path'] = 'c:\\program files\\easyphp1-8\\www\\cmsmadesimple';
and
$config['admin_dir'] = 'admin';

As i have very little PHP knowledge, can you tell me what to change in order to let the {edit) tag point to the right directory i.e. ../cmsmadesimple/admin?

Thanks very much in advance!
Marit

Re: Help re {edit} tag please

Posted: Mon Aug 01, 2005 10:16 am
by Ted
*sigh*

I didn't even realize that was in the code base.  One of the devs must have snuck that in.  It's not even coded right...

Replace plugins/edit.function.php with this file: http://viewsvn.cmsmadesimple.org/viewsv ... p?rev=1855

Thanks!

Re: Help re {edit} tag please

Posted: Mon Aug 01, 2005 11:02 am
by marit
wishy wrote:
Replace plugins/edit.function.php with this file: http://viewsvn.cmsmadesimple.org/viewsv ... p?rev=1855
Wishy thanks for the quick respons - have replaced the file but still have the same problem. Going through your latest function.edit code i noticed:


{
return 'variables['root_url'].'/admin/editcontent.php?content_id='.$gCms->variables['page_id'].'&print=true">';
}
else
{
return 'variables['root_url'].'/admin/editcontent.php?content_id='.$gCms->variables['page_id'].'&print=true">'.$text.'';
}

Would this perhaps make a difference: (again i'm a php novice)

{
return 'config['root_url'].'/admin/editcontent.php?content_id='.$gCms->variables['page_id'].'&print=true">';
}
else
{
return 'config['root_url'].'/admin/editcontent.php?content_id='.$gCms->variables['page_id'].'&print=true">'.$text.'';
}


Thx again in advance!
Marit

Re: Help re {edit} tag please

Posted: Mon Aug 01, 2005 11:51 am
by marit
Wishy fyi: 'config' instead of 'variables' works. Was reluctant to try it cos of my inexperience.

Re: Help re {edit} tag please

Posted: Mon Aug 01, 2005 11:54 am
by Ted
You're right.  I have to stop making code changes at 6 am.

Thanks!