We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

instantiate Session class outside of EE

Development and Programming

Nirada's avatar
Nirada
24 posts
16 years ago
Nirada's avatar Nirada

Greg, I have successfully installed the extension that you posted in this thread and changed the config.php in Imagemanager to be as follows:

$mcImageManagerConfig['SessionAuthenticator.logged_in_key'] = "moxiecode_auth";

However, clicking on the “Browse” button within the “Insert/Edit Image” window in TinyMCE still brings up the username/password box.

Was I also supposed to edit login_session_auth.php ?

       
BackBeat Media's avatar
BackBeat Media
76 posts
16 years ago
BackBeat Media's avatar BackBeat Media

Some tips that helped me for any future readers:

Name this file ext.moxie_code_auth.php

I couldn’t get the username/password box to go away until I changed the $_sess_name variable to ‘isLoggedIn’ (for some reason changing the session key in the imagemanager config file to moxiecode_auth didn’t work for me)

I then had to reinstall imagemanager with these new settings, but I think that was an issue with Safari’s cache, not the settings.

       
Greg Freeman's avatar
Greg Freeman
25 posts
16 years ago
Greg Freeman's avatar Greg Freeman

Please note that this is only a quick and very basic solution and thus there is no configuration in the EE control panel and it is restrictive as far as naming convention goes. If someone wants to make this more user friendly by all means, please do so.

It would be nice if via EE configuration you could assign the upload path per user group.

i.e

/uploads /uploads/editors /uploads/staff

etc, to prevent different staff from interfering with other files they don’t need. I know there are not many details on EE 2.0 yet but I wonder if there is a possibility they will have rich text editing and upload included?

Also this was made a year ago and moxiecode may have changed their config files.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

I never knew where this script came from and have been using it for a couple months with a few modifications: my version adds the Moxiecode scripts to EE Control Panel header on Publish and Edit pages so the Moxie window will always be available to launch (very useful for MD Markitup fields that use Moxicode buttons). See attached pic for the settings.

My modified version also looks out for and plays nice with Leevi Graham’s LG Image Manager and LG File Manager extensions, which also load the Moxie scripts in the Control Panel header (so if you have an entry that has an LG File Manager field and also a field that uses MD Markitup, the scripts shouldn’t get loaded twice).

I had posted the script here: Moxiecode Authentication - but now that I know where this originally came from, I realize I probably shouldn’t have done this, especially seeing as how smallbeer just added this to a repo at Github a couple days ago.

Should I consider my version a branch?

       
LynneL's avatar
LynneL
239 posts
16 years ago
LynneL's avatar LynneL

Ryan, What settings does one put into the FileManager config file? I seem to be able to get past the login screen OK, but get the “example page” when I browse for files. I think I have the path correct in the extension settings (originally I left off the /js/, but putting that in correctly didn’t help…). Currently I have:

// Authenication
    $mcFileManagerConfig['authenticator'] = "SessionAuthenticator";
    $mcFileManagerConfig['authenticator.login_page'] = "";
    $mcFileManagerConfig['authenticator.allow_override'] = "*";

Does something need to go into the login_page parameter in the config file?

Edit: Of course, I’m using your extension…which is why I am directing my question to you. 😊

Edit II: Oh and further config settings on FileManger…

// SessionAuthenticator
    $mcFileManagerConfig['SessionAuthenticator.logged_in_key'] = "isLoggedIn";

–Hopelessly lost as usual.

       
timkelty's avatar
timkelty
177 posts
16 years ago
timkelty's avatar timkelty

@LynneL, You need to change the path from the examples page in index.php:

if (!$type) {
    header('location: pages/fm/index.html');
    die();
}
       
LynneL's avatar
LynneL
239 posts
16 years ago
LynneL's avatar LynneL

Qua? Not sure what you mean…

If I shut off authentication entirely - $mcFileManagerConfig[‘authenticator’] = “”; (which I know is a big no no) I get File Manager no problem. Why would I need to modify the actual FileManager index.php? No one seemed to talk about that up-thread…

       
timkelty's avatar
timkelty
177 posts
16 years ago
timkelty's avatar timkelty

Sorry, I wrote before I totally understood your question.

The reason to edit index.php is if you wanted to access the file manager directly, even outside of ever logging into ee.

Here’s what my login_page is set to:

$mcFileManagerConfig['authenticator.login_page'] = "login_session_auth.php";
       
Eastwood Design's avatar
Eastwood Design
605 posts
16 years ago
Eastwood Design's avatar Eastwood Design

I can’t for the life of me get this to work

I am using Tiny MCE Extension for EE (v.1.0.0) (not the LG version) I have the Moxiecode Authentication (v.0.2.0) extension installed

My path to my filemanager is correct: /tinymce/jscripts/tiny_mce/plugins/filemanager/js/ My session Key is defined: isLoggedIn

In my filemanager my session key is: $mcFileManagerConfig[‘SessionAuthenticator.logged_in_key’] = “isLoggedIn”;

And I still am getting the sample login page when I try to click the filemanager icon in tinymce in the publish text area

You must set a password in the file “login_session_auth.php” inorder to login using this page or reconfigure it the authenticator config options to fit your needs. Consult the Wiki for more details.

What could I possibly be missing?

       
MID's avatar
MID
166 posts
16 years ago
MID's avatar MID

You may have this fixed by now, but it could be a caching thing as mentioned by Stephen earlier - this was driving me mad this morning until I tried restarting Safari.

Handy extension - thanks!

       
smartpill's avatar
smartpill
456 posts
15 years ago
smartpill's avatar smartpill

Is anyone using this with an MSM setup? I need each site to reference different config files, but if I change the path settings for one site, it changes them for all.

       
philfreo's avatar
philfreo
50 posts
15 years ago
philfreo's avatar philfreo

After installing Moxiecode Authentication, I couldn’t figure out why I was still getting the login screen when trying to use the MCImageManager via the LG Image Manager extension.

Then I realized that you have to log out of EE and log back in for the session to get set. Hope that helps someone.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.