Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
0 + 9 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Xoops Variables question
by Cuidiu on 2006/7/10 22:12:47

[/quote]This thread perhaps.

[quote]Bender wrote:
There was a topic covering usergroups within the last 2 weeks. For the moment i don´t remember who asked/answered but using the search might be adviseable.
Re: Xoops Variables question
by Bender on 2006/7/10 21:44:30

There was a topic covering usergroups within the last 2 weeks. For the moment i don´t remember who asked/answered but using the search might be adviseable.

The topic was especially about the handling of custom XOOPS groups iirc.
Re: Xoops Variables question
by flameshockey on 2006/7/10 20:51:34

I decided to echo those variables and found out the numbers as well, i think i'm going to try and find out what group corrseponds to each number and do:

global $xoopsUser;
if $xoopsUser=#10,
depaul=#10
if $xoopsUser = depaul, SELECT schedule WHERE table=depaul

i think i may try this
Re: Xoops Variables question
by Cuidiu on 2006/7/10 20:44:19

Quote:
what are the names for variables for XOOPS groups


I have wondered this myself. I did discover groups have id numbers assigned to them but could not figure out how to use groupid for separating groups. Then again, I'm not a coder, so that doesn't surprise me.
groupid | name
1 | Webmasters
2 | Registered Users
3 | Anonymous Users
4 | 4th User Group
Re: Xoops Variables question
by flameshockey on 2006/7/10 20:26:49

I tried that, but I am not sure how the function is actually used in the .php file. Here is what I Have:

filename:index.php

// other stuff before here

function viewsched()
{
global $xoopsDB, $xoopsUser;
$groups = $xoopsUser->getGroups();
$table = $xoopsDB->prefix( 'game_schedule' );
$query = $xoopsDB->query( "SELECT * FROM $table WHERE home IN( " . implode( ',', $groups ) . ") ORDER BY date ASC" );
}
-------------------------
This is the old code where each team had their own .php file to view and add games, now I want only one file to do this
// Define query and make sure the right team name is selected!!
//$query = 'SELECT * FROM game_schedule WHERE (home = "Depaul") ORDER BY date ASC';
--------------------------

if ($result = mysql_query($query))
{
while ($row = mysql_fetch_array($result))
{
echo the selected MySQL data in html table
}// end while

}// end if

Who's Online

559 user(s) are online (485 user(s) are browsing Support Forums)


Members: 0


Guests: 559


more...

Donat-O-Meter

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

Latest GitHub Commits