We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10190
    • 187 Posts
    Quote from: nicpan at Feb 05, 2007, 06:53 PM

    Have you edited the configuration of the module? I forgot to did that the first time... smiley
    In fact, it seems the module seeks a wrong file in a wrong place, it might be a good place to start.

    Hm, which configuration do you mean? I edited the plugin, snippet and module in the manager and changed
    $modpath = $modx->config["base_path"].($mpth ? $mpth:"assets/modules/gallery/");
    to
    $modpath = $modx->config["base_path"].($mpth ? $mpth:"gallery2/");

    But I think this was wrong, because $modpath means not the location of the gallery but the location of the module of Muramoto, so I changed it back to what it was before.

    Now editing the module I see the the tab "configuration", you probably mean that. I think i had "gallery2" instead of "gallery2/", thus the concatenation made it "gallery2embed.php" instead of "gallery2/embed.php", which makes sense in terms of my error message.

    I’m still missing my css and some logos from G2 (header/footer pics), but I think this comes from updating G2 and playing with friendly URLs, which I enabled before (see my answer to Susans post) in the old version of G2.

    So I have to look wether I get FURLs working with Susans patch with G2 2.1.2 as well.

    Thanks for helping!
      • 10190
      • 187 Posts
      Hello,

      I don’t get it running, neither without FURLs or with, so I switched them off for a start.

      My URLs are built wrong, they always have "index.php" inside and look up the manager path:
      http://bischof.homelinux.net/modx/manager/index.php/images/galleryLogo_sm.gif

      Correct URLs would be one of these:
      /var/www/modx/assets/modules/gallery/images/galleryLogo_sm.gif
      /var/www/modx/gallery2/images/galleryLogo_sm.gif

      The same problem is at the user side, if I look up
      http://bischof.homelinux.net/modx/gallery2/
      directly, everything is displayed fine, but if I take it via modx:
      http://bischof.homelinux.net/modx/index.php?id=4
      the paths are wrong (images, css and so on).

      I don’t know how to solve this, any ideas?
      Frisco
        • 21475
        • 80 Posts
        You have to check the word file embedded inside the zip file : you’ll see inside the parameters for the module.
        In fact the plugin and the snippet relies on the module, that defines the path for embedURI, for the gallery, etc.
        So, you don’t have to edit the module code, just fill in the "configuration" tab.

        For your problems of URL, i had the same.
        I think you have these problems when you try to access gallery with the snippet.
        I’ve tweak the embedURI parameter of the snippet, in order to have the correct path.
        I’m still on an issue to have the randomImage block redirecting correctly to the gallery when they click on the image, and the path question is related to the embedURI.

        I’ll tell you if I get more clues, because i have the same problem. For FURs, i’ve seeen something on the codex pages of gallery, I think you can check that wink

        Stay tuned...
          • 20644
          • 37 Posts
          I modified the FURL problem.
          the line of g2cms.base.class.inc.php
          $this->embedUri = $modx->isBackend() ? 'index.php?a=112&id='.$_REQUEST['id'].'&opcode='.$_REQUEST['opcode'] : 'index.php?id='.$modx->documentIdentifier;
          

          change to
          $this->embedUri = $modx->isBackend() ? 'index.php?a=112&id='.$_REQUEST['id'].'&opcode='.$_REQUEST['opcode'] : $modx->makeUrl($modx->documentObject['id'],$modx->documentObject['alias']);
          

          embedded gallery2’s URL is ex . /modx/gallery.html?g2_itemId=36 .
            • 17691
            • 22 Posts
            Hello!

            Very great! I have installed the old module for Gallery 2.0.4 with MODx 0.9.2.2 and this works fine.
            Then i try the Gallery 2.0.4 with the version 0.9.5 and this don’t works. The installation is OK and i also can open the module and i see the 3 topics (Gallery Admin, Export, Import). But when i will open the Admin i only get a blank page huh

            So i try this new module with the Gallery 2.1.2 and MODx version 0.9.5 and its the same thing undecided
            And i also have a problem with the configuration of the module. Whats the correct module configuration string? I try 3 differnt version and sometimes the Gallery Path and the Relative URL to Gallery from CMS variables don’t get save.

            Can anybody help me? Thanks!

            ---- UPDATE POST ----
            Ok! I can solve the problem with the blank page.
            My configuration path is now: &mpth=Module Path;string;assets/modules/gallery/ &g2pth=Path to G2(ex /var/www/html/gallery2/);string;/var/www/html/modx/gallery2/ &g2uri=URL path to G2;string;/gallery2/ &ondel=When deleting;list;Leave Gallery user,Delete Gallery user;Leave Gallery user &admid=Admin User;string;admin

            I also edit the "Path to G2" and "URL path to G2" parameters and now i can see the Admin Interface but without a Login-Link. I only see a blank gallery (because i had anything set up) that belongs the Gallery-Administrator and a Register Link top right. So i think that i’m not logged in huh In my old installation i’m automatic logged in when i open the Gallery Module. huh huh
            -------------

            greetings Lupo
              • 21475
              • 80 Posts
              Have you sync your users?
              Have you provide the user name of the admin? (in the module parameters)

              Cheers
                • 17691
                • 22 Posts
                Hi!

                What do you mean with sync the users? The MODx users? Where or how can i sync users?

                My Gallery admin name is admin. I also set this at the module configuration (&admid=Admin User;string;admin). I hope this is the same and what you will say me? Do the Gallery admin must have the same password as the MODx admin account?

                Thanx! wink

                Lupo
                  • 21475
                  • 80 Posts
                  I don’t think the gallery admin must have the same password, it’s just a question of corresponding usernames.
                  Have you read the .doc file in the archive? the configuration is described.

                  What i have for the configuration :
                  &mpth=Module Path;string;assets/modules/gallery/ &g2pth=G2 path(ex /var/www/html/gallery2/;string;/home/site/public_html/v3/gallery2/ &g2uri=URL path to G2(ex /gallery2/);string;/gallery2/ &ondel=When deleting;list;Leave Gallery user,Delete Gallery user; &admid=Admin User;string;admin

                  but i haven’t touched this. i’ve only fill in the fiels below :
                  Module Path
                  G2 path(ex /var/www/html/gallery2/ )
                  URL path to G2(ex /gallery2/)
                  When deleting
                  Admin User


                  when you fill in the fields, the configuration is automatically completed (in fact, that is what happened for me)

                  So, just fill in those fiels correctly, and then run the module. You should the a page with gallery admin, export users, import users.

                  Tell me if it has worked.
                    • 20644
                    • 37 Posts
                    Hi, lupo1,Nice to meet you!(Sorry,I’m not good at English. I can write better in Japanese :’( )
                    I have same problem that cannot save parameter. in other modules too.
                    I don’t know the reason. I directly entered the parameter,then I could save.
                    And When I used a form value saved by browser,I coudn’t save too. It’s MODx ’ s bug?

                    When Admin page is read, g2cms.admin.inc.php is called.
                    In G2cms.admin.inc.php used only "AdminID" . Password is not used.

                    Hi nicpan
                    Have you sync your users?
                    Sorry,1.1beta1 beta2 have the problem that cannot export users.

                    And I attached the modyfied module 1.1beta3. There are some changes.

                    ChangeLog


                    <The future modyfication and addition>
                    1. When OnWebSaveUser event call, the web user which is registered with MODx is not added on gallery side. (On SMF side being able to add). I want to fix this problem.
                    2. I want to add user to group on gallery side when export and OnWebSaveUser.(Same as SMF module)

                    <From 1.1beta2 to 1.1beta3>
                    1. Change "! $ret->isSuccess" to "$ret".
                    2. Add WebLogin event in plugin(Thanks nicpan!).
                    3. Modified the problem with FriendlyURL by using the makeURL function of MODx.
                    4. Modified the login user check of Snipet.(I added ActiveUserId to init first but I could’nt log out from userpage. so GalleryEmbed:: checkActiveUser furthermore was added.)
                    5. Modified the login user check of g2cms.admin.inc.php(Added AdminId as ActiveId in GalleryEmbed::init ).
                    <From 1.1beta1 to 1.1beta2>
                    1.Change Module version to 1.1.
                    <From 1.0 to 1.1beta1>
                    For Gallery2 2.1.2.
                    1.Change "$ret->isError" to "$ret" .
                    2.Modified GalleryEmbed::init for new API.
                    3.Change "==GalleryStatus:: success ()" to "==null"
                    ( Each function return "null" in new API).


                      • 21475
                      • 80 Posts
                      Hi muramoto smiley

                      Quote from: muramoto at Feb 09, 2007, 05:00 AM

                      I have same problem that cannot save parameter. in other modules too.

                      Strange, because this is working for me? I had no pb with this?

                      Quote from: muramoto at Feb 09, 2007, 05:00 AM

                      When Admin page is read, g2cms.admin.inc.php is called.
                      In G2cms.admin.inc.php used only "AdminID" . Password is not used.
                      I’ve noticed that With the MODx bridge, the modx usernames are passed to the g2_ExternalIdMap table. In the gallery codex, all exemples are with IDs, that was why i had some problems with being logged into gallery.
                      lupo1, Be carreful to pass in the parameters the webusername of the user in MODx that is admin in gallery. They must have the same username.

                      Quote from: muramoto at Feb 09, 2007, 05:00 AM

                      Hi nicpan
                      Have you sync your users?
                      Sorry,1.1beta1 beta2 have the problem that cannot export users.
                      Well in fact you’re right as i think of it, i did comment few lines in the g2cms.export.class.inc.php files, that called function no more supported :
                      				if (!$ret->isSuccess()) $failed_exports[] = $row["username"];
                      

                      So your modification muramoto should have solved the problem grin

                      Thanks for your work and changes smiley
                      I’ll test and give you feedback!
                      If you want some help, no pb.
                      I’ll post here a way to have a working image block (random image, lastest album... to display it anywhere on a modx page) now that users a logged into gallery. Only a pb remain : the embedURI has to be adapt.

                      By the way, your english is pretty good and understable! (in french, mine is not good at all too wink)

                      Have a nice day!