Help re {edit} tag please

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
marit

Help re {edit} tag please

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help re {edit} tag please

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

Re: Help re {edit} tag please

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

Re: Help re {edit} tag please

Post by marit »

Wishy fyi: 'config' instead of 'variables' works. Was reluctant to try it cos of my inexperience.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help re {edit} tag please

Post by Ted »

You're right.  I have to stop making code changes at 6 am.

Thanks!
Locked

Return to “CMSMS Core”