Is anyone familiar with PHPJabbers’ MVC framework? Namely their Member Login script.
I’m wanting to add a new &action (view/template) to the pjFront controller so I can use the framework calls.
I have added the function within the /app/controllers/pjFront.controller.php file named the same as I have the php file I added in the /app/views/pjFront path.
If I visit index.php?controller=pjFront&action={name_of_fuction}, I get output, however, when I use it in a script tag embedded on a page, nothing displays - obviously as it’s not javascript.
I’ve looked at the other pages and noticed that they are wrapped within a document.writeln() javascript function.
Hope I have explained thoroughly. Any guidance will be appreciated.
For context, eg. to display the login page, you’d use: <script type="text/javascript" src="index.php?controller=pjFront&action=pjActionLogin"></script>
You need to format code to have it display correctly, @palsyp. For inline code, place a single backtick ` before and after the code; for a code block, place three backticks on a line above, and three on a line below.
You can also highlight your code and use the </> button in the editor window.
Well, I have sorted it out… I missed a PHP function that wraps the code/html within the javascript’s document.writeln() function when rendering output…