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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Vin

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

Post 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.
Last edited by Vin on Sat Jan 19, 2008 2:36 pm, edited 1 time in total.
Vin

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

Post 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?
nivekiam

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

Post 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.
Vin

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

Post 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.
Vin

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

Post 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.
Post Reply

Return to “CMSMS Core”