Hi, yes I have &clearcache=`1` in both snippet calls, I just checked them, also checked without TinyMCE so I could remove & , and I tried both with [! snippetcall !] and [[snippetcall ]].
I didn’t find any other references to this problem though, surely there are other ppl using your method with 0.9.6? So it may just be me...
Anyone knows how one would do to make personal galleries for front-end users? Each user would have their own gallery which they can manage and the other users / public could only browse it. I find the current approach overly complicated and i’m sure MaxiGallery should support such galleries more easily, especially since one of its main features is to "allow webusers/webgroups to manage their own or shared galleries".
I don’t mean to bash on this tutorial at all, it seems like the only complete source of information to date concerning those features and it’s really appreciated.
Thanks guys
You simply need to do a system what will generate new modx documents and the maxigallery call to the document.
The maxigallery call would be generated like this for example:
<?php
return '[[MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`400` &thumb_drop_shadow=`1` &manager_webusers=`'.$_SESSION['webShortname'].'`]]';
?>
That would create a gallery to the document that is editable by the currently logged in user.
You could do it with FDM probably or using eForm with a custom form handler to create the document (with help of docmanager api) and add that maxigallery call to the document content field.
There is no single click solution, but many possible ways to do it quite easily.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Am I the only one with cache-trouble? This issue should not be dependant on php/mysql, right? The server is runing PHP 5.2.1 and MySQL 4.1.13, and I’m using MODx 0.9.6 with MaxiGallery 0.5.2
@doze: wouldn’t the snippet call above allow any logged in user to edit the gallery? So that all logged in users can edit all galleries?
Quote from: tjalve at Aug 17, 2007, 12:21 PM
Am I the only one with cache-trouble? This issue should not be dependant on php/mysql, right? The server is runing PHP 5.2.1 and MySQL 4.1.13, and I’m using MODx 0.9.6 with MaxiGallery 0.5.2
Don’t know why you are having troubles by the documents being cacheable.. some kind of a bug in NewsManager/Editor.. you could try to do it with FDM.
Quote from: tjalve at Aug 17, 2007, 12:21 PM
@doze: wouldn’t the snippet call above allow any logged in user to edit the gallery? So that all logged in users can edit all galleries?
No.. what I mean is that that maxigallery snippet call string would be generated when the new document is created and the result is saved to the document content. Eg. get the other data for the document content from POST (if needed) and run that snippet what returns the maxigallery call string (with $modx->runSnippet()) and then add that string to the document content and save to the database..
Then in the document, the call would be in text string:
[[MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`400` &thumb_drop_shadow=`1` &manager_webusers=`doze`]]
if I were logged in with the web user account "doze" and created the document through that system.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Quote from: doze at Aug 17, 2007, 02:00 AM
You simply need to do a system what will generate new modx documents and the maxigallery call to the document.
The maxigallery call would be generated like this for example:
<?php
return '[[MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`400` &thumb_drop_shadow=`1` &manager_webusers=`'.$_SESSION['webShortname'].'`]]';
?>
That would create a gallery to the document that is editable by the currently logged in user.
@Doze,
I like this idea and am working on a rewrite of this system to streamline it. One problem that I am having right now is that I have two templates, one is my main template, the other is when a user creates a gallery, it automatically creates the document with the second template that has the MaxiGallery call in it. Can this php code automatically be inserted into the new document as it is created someway instead of having a second template using a tv or another method?
You could do it with FDM probably or using eForm with a custom form handler to create the document (with help of docmanager api) and add that maxigallery call to the document content field.
There is no single click solution, but many possible ways to do it quite easily.
You could use the
Docmanager class for example:
<?php
require_once('assets/libs/docmanager/document.class.inc.php');
$doc = new Document($id);
// Set the call to a TV field named "MaxiGallery" (note: needs that "tv" in front of the actual name)
$doc->Set('tvMaxiGallery', '[[MaxiGallery? &display=`embedded` &embedtype=`lightboxv2` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`400` &thumb_drop_shadow=`1` &manager_webusers=`'.$_SESSION['webShortname'].'`]]');
$doc->Save();
?>
You might want to add
this cache clearing function to Docmanager and call it after save.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
@Doze or anyone:
I am working on updating this to work with 0.9.6 and am having an issue.
When I create a gallery and hit the submit button, I keep getting a 404 error page. It is showing this url that it is looking for:
http://www.unionky911.org/85.html
However, when I go to the gallery page, it is showing the "test gallery" that I created, but the url is:
http://www.unionky911.org/gallery/article-test-gallery.html
Is it a FURL’s issue? I’m not sure because I can’t seem to track down what happens once you click on submit to create the gallery and then the redirect isn’t going to the furls version of the page. The test gallery is "85" by the way.
Any help here would definately help me redefine and streamline the system I created earlier.
Thanks!
Hi! Anybody’s here? )
I have a problem with RTE, the same as Anacrusis’s TV problem. Just can’t see TinyMCE editor on "Gallery Creator" page. I use 0.9.6.1p2 and TinyMCE 2.1.2. Well, all requirements seems to be kept.
Thanks for any help.
Is it still possible to have restricted and user contributed galleries?