1
chco2
Checking user
  • 2009/8/25 16:00

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


Hi!

I am currently creating a short url mod.
Basically it is a seperate php script that does the job.
For the lack of time, can someone please show me how to checks if a user is registered (he does not have to be logged in!!) and if he belongs to a certain group (e.g. "allowed users" groep).
So the php scripts is called from whereever (perhaps from your own site) and it first checks if the user is registered and belongs to a certain group before it does its magic and returns a short url.

Thanks in advance!

2
chco2
Re: Checking user
  • 2009/8/26 7:14

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


Never mind.. I would have thought some eager programmer would have answered this by now. I'll be diving in it my self now.

3
ghia
Re: Checking user
  • 2009/8/26 9:18

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


If the user is not logged in, how would you know which user it is?

4
chco2
Re: Checking user
  • 2009/8/26 16:31

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


Hi!

That's easy.. you call the script with some parameters.

Charly

5
chco2
Re: Checking user
  • 2009/8/28 8:20

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


The module is actually finished now (first RC). I followed the XOOPS wiki example.
Here's the link.

6
chco2
Re: Checking user
  • 2009/8/28 13:39

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


What I would like to know and I hope some of you mod developers can help me out here is regarding the admin site.
Now looking at the example mod in the wiki it is all very clear in regards to writing the front end mod. Creating an index.php and xoopsversion.php, the language folder and the sql folder. No problems there.
It also notices the has admin flag in he xoops_verion.php, but nothing more.
Can someone please either send me an empty mod including admin area or simply layout what XOOPS needs for the admin area to work?
The admin area will be used to store settings in, that is basically it. Not sure if the settings will be stored in the database or in a file, but that's a later issue.

Anyone?

Thnx,
Charly

7
trabis
Re: Checking user
  • 2009/8/28 13:46

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Kaotic tutorials here:
http://www.kaotik.biz/modules/content/index.php?id=19

You don't have to use jquery but you will find here a good start!

8
chco2
Re: Checking user
  • 2009/8/28 19:14

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


Thanks Trabis, they are of great help!
One question though.. These will let me create my own admin pages. But how do I create preferences pages?

thnx,
Charly

9
trabis
Re: Checking user
  • 2009/8/28 19:57

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Preferences page are handled by the system module. All you to do is populate xoops_version with the configs you need. It should be on those tuts.

10
chco2
Re: Checking user
  • 2009/8/28 20:23

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


ok thanks! Must have missed that. Gonna take another look then!

Login

Who's Online

216 user(s) are online (159 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

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

Latest GitHub Commits