Gossamer Forum
Home : Products : DBMan : Customization :

Can these be done?

(Page 2 of 2)
> >
Quote Reply
Re: Can these be done? In reply to
Okay. What I need you to do is to add a line to the beginning of sub html_home. Put this within a print qq statement.

Membership status = -- $fmem --

The log on with a userid that is set at "Full member." (I reset the status of the user "fullmem" back to "Full member.")

You should see

Membership status = -- 1 --

on the home page.

Then log in with the "mem" userid. You should get

Membership status = -- --

Let me know if one or the other of those doesn't work.

I'm sorry about being testy before. I get really frustrated when I can't figure out what's wrong and sometimes I take it out on other people. My apologies.



------------------
JPD





Quote Reply
Re: Can these be done? In reply to
JPDeni,

I've added in the Membership status = -- $fmem -- .

when logging in with "fullmem", it shows a 1,
when logging in with "mem", it shows a 0



Quote Reply
Re: Can these be done? In reply to
That is wonderful news!!!! It works!!! Smile

Now, why isn't it working when you're printing things out? It may be looking at the "0" as a string instead of a number. Hmmmmmmm.

Instead of the

if ($fmem) {

lines, try

if ($fmem eq "1") {



------------------
JPD





Quote Reply
Re: Can these be done? In reply to
i use it on the short display ...

if ($fmem eq "1") {

print "<td><$font><b>Email</b></td></font>";
}

it doesnt appear even login FUll memember or admin
Quote Reply
Re: Can these be done? In reply to
Logging in with mem

!$fmem
unless $fmem
$fmem == 0
$fmem eq "0"

Membership status = -- 0 --

Hi mem, welcome to Web-Friends Profile Database.

Logging in with fullmem

$fmem
$fmem == 1
$fmem eq "1"
Membership status = -- 1 --
Hi fullmem, welcome to Web-Friends Profile Database.



Quote Reply
Re: Can these be done? In reply to
Now I'm really confused. Smile

All of them work on the html_home page, but it appears that none of them work in html_record.

You can take out the debugging lines. They did their job. Smile

Okay. Just to be sure I know what's going on (or at least so I can pretend I do Smile ), when you used

Code:
if ($fmem) {

it showed everything to everybody, even those without "full member" status.

When you used

Code:
if ($fmem eq "1") {

it didn't show those fields to anybody, even those with "full member" status.

Try adding the first debugging line I gave you --

Code:
Membership status = -- $fmem --

right after

Code:
<a href="$long_url">$rec{'LoginID'}</a>

(It'll mess up your table, but it won't be there for long.)

That will let us know if the $fmem is still around when the record is printed.



------------------
JPD





Quote Reply
Re: Can these be done? In reply to
I've mod it, u wanan go and have a look?

http://www.it-g.com/cgi-bin/friendsdb/db.cgi

Quote Reply
Re: Can these be done? In reply to
Okay, then, this means that the problem is not with the $fmem variable, but the way it's being used.

I still think you should be able to use

Code:
if ($fmem) {
print "whatever";
}

I don't know why that isn't working.

Could you put your most recent html.pl file on your site for me to look at? Thanks! Smile


------------------
JPD





Quote Reply
Re: Can these be done? In reply to
Okay. Now we're going to have to do some real searching to figure out how the variable is being interpreted.

Add the following to html_home, but *not* within a print statement:

Code:
if ($fmem) {
print '$fmem<BR>';
}
if (!$fmem) {
print '!$fmem<BR>';
}
unless ($fmem) {
print 'unless $fmem<BR>';
}
if ($fmem == 1) {
print '$fmem == 1<BR>';
}
if ($fmem == 0) {
print '$fmem == 0<BR>';
}
if ($fmem eq "1") {
print '$fmem eq "1"<BR>';
}
if ($fmem eq "0") {
print '$fmem eq "0"<BR>';
}

Log on with both types of memberships and make note of which ones (if any) show up in each case.

These are the only things I know of that can test the variable.

------------------
JPD





Quote Reply
Re: Can these be done? In reply to
no problem.

http://www.it-g.com/htmlpl.txt

Quote Reply
Re: Can these be done? In reply to
I looked over your file and found a couple of html errors. I fixed them and sent you the file. I'll look it over some more to see if I can find anything.


------------------
JPD





Quote Reply
Re: Can these be done? In reply to
Hi carol, wonder if u notice it.

I try this..
if ($fmem) { print qq| abcdefg <a href="mailto:$rec{'E-mail'}">$rec{'E-mail'}</a>|;
}

and when i log in as "mem" nothing is shown. But when i log in as "fullmem" the abcdefg is show, but not the email.

Quote Reply
Re: Can these be done? In reply to
I'm starting to wonder if you might have some problems in the way your .db file is set up. I know it's a pain, but you might try starting again with a blank .db file and adding some records.


------------------
JPD





Quote Reply
Re: Can these be done? In reply to
u mean the default.db?

Quote Reply
Re: Can these be done? In reply to
Yep. I have a suspicion that your fields are off somewhere -- that one or more records has more or less fields than others.


------------------
JPD





Quote Reply
Re: Can these be done? In reply to
I think i will need ur help....

would u wanna take a look at the default.cfg?

www.it-g.com.defaultcfg.txt
Quote Reply
Re: Can these be done? In reply to
ok..I've change it to numer.

i still see the email when logging in with mem.
Quote Reply
Re: Can these be done? In reply to
Did you also make all the other changes? Did you start over with a blank database?


------------------
JPD





Quote Reply
Re: Can these be done? In reply to
I see the following in your .cfg file:

Code:
'LoginID' => [0, 'numer', 0, 255, 0, '', ''],
'Tel' => [9, 'number', 15, 50, 0, '', '' ],

$db_key = 'LoginID';
$db_key_track = 0;

$auth_modify_own = 1,0,0,0;

$auth_user_field = 9;

I'm not sure what you want to do here, but this is definitely incorrect.

If you want the "LoginID" to hold the user id so users can "own" records, you need to set

Code:
'LoginID' => [0, 'alpha', 0, 255, 0, '', ''],
'Tel' => [9, 'numer', 15, 50, 0, '', '' ],

$db_key = 'LoginID';
$db_key_track = 0;

$auth_modify_own = 1;

$auth_user_field = 0;

In your field definitions, you need to change all of the places where you have "number" to "numer."

After you make these changes, start over with a blank database and see if the modifications work.


------------------
JPD





Quote Reply
Re: Can these be done? In reply to
yup..change whatever should be change.

Quote Reply
Re: Can these be done? In reply to
Please add some records to the database now, as well as some user ids which have different permissions. I can't test it until you do.


------------------
JPD





Quote Reply
Re: Can these be done? In reply to
i've add in mem and full

Quote Reply
Re: Can these be done? In reply to
We need to start over from scratch. There's a problem with the full membership permission somewhere.

Take out everything I gave you regarding the full membership modification. And let's start a new thread to discuss this. This one's getting too long.


------------------
JPD





Quote Reply
Re: Can these be done? In reply to
i agree..hehehe
> >