Hi All,
I have got one php script that needs to be integrated with MODX CMS frontend and the admin. I figured that this might be possible using plugins , snippets and chunks but don’t know exactly how?
Please help.
See the site in my sig for some information about how modx works and what snippets, chunks, plugins, and modules do.
If you still have questions, you’ll need to say more about what your code actually does before we can give you much help.
Its a add delete update kind of application which we want to integrate to modx admin. And view part to the front end.
Ex. Adding one more tab adjascent to current results tab.
Could you please help me on how to add a snippet ...and get a visible link on the front end for that snippet.
A snippet is just a piece of PHP code. You create it by going to Resources | Manage Resources | Snippet tab | new snippet. Give it a name and paste in the PHP code.
<?php
$output = "Hello";
$output .= " I'm a snippet.";
return $output;
?>
Put "Hello I’m a snippet" on a page by inserting a snippet call [[YourSnippetName]] where you want the output to appear.
That info is all at the site in my sig. You really should visit.
This is semi-related, I’m using a custom skype-status PHP script that changes my site’s header when we’re online/offline and I have it saved in a snippet called ’skypestatus’. I have it included in my header chunk as [[skypestatus]] but when I try to load my index page I get :
Parse Error
PHP error debug
Error: fopen() [function.fopen]: URL file-access is disabled in the server configuration
Error type/ Nr.: Warning - 2
File: /usr/www/users/lacunza/dev/manager/includes/document.parser.class.inc.php(769) : eval()’d code
Line: 14
Any ideas? Thanks in advance
That looks like a server limitation that does not allow fopen access files on remote locations only local to the server.