1
hightyde
exclude posts from one module in userinfo.php - Solved!
  • 2004/3/5 18:06

  • hightyde

  • Just popping in

  • Posts: 86

  • Since: 2003/7/11


I'm using the myads module and would like to have members remain totally anonymous with respect to ad postings.

(1) When searching from the homepage, I want the search to include postings from the myads modules. I've figured out how to *NOT* display the name of the poster in the results page by commenting out a line in the module's include/search.inc file.

(2) However, I can't figure out how to completely exclude postings from the myads modules on the member profile page (userinfo.php). For example, I want the member profile page to show what the member posted to the forums, weblinks, etc. BUT NOT what s/he posted to the myads module.

Can someone please help me?

2
ackbarr
Re: exclude posts from one module in userinfo.php

try this:

in /modules/myAds/include/search.inc.php change:
if ( $userid != ) {
    
$sql .= " AND usid=".$userid." ";
}

to
if ( $userid != ) {
    [
b]return false;[/b]
}

3
hightyde
Re: exclude posts from one module in userinfo.php
  • 2004/3/5 19:56

  • hightyde

  • Just popping in

  • Posts: 86

  • Since: 2003/7/11


It worked! Thank you, ackbarr. You are a genius!

BTW... what does your code say (I'm trying to learn php).

Again, many thanks!

4
ackbarr
Re: exclude posts from one module in userinfo.php

Not a problem
Quote:

if ( $userid != ) {
    
$sql .= " AND usid=".$userid." ";
}


This means: if $userid holds a value not equal to 0 then append the values " AND usid=", $userid, and " " to the string $sql
Quote:

if ( $userid != ) {
    return 
false;
}

Similar to the first, this says if $userid is not equal to 0 then exit the function, with a value of false.

5
hightyde
Re: exclude posts from one module in userinfo.php
  • 2004/3/5 20:27

  • hightyde

  • Just popping in

  • Posts: 86

  • Since: 2003/7/11


ah, got it! Thanks, ackbarr!

Login

Who's Online

455 user(s) are online (55 user(s) are browsing Support Forums)


Members: 0


Guests: 455


more...

Donat-O-Meter

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

Latest GitHub Commits