SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    printf("<li><a href=\"http://www.pdasquare.com/forum/showthread.php3?threadid=%d\">%s</a></li>", $row[threadid], $row[title], $row[views], $row[replycount]);
    } while ($row = mysql_fetch_array($result));


    hi guys,

    what should i add so that every thread opens a new window using vbulletin forums?

    thanks


  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    target="_blank" in the href tag
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After i edit it

    printf("<a href=\"http://www.pdasquare.com/forum/showthread.php3?threadid=%d\">%s target=\"_blank"</a><br>", $row[threadid], $row[title], $row[views], $row[replycount]);

    there's still some error parsing?

    thanks and have anice day

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That would be the missing escape sign behind the second quote of target="_blank"

    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    printf("<a href=\"http://www.pdasquare.com/forum/showthread.php3?threadid=%d\" target=\"_blank\">%s</a><br>", $row[threadid], $row[title], $row[views], $row[replycount]);



  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BTW by using printf(''); you can avoid the need for those hideous escape signs example:

    printf('<a href="http://www.pdasquare.com/forum/showthread.php3?threadid=%d">%s target="_blank"</a><br>', $row[threadid], $row[title], $row[views], $row[replycount]);


    However it appears you have 4 args and two placeholders so Iwouldn't be surprised if you have another error like mismtach args count or something like that
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •