Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
User Authentication Class
#312798 01/19/2007 3:59 PM
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
Attached is the file. Rename it user_auth.inc.php and throw it in the includes directory of your forums.

Then just require the file and use it as follows
PHP Code
// Usage:

$userob = new user_auth();

// Am I logged in?
if( $userob->is_logged_in ) {
// I am logged in
}

// Am I in group 3?
if( $userob->in_group( 3 ) ) {
// Why, yes we are
}

// Who cares what group I'm in! I wanna know
// if I can read a topic from forum 7
if( $userob->check_access( 7, "read" ) ) {
// Apparently I can
}

// What if I want to know if I'm an administrator
if( $userob->fields['USER_MEMBERSHIP_LEVEL'] == "Administrator" ) {
// That means I'm teh uber user
}

// Want to create a welcome message?
if( $userob->is_logged_in ) {
if(
$userob->is_banned ) {
echo
"Go away, " . $userob->fields['USER_DISPLAY_NAME'];
} else {
echo
"Welcome, " . $userob->fields['USER_DISPLAY_NAME'];
}
} else {
echo
"Please register";
}


Note that $userob->fields is the same as the $user you've been using before, just wanted to not have two different variables hanging around

If you have any problems, it could be due to some paths being off, but the php error will explain that

Attached Files
2389-user_auth.txt (7.45 KB, 184 downloads)
1 member likes this: Gizmo
Sponsored Links
Re: User Authentication Class
Ian Spence #312801 01/19/2007 6:00 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Grazie Ian thumbsup


- Allen wavey
- What Drives You?
Re: User Authentication Class
AllenAyres #312806 01/19/2007 6:59 PM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
Looks awesome :), can't wait to get some time to fiddle hehe


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, I Find Rocks, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Re: User Authentication Class
Ian Spence #312808 01/19/2007 8:03 PM
Joined: Dec 2002
Posts: 67
Power User
Offline
Power User
Joined: Dec 2002
Posts: 67
Hi, thanks for the code! As usual, I'm trying to do something weird with things and have a little prob:

I get this error message:
Fatal error: Cannot instantiate non-existent class: userauth in /home/XXXX/public_html/wiki/extensions/ubbt_auth_mod.php on line 24

I have tow domains set up like this:
www.hairfacts.com
www.hairtell.com (which is actually located at www.hairfacts.com/hairtell)

I'm trying to make people have to be logged into the forum at www.hairtell.com/forum before they can access an editing page at www.hairfacts.com/wiki

I know usually this wouldn't work cross-domain, but since hairtell.com is actually a folder inside hairfacts.com, I thought it might work. It actually includes the files, and recognizes the sql class, but dies on the "userauth" class. I also don't know why it's showing "userauth" in lowercase letters in the error message, since it's declared and called like "UserAuth"

Any thoughts? =)

Re: User Authentication Class
Calpy #312810 01/19/2007 8:29 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I'll bet it's the cross-domain issue.


- Allen wavey
- What Drives You?
Sponsored Links
Re: User Authentication Class
AllenAyres #312812 01/19/2007 8:44 PM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
Yes, the cookies belong to one domain, security won't allow it to run on a seperate domain properly, imo

Last edited by Gizmo; 01/19/2007 8:45 PM.

UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, I Find Rocks, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Re: User Authentication Class
Gizmo #312813 01/19/2007 8:57 PM
Joined: Dec 2002
Posts: 67
Power User
Offline
Power User
Joined: Dec 2002
Posts: 67
The cookies are an issue, definitely. I wonder why it's seeing the UserAuth class as non-existant, though. Its existance wouldn't be tied to a cookie issue...

Re: User Authentication Class
Calpy #312814 01/19/2007 9:05 PM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
As long as the URLs are properly set in the userauth.php file, and the path to said file is proper, it should work :scratches head:


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, I Find Rocks, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Re: User Authentication Class
Gizmo #312816 01/20/2007 12:36 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
$userob = new UserAuth();
appears before line 24 in public_html/wiki/extensions/ubbt_auth_mod.php ?

The error message returning the class name in lowercase is a PHP bug which has been fixed I think in the latest PHP. So I don't think that's your problem.

Re: User Authentication Class
Ian Spence #313532 03/14/2007 9:08 AM
Joined: Feb 2007
Posts: 329
Yarp™
Offline
Yarp™
Joined: Feb 2007
Posts: 329
Originally Posted by Ian Spence
if( $userob->check_access( 7, "read" ) ) {
// Apparently I can

The authentication works like a charm, but I do have troubles with this one.

It worked yesterday evening, and suddenly stopped working. After puzzling around for a while, finally it was fixed by updating the permissions from the control panel.

No changes or anything, just hit the update button.

Edit: It happened again. I commented out the caching check and it seems to work stable now.
Code
		//if( ! $data ) {
$this->build_permissions();
return true;
// }

Last edited by blaaskaak; 03/14/2007 11:34 AM.
Sponsored Links
Re: User Authentication Class
blaaskaak #313890 04/17/2007 11:15 AM
Joined: Feb 2007
Posts: 329
Yarp™
Offline
Yarp™
Joined: Feb 2007
Posts: 329
When a user has a valid cookie file, but that account was deleted, this class also gives an error at line 78.

Code
foreach( $temp as $k => $v ) {

Re: User Authentication Class
blaaskaak #313905 04/19/2007 4:16 PM
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
Updated first post to address all bugs mentioned. Note that the class was renamed to work with a bug in php (it's now user_auth, not UserAuth)

Re: User Authentication Class
Ian Spence #314160 05/21/2007 4:26 PM
Joined: Feb 2007
Posts: 329
Yarp™
Offline
Yarp™
Joined: Feb 2007
Posts: 329
Originally Posted by Ian Spence
Updated first post to address all bugs mentioned. Note that the class was renamed to work with a bug in php (it's now user_auth, not UserAuth)

Thanks for the fixes! I use this one extensively in just about every supporting script I have running here!

Re: User Authentication Class
Ian Spence #315115 08/08/2007 7:13 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
Now here is a surprise !
Its not working for me? It seems that its not picking up on $userob.

File saved and uploaded into forums/includes folder as user_auth.inc.php
Paths updated
New file with simple test code

PHP Code


file test
-auth.php
<?php
include ('forums/includes/user_auth.inc.php');
echo
"test auth <br />";

$userob = new user_auth();

// Am I logged in?
if( $userob->is_logged_in ) {
echo
"you are logged in";
}

?>


Out put only my first test echo of test auth

If i'm logged in or not the result is the same?
ive tried full paths and relative paths frown
If they are wrong i do get the php error so they are correct.
Humm what could be wrong?

Help << i'm stuck.

Aso if i run the file with all of the examples in the first post,
i get this error which made me use the test text.

Quote
$userob = new user_auth();

// Am I logged in?
if( $userob->is_logged_in ) {
// I am logged in
}

// Am I in group 3?
if( $userob->in_group( 3 ) ) {
// Why, yes we are
}

// Who cares what group I'm in! I wanna know
// if I can read a topic from forum 7
if( $userob->check_access( 7, "read" ) ) {
// Apparently I can
}

// What if I want to know if I'm an administrator
if( $userob->fields['USER_MEMBERSHIP_LEVEL'] == "Administrator" ) {
// That means I'm teh uber user
}

// Want to create a welcome message?
if( $userob->is_logged_in ) {
if( $userob->is_banned ) {
echo "Go away, " . $userob->fields['USER_DISPLAY_NAME'];
} else {
echo "Welcome, " . $userob->fields['USER_DISPLAY_NAME'];
}
} else {
echo "Please register";
}


Warning: in_array() [function.in-array]: Wrong datatype for second argument in forums/includes/user_auth.inc.php on line 202

Whats wrong ?

Thanks for any help as always wink


BOOM 7.6.+ rocks....
Re: User Authentication Class
Mark_S #315144 08/10/2007 6:34 AM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
In my best Penelope Pit stop voice

Any one ?
Helllp


BOOM 7.6.+ rocks....
Re: User Authentication Class
Mark_S #315148 08/10/2007 1:36 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
hmmm, it could use some 'or die' statements to show where it's failing, tho I guess if it doesn't print any of them none of them are working.

I would first double-check the path/url posted to the top - some servers want full paths/urls to the include file, not a relative one - this could be why it's not printing any results.


- Allen wavey
- What Drives You?
Re: User Authentication Class
AllenAyres #315151 08/10/2007 2:01 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
PHP Version 5.2.2

im using full paths in all instances wink


ive chopped out the full path in my example

/home/cwcom/domains/xxxxx.co.uk/public_html/forums

include ('/home/xxxxx/domains/xxxxxxxx.co.uk/public_html/forums/includes/user_auth.inc.php');


the 2 paths in the /includes folder are also correct.

require_once( "/home/xxxxx/domains/xxxxxxx.co.uk/public_html/forums/includes/config.inc.php" );
require_once( "/home/xxxxx/domains/xxxxxx.co.uk/public_html/forums/libs/mysql.inc.php" );

Last edited by Mark_S; 08/10/2007 2:02 PM.

BOOM 7.6.+ rocks....
Re: User Authentication Class
Mark_S #315158 08/11/2007 7:09 AM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
any little scripts i can try to start to debug this ?


BOOM 7.6.+ rocks....
Re: User Authentication Class
Mark_S #315161 08/11/2007 8:32 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Good question - Ian may be your only hope, I haven't tried this one but if it works for others it should work for you.


- Allen wavey
- What Drives You?
Re: User Authentication Class
AllenAyres #315165 08/11/2007 8:49 PM
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
OP Offline
Master Hacker
Joined: Jan 2003
Posts: 3,456
Likes: 2
Find:
Code
function UserAuth() {

Replace with:
Code
function user_auth() {

The constructor didn't get renamed when I renamed the class. I can't wait until Threads stops supporting PHP 4.X

Re: User Authentication Class
Ian Spence #315167 08/11/2007 10:46 PM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
Originally Posted by Ian Spence
The constructor didn't get renamed when I renamed the class. I can't wait until Threads stops supporting PHP 4.X
Talked to Rick about that, he said that anything like that would be far off smirk


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, I Find Rocks, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Re: User Authentication Class
Gizmo #315182 08/13/2007 12:20 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Not much after Dec 31, eh? wink


- Allen wavey
- What Drives You?
Re: User Authentication Class
AllenAyres #315230 08/16/2007 3:15 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
Originally Posted by Ian Spence
Find:
Code
function UserAuth() {

Replace with:
Code
function user_auth() {

The constructor didn't get renamed when I renamed the class. I can't wait until Threads stops supporting PHP 4.X


Done but still not working. ??

Snip it from the includes file.
PHP Code


class user_auth {
var
$fields;
var
$is_logged_in;
var
$permissions;
var
$is_banned;
var
$groups;

function
user_auth() {
global
$config, $dbh;

// First, the stupid stuff we do in every constructor




My page is test.php
PHP Code

<?php
include ('/home/xxxxx/domains/xxxxxxxxx/public_html/forums/includes/user_auth.inc.php');

// Want to create a welcome message?
if( $userob->is_logged_in ) { if( $userob->is_banned ) { echo "Go away, " . $userob->fields['USER_DISPLAY_NAME']; } else { echo "Welcome, " . $userob->fields['USER_DISPLAY_NAME']; } } else { echo "Please register<br />"; }
echo
"Script has ran. <br />";
?>


1. I am logged into my forums
2. Output = "Please register"
3. No errors out put ??

I cant understand what's wrong?

Its there a die script i can do for the sql?
To see where its failing??

Thanks for the help and assistance as always. wink


BOOM 7.6.+ rocks....
Re: User Authentication Class
Mark_S #315231 08/16/2007 3:23 PM
Joined: Nov 2003
Posts: 482
Enthusiast
Offline
Enthusiast
Joined: Nov 2003
Posts: 482
$userob = new user_auth();

needs to be there, before you can start using the class.. :2c:

PHP Code



<?php
include ('../libs/forums/includes/user_auth.inc.php');

// Instantiate the user auth class as muhaha, for example
$muhaha = new user_auth(); // w00t, yah baby :rawk:

// Want to create a welcome message?
if( $muhaha->is_logged_in ) {
if(
$muhaha->is_banned ) {
echo
"*cough* be gone, " . $muhaha->fields['USER_DISPLAY_NAME'];
}
else {
echo
"Waaazzaaaap, " . $muhaha->fields['USER_DISPLAY_NAME'];
}
} else { echo
"Please register<br />";
}
echo
"Veni, vidi, vici!! <br />";
?>


of course, use 'userob' for your case. i just kinda like 'muhaha' laugh

Re: User Authentication Class
sirdude #315285 08/19/2007 4:13 AM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
Sweet that works wink

Thanks for getting back smile

looks like i was missing the

$muhaha = new user_auth(); // w00t, yah baby :rawk:
in my protected page wink

Thanks again.
i laughed at the outputs lol


BOOM 7.6.+ rocks....
Re: User Authentication Class
Mark_S #316733 02/19/2008 3:39 PM
Joined: Nov 2003
Posts: 329
Beta Tester
Offline
Beta Tester
Joined: Nov 2003
Posts: 329
Will this work in 7.3 ??


BOOM 7.6.+ rocks....
Chat Profile:Need convert user_name to user_number
Mark_S #316842 04/07/2008 3:31 AM
Joined: Feb 2008
Posts: 11
Newbie
Offline
Newbie
Joined: Feb 2008
Posts: 11
For chat integration, the chat should be able to call up the ubb profile of a user.

This is complicated by the fact that these are not organized by user name but by number.

Can you please post a conversion routine from user name to user number?
Or a routine that outputs the profile but uses user name as input?
Or even better, both of the above?


I post this here in the midst of this thread, as this is intrinsically related to user authentication, and actually a by-product of the user authentication code. Whoever needs user authentication for an external product like a chat could use a user profile link.

And like Mark_S, I am curious if all this will work for 7.3

Thank you


Re: Chat Profile:Need convert user_name to user_number
curiousguy #316843 04/07/2008 11:38 AM
Joined: Feb 2007
Posts: 329
Yarp™
Offline
Yarp™
Joined: Feb 2007
Posts: 329
This works in 7.3, except for the permission reading stuff. That has changed. If you need that, like I do, this script would have to be updated.

A query that gets a username if you only have a number is easy.

Code
select ubbt_USER_DISPLAY_NAME from ubbt_USERS where USER_ID = 50

Re: Chat Profile:Need convert user_name to user_number
blaaskaak #316846 04/08/2008 9:09 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks Yarp! smile


- Allen wavey
- What Drives You?
Re: Chat Profile:Need convert user_name to user_number
blaaskaak #316955 05/12/2008 7:46 AM
Joined: Feb 2007
Posts: 329
Yarp™
Offline
Yarp™
Joined: Feb 2007
Posts: 329
Originally Posted by blaaskaak
This works in 7.3,


FYI: It does *NOT* work. It might have when I tested it a while ago, but it doesn't work anymore now.

Re: User Authentication Class
blaaskaak #316956 05/12/2008 12:43 PM
Joined: Feb 2007
Posts: 329
Yarp™
Offline
Yarp™
Joined: Feb 2007
Posts: 329
Originally Posted by blaaskaak
FYI: It does *NOT* work. It might have when I tested it a while ago, but it doesn't work anymore now.


okay, got it working again. If you are in desperate need for it, pm me, since my fixes are far from neat. I just plunged through it and tried stuff till I got it working.

Also, the forum permissions stuff is all disabled in my fix.

Re: User Authentication Class
Ian Spence #317385 07/08/2008 5:53 AM
Joined: Sep 1999
Posts: 76
Power User
Offline
Power User
Joined: Sep 1999
Posts: 76
PHP Code
// Am I in group 3?
if( $userob->in_group( 3 ) ) {
// Why, yes we are
}

Is anyone out there using the in_group check successfully? I'm running 7.2.2 and it doesn't seem to work for me.

I've got a simple conditional check:

PHP Code
if ($userob->is_logged_in ) {
if (
in_array($userob->fields['USER_ID'], $authors)) {
// Allow specific IDs
$allow = 1;
} elseif (
$userob->in_group(5)) {
// Allow members in Group 5
$allow = 1;
} else {
// Not allowed
$allow = 0;
}
}


which fails, even though a user is part of group id 5. The individual ID check works fine though.

Re: User Authentication Class
Myke #317386 07/08/2008 9:04 AM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
Has anyone gotten this working (at least checking groups) in 7.3? I need something for a project I'm working on...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, I Find Rocks, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Re: User Authentication Class
Gizmo #317387 07/08/2008 5:40 PM
Joined: Feb 2007
Posts: 329
Yarp™
Offline
Yarp™
Joined: Feb 2007
Posts: 329
I've got it working in 7.3, but I did not implement group checking yet. I only need it in one homemade script, and just made a query in that specific script.

PHP Code
$query = "
select count(USER_ID) from ubbt_USER_GROUPS
where USER_ID = ?
and GROUP_ID in (
SELECT GROUP_ID
FROM ubbt_FORUM_PERMISSIONS
WHERE FORUM_ID = ?
AND READ_TOPICS > 0 )
"
;
$sth = $dbh -> do_placeholder_query($query,array($myuserid,$board),__LINE__,__FILE__);
list(
$access) = $dbh->fetch_array($sth);

if (!
$access) {
echo
"SeeYa";exit; }


I am converting most of my scripts to the ubb environment where authentication and group checking is done for me smile

Re: User Authentication Class
blaaskaak #317388 07/08/2008 6:11 PM
Joined: Nov 2003
Posts: 482
Enthusiast
Offline
Enthusiast
Joined: Nov 2003
Posts: 482
as long as you include user.inc.php in your user auth dude, the code would be

PHP Code
$yarp = new user();  // only needs to be done 1 time
if (!$yarp->check_access('forum','READ_TOPICS',$board)) {
echo
'Ciao bella!';
exit;
}
if (
$yarp->check_access('site','CAN_USE_ARCADE')) {
echo
'w00t! and arcade :)';
}


reason for $userobaxx is that $userob is prolly in use for the user_auth dealio smile

so to modify my original post a bit:

PHP Code
include ('../libs/forums/includes/user.inc.php');
include (
'../libs/forums/includes/user_auth.inc.php');

// Instantiate the user auth class as muhaha, for example
$muhaha = new user_auth(); // w00t, yah baby :rawk:
$yarp = new user();

// Want to create a welcome message?
if( $muhaha->is_logged_in ) {
if(
$muhaha->is_banned ) {
echo
"*cough* be gone, " . $muhaha->fields['USER_DISPLAY_NAME'];
}
else {
echo
"Waaazzaaaap, " . $muhaha->fields['USER_DISPLAY_NAME'];
}
} else { echo
"Please register<br />";
}
echo
"Veni, vidi, vici!! <br />";

// New perm crapola goes here smile
if (!$yarp->check_access('forum','READ_TOPICS',$board)) {
echo
'Ciao bella!';
exit;
}
if (
$yarp->check_access('site','CAN_USE_ARCADE')) {
echo
'w00t! and arcade :)';
}
?>


Re: User Authentication Class
Ian Spence #317416 07/17/2008 5:57 PM
Joined: Oct 2004
Posts: 14
User
Offline
User
Joined: Oct 2004
Posts: 14
This shows me all the fields|values under the "fields" array but I cant seem to dump the "groups" array.

foreach ($userob->fields as $key => $value) { print "$key $value
"; }


Last edited by swebs; 07/17/2008 6:24 PM.
Re: User Authentication Class
swebs #317418 07/18/2008 11:50 AM
Joined: Nov 2003
Posts: 482
Enthusiast
Offline
Enthusiast
Joined: Nov 2003
Posts: 482
that's because it's an array, so you'd need a nested for loop for that array wink

Re: User Authentication Class
Ian Spence #317421 07/18/2008 6:19 PM
Joined: Oct 2004
Posts: 14
User
Offline
User
Joined: Oct 2004
Posts: 14
What do we add to this so that we get the site wrapper.

I mean I have what I want working but I would like it all to be placed in the middle section of the site?

Re: User Authentication Class
swebs #317427 07/21/2008 8:54 AM
Joined: Sep 1999
Posts: 76
Power User
Offline
Power User
Joined: Sep 1999
Posts: 76
Originally Posted by swebs
What do we add to this so that we get the site wrapper.

I mean I have what I want working but I would like it all to be placed in the middle section of the site?
Check the sticky thread titled [7.x] Generic Page Outside of forum directory in this forum.

Re: User Authentication Class
Ian Spence #317428 07/21/2008 1:44 PM
Joined: Oct 2004
Posts: 14
User
Offline
User
Joined: Oct 2004
Posts: 14
The problem is that I have a bunch of dynamic pages that call eachother. I would have to create a bunch of wrapper pages.

Is there any way to create 1 file the I can include in my code to add the header and footer of the site?

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,543
Posts293,776
Members13,837
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 328
Topics Created 0
Posts Made 0
Users Online 2
Birthdays 5
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,805
Greg Hard 4,625
Top Posters(30 Days)
isaac 2
Top Likes Received
isaac 39
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Snapshot build 20200802.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.144s Queries: 98 (0.060s) Memory: 3.6785 MB (Peak: 4.1711 MB) Data Comp: Zlib Server Time: 2020-08-06 00:27:02 UTC
Valid HTML 5 and Valid CSS