Welcome, Guest. Please Login or Register.
May 01, 2025, 01:54:34 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  How about getting rid of data not used? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: How about getting rid of data not used?  (Read 566 times)
Silver Dragon
Full Member
***
Posts: 157


Uh, Dragons are cool.

ICQ - 1972247webmaster@alphavideo.com WWW
How about getting rid of data not used?
« on: April 13, 2002, 04:22:27 PM »
Reply with quote

If you look at http://www.alphavideo.com/forum/index.php?board=;action=viewprofile;user=Roger+Grisim  you will notice that this user does not have ICQ, Aim, or much else enabled in their profile.  Would it be possible to simply not show the fields when they don't apply?

The reason I ask is that we will be using the Forum profile information as our bios now.  you can see an example at: http://www.alphavideo.com/5.0/DigitalDisplay/about.php  At the bottom of the screen, Roger has a link to his Forum profile.  This way he can edit his own profile and keep *me* out of it!

Yes/No?
Logged

TheJkWhoSaysNi
YaBB God
*****
Posts: 1025


I dont know what to put here, i'll leave it blank.

ICQ - 122821095TheJkWhoSaysNi@evilemail.com WWW
Re:How about getting rid of data not used?
« Reply #1 on: April 13, 2002, 09:18:39 PM »
Reply with quote

you just need to use

if (isset($memsettings['field'])){
Logged

WARNING: THIS POST MAY CONTAIN TRACES OF PEANUT!!!
I'm listening to....
Silver Dragon
Full Member
***
Posts: 157


Uh, Dragons are cool.

ICQ - 1972247webmaster@alphavideo.com WWW
Re:How about getting rid of data not used?
« Reply #2 on: April 13, 2002, 10:29:10 PM »
Reply with quote

Uh, help a newbie out :)

Where would I use that?  

Thank ye
Logged

TheJkWhoSaysNi
YaBB God
*****
Posts: 1025


I dont know what to put here, i'll leave it blank.

ICQ - 122821095TheJkWhoSaysNi@evilemail.com WWW
Re:How about getting rid of data not used?
« Reply #3 on: April 13, 2002, 10:40:26 PM »
Reply with quote

ok

*Disclamer: I have not tested this and cannot guarantee it will work :P

in profile.php search for:
       <td><font size=2><b>$txt[513]:</b></font></td>
        <td><font size=2><a href="$cgi;action=icqpager;UIN=$icq" target=_blank>$memsettings[8]</a></font></td>
</tr><tr>

and replace with

EOT;
if (isset($memsettings['icq'])) {
print <<<EOT
        <td><font size=2><b>$txt[513]:</b></font></td>
        <td><font size=2><a href="$cgi;action=icqpager;UIN=$icq" target=_blank>$memsettings[8]</a></font></td>
</tr><tr>
}
else {
print <<<EOT
<td></td>
</tr><tr>
}

now we need to do the same thing for AIM

search for:
       <td><font size=2><b>$txt[603]: </b></font></td>
        <td><font size=2><a href="aim:goim?screenname=$memsettings[9]&amp;message=Hi.+Are+you+there?">$memsettings[9]</a></font></td>
      </tr><tr>

and replace with:

EOT;
if (isset($memsettings['icq'])) {
print <<<EOT
        <td><font size=2><b>$txt[603]: </b></font></td>
        <td><font size=2><a href="aim:goim?screenname=$memsettings[9]&amp;message=Hi.+Are+you+there?">$memsettings[9]</a></font></td>
      </tr><tr>
}
else {
print <<<EOT
<td></td>
}

then for msn...

search for:
     <td><font size=2><b>MSN: </b></font></td>
        <td><font size=2>$msn</font></td>
      </tr><tr>

and replace with:

EOT;
if (isset($memsettings['icq'])) {
print <<<EOT
      <td><font size=2><b>MSN: </b></font></td>
        <td><font size=2>$msn</font></td>
      </tr><tr>
}
else {
print <<<EOT
<td></td>
}

That should work, if it doesnt, get back to me.
(If i dont respond within a day or 2, IM me because i might not remember to look back here)
« Last Edit: April 13, 2002, 10:42:21 PM by Tom B » Logged

WARNING: THIS POST MAY CONTAIN TRACES OF PEANUT!!!
I'm listening to....
Silver Dragon
Full Member
***
Posts: 157


Uh, Dragons are cool.

ICQ - 1972247webmaster@alphavideo.com WWW
Re:How about getting rid of data not used?
« Reply #4 on: April 14, 2002, 06:01:43 PM »
Reply with quote

Did not work.  

When I try to use this on just the ICQ lines I get the following error:

'Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /Users/mickey/Sites/alphavideo/forum/Sources/Profile.php on line 821

Fatal error: Call to undefined function: viewprofile() in /Users/mickey/Sites/alphavideo/forum/index.php on line 272'
Logged

TheJkWhoSaysNi
YaBB God
*****
Posts: 1025


I dont know what to put here, i'll leave it blank.

ICQ - 122821095TheJkWhoSaysNi@evilemail.com WWW
Re:How about getting rid of data not used?
« Reply #5 on: April 14, 2002, 06:25:28 PM »
Reply with quote

hmm, try putting

print <<<EOT

after the last thing i told you to do (at the end of msn)
Logged

WARNING: THIS POST MAY CONTAIN TRACES OF PEANUT!!!
I'm listening to....
Silver Dragon
Full Member
***
Posts: 157


Uh, Dragons are cool.

ICQ - 1972247webmaster@alphavideo.com WWW
Re:How about getting rid of data not used?
« Reply #6 on: April 14, 2002, 08:54:11 PM »
Reply with quote

Still a no-go.  I am getting the same error message as before.

Here is the modified code:

EOT;
if (isset($memsettings['icq'])) {
print <<<EOT
        <td><font size=2><b>$txt[513]:</b></font></td>
        <td><font size=2><a href="$cgi;action=icqpager;UIN=$icq" target=_blank>$memsettings[8]</a></font></td>
</tr><tr>
}
else {
print <<<EOT
<td></td>
</tr><tr>
}
<td></td>
</tr><tr>
}        EOT;
if (isset($memsettings['icq'])) {
print <<<EOT
        <td><font size=2><b>$txt[603]: </b></font></td>
        <td><font size=2><a href="aim:goim?screenname=$memsettings[9]&amp;message=Hi.+Are+you+there?">$memsettings[9]</a></font></td>
      </tr><tr>
}
else {
print <<<EOT
<td></td>
}

EOT;
if (isset($memsettings['icq'])) {
print <<<EOT
      <td><font size=2><b>MSN: </b></font></td>
        <td><font size=2>$msn</font></td>
      </tr><tr>
}
else {
print <<<EOT
<td></td>
}
print <<<EOT
Logged

John R
PHP Challenged
Global Moderator
Sr. Member
*****
Posts: 387


Click, Click, Click, Bang!

ICQ - 3166233codehammer@thevortex.com
Re:How about getting rid of data not used?
« Reply #7 on: April 15, 2002, 03:04:27 AM »
Reply with quote

Actually, if a user enters the info then it is displayed but if no info is entered then no info is displayed, not even the images.

Then another way arounf the congestion on the left side of the page is to use the display mod which moves that info into a line below the user sig.

cheers..........
Logged

Be careful what you wish for, it might come true!

Note: I do not acknowledge support requests via PM, MSN or ICQ, please use the support boards.
Silver Dragon
Full Member
***
Posts: 157


Uh, Dragons are cool.

ICQ - 1972247webmaster@alphavideo.com WWW
Re:How about getting rid of data not used?
« Reply #8 on: April 15, 2002, 03:18:23 AM »
Reply with quote

That's not what seems to be happening on my board, unless I misunderstand...

If you take a look at http://www.alphavideo.com/forum/index.php?board=;action=viewprofile;user=Roger+Grisim you will see what I am refering to.  This user has no information for AIM, ICQ, MSN, Gender or Location.  Since I would like to use the user profile throughout my site, it would be nice if these elements did not even show up.  Otherwise it just looks wrong.

Thanks
Logged

Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  How about getting rid of data not used? « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.114 seconds with 20 queries.