1
rickh
[Tinyevent] block anonymous users from submitting events
  • 2004/10/23 23:48

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


Hello,

By default everyone can submit events with this module (tinyevent), but I don't want anonymous users to do this. Is there a way to block this function for these users? I only want registered and admin users to add events.

I can't find it in the admin panel, so maybe I have to hack something in the code?

2
rickh
Re:[Tinyevent] block anonymous users from submitting events
  • 2004/10/24 18:21

  • rickh

  • Just popping in

  • Posts: 94

  • Since: 2004/4/9 6


ain't there a piece of 'standard' code or something I can use for this purpose?

i.e. something like: "if (user != registered) {exit;}" which I can add above the code of 'tiny event' submit.php ?

3
chapi
Re:[Tinyevent] block anonymous users from submitting events
  • 2004/10/24 19:04

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


You can do the following. Open up xoops_version.php in your TinyEvent modules folder and search for the following part

// Menu
$modversion['hasMain'] = 1;
$modversion['sub'][1]['name'] = _MI_TE_SMNAME1;
$modversion['sub'][1]['url'] = "submit.php";


Edit it, that it looks like this.

// Menu
$modversion['hasMain'] = 1;
if (
is_object($xoopsUser)) {
  
$modversion['sub'][1]['name'] = _MI_TE_SMNAME1;
  
$modversion['sub'][1]['url'] = "submit.php";
}


After that only registered users should see the submit link.

4
dejadingo
Re:[Tinyevent] block anonymous users from submitting events
  • 2004/11/12 22:10

  • dejadingo

  • Just popping in

  • Posts: 71

  • Since: 2004/10/22


But $xoopsUser is not defined at this point.
I can't find exactly where it is defined, and I'm not sure if this is a good place to make it available.

Can this be pulled out separately as a block (or something)and still make it be subordinate to the main tinycontent menu item?

Thanks for your help.

Login

Who's Online

165 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 165


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits