Jump to content

Johnnnnny1986

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Posts posted by Johnnnnny1986

  1. [quote author=HuggieBear link=topic=113214.msg459910#msg459910 date=1162209410]
    I'm assuming from the code that the column 'pic' in the 'members' table contains either a 1 or a 0 depending on if they have a picture on their profile and the 'piclink' column in the 'profile' table, just contains the location of the image, e.g. http://mydomain.com/image.jpg

    Is this correct?

    Also, does every member have a row in the 'profile' table?

    Regards
    Huggie
    [/quote]

    Yes to all :)
  2. Im having probs gettin a link for a picture from my database to shoow the picture.

    Ithought the coding whould be:
    [code]
    $sqlthing = mysql_query("SELECT * FROM members WHERE username='$username'");
       $pic=(mysql_result($sqlthing,0,"pic"));
    if($pic>0)
    {
    $sqlthing = mysql_query("SELECT * FROM profile WHERE username='$username'");
       $piclink=(mysql_result($sqlthing,0,"piclink"));
    ?>
    <img src="$piclink" alt="My Pic"/><br/>
    <?php
    }
    [/code]
    But that didnt work.
  3. [!--quoteo(post=350207:date=Feb 28 2006, 08:43 AM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Feb 28 2006, 08:43 AM) [snapback]350207[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    well, if you want to replace ALL links in a block of text with that image, i would probably do something like this:
    [code]
    function dieSpammers($String) {
      $find = "|\<a(.+?)\>(.+?)\</a\>|i";
      $replace = "<img src=\"image/hatespammers.gif\" alt=\"(hatespammers)\" />";
      $String = preg_replace($find, $replace, $String);
      return $String;
    }

    echo dieSpammers($myText);
    [/code]
    [/quote]

    Thanks
  4. im trying to get a top pm's sent member list ive got the total pms sent working and the top list working but i cant get the MySQL database to update the number of pms sent my that member ive tried lots of ways and it just gets the total up to 1 can someone help me with the coding for this bit please.

    I thought this would do it but it dosent

    $sqlthing = mysql_query("SELECT * FROM pmssent WHERE '$username'");
    $pmssent=(mysql_result($sqlthing,0,"pmssent"));
    $pmssent=$pmssent+1;

    $query = "update members set pmssent='$pmssent' where username='$username'";
    mysql_query($query);

  5. [!--quoteo(post=350193:date=Feb 28 2006, 08:25 AM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Feb 28 2006, 08:25 AM) [snapback]350193[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    welcome to the forums! i hope you find a great deal of help here as i have. let's back up a step... in your forums, do you allow HTML to be entered? if so, you may just be able to run strip_tags() with a list of exceptions that you want to allow. that way, if you strip out all <a> tags, you'll get rid of all links. if you're not using HTML, if you can explain what text one has to write to produce a link, we can help you come up with a regex or pattern match to find and remove all links from a given set of text.

    good luck!
    [/quote]

    thanks ill have a look at that put could you tell me how i can set the site to become
    src="image/hatespammers.gif" alt="(hatespammers)' please
  6. Ok im having problems stoping site links being posted on my wap site im using php 4 and i can only manage to stop certain links i want to stop all i use this code to stop one link
    $gbvalues=str_replace('http://www.site.co.uk','<img src="image/hatespammers.gif" alt="(hatespammers)',$gbvalues);
    and that replaces the link with my hate spammers icon. But it only stops [a href=\"http://www.site.co.uk\" target=\"_blank\"]http://www.site.co.uk[/a] from being put up in the forums. Please help thanks in advanced
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.