Page 1 of 1

Auto-creating categories for FrontendUsers - need the damned function[SOLVED]

Posted: Sat Dec 29, 2007 2:24 pm
by Vin
So yes, I need a little advanced functionality...

Yeah, I read the documentation how to connect the events with certain actions of the modules... however, the way how to get the functions of the module described in the documentation
(

Code: Select all

global $gCms;
  if( !isset( $gCms->modules['TheModuleIWant'] ) || !isset( $gCms->modules['TheModuleIWant']['object'] ) )
    {
       return;
    }
  $themoduleiwant = $gCms->modules['TheModuleIWant']['object'];
  $themoduleiwant->DoThis($somedata);
  $themoduleiwant->DoThat($somemoredata);
in my case changed to:

Code: Select all

global $gCms;
  if( !isset( $gCms->modules['Uploads'] ) || !isset( $gCms->modules['Uploads']['object'] ) )
    {
       return;
    }
  $uploads = $gCms->modules['Uploads']['object'];
  var_dump($uploads);
or

Code: Select all

  print_r($uploads);
)
doesn't work for me. Using the var_dump(), the page to which the user defined tag is applied will not appear at all, whereas using the print_r() function leads to spitting out a great amount of content which contains anything, but certainly nothing looking like a function which I could use.

I looked into the Uploads.module.php, too, and could find some functions for deleting categories, but none for adding.
Do I have to write my own function?
Having searched the forum, I ran into this topic,
but the posted solution looks complicated to me, and I do want to add a category for every frontend user.

Re: Auto-creating categories for FrontendUsers - need the damned function

Posted: Sun Jan 06, 2008 3:41 pm
by Vin
Oh, come on. Anyone?

Re: Auto-creating categories for FrontendUsers - need the damned function

Posted: Tue Jan 15, 2008 4:09 pm
by Vin
Well, I feel like I'm missing something obvious, but I really can't see a way how to accomplish what I want, and I tried... Can't anybody help me?

Re: Auto-creating categories for FrontendUsers - need the damned function

Posted: Tue Jan 15, 2008 4:41 pm
by nivekiam
I looked at the Tips & Tricks topic you linked to and saw this post from Calguy1000:
http://forum.cmsmadesimple.org/index.ph ... l#msg83262

Sounds like what he describes would be what you're looking for.  Though I haven't played with UDT (User Defined Tags) yet and don't know where to start other than searching the forums and documentation.  I remember seeing something on the wiki about UDTs.

Re: Auto-creating categories for FrontendUsers - need the damned function

Posted: Wed Jan 16, 2008 1:33 pm
by Vin
That's what I've been talking about - I followed (or at least tried to follow, I did my best) the documentation, but I just can't see a way how to find the function I need in the supposed UDT. I'd already found the topic you've mentioned - since Calguy said it was possible to autocreate category for every (frontend) user by calling Uploads module, I'm really not very keen on including and modifying the code posted for workaround.

I don't know - either I'm missing something obvious in the documentation, or the documentation isn't very clear in that part. Or maybe both.

Re: Auto-creating categories for FrontendUsers - need the damned function

Posted: Wed Jan 16, 2008 10:12 pm
by nivekiam

Re: Auto-creating categories for FrontendUsers - need the damned function

Posted: Thu Jan 17, 2008 4:09 pm
by Vin
I did. The only thing I need is to figure out what function do I have to put into my UDT for autocreating category in Uploads.

Re: Auto-creating categories for FrontendUsers - need the damned function[SOLVED

Posted: Sat Jan 19, 2008 2:37 pm
by Vin