Jump to content

Nexus Zero

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Nexus Zero's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. At the moment, I'm using the following line of code to making the default text in a text area disappear onclick. The problem is that I want it to disappear only on the first click, rather than have all the user's text disappear on subsequent clicks. onClick="document.Things.ThingBest.value='';" How would I accomplish this?
  2. Mate that's fantastic. I've since applied that syntax to an isset and the code works perfectly. Many, many thanks!
  3. My aim with this code is to prevent multiple votes on a single comment. I'm attempting to do this by adding an arrayed cookie that has a unique entry added each time a user votes. However, when I echo the following code <?php $judgement = $_GET['j']; $commentid = $_GET['cid']; setcookie("cookie[$commentid]", $commentid); ?> I get this error message: Notice: Undefined index: cookie[$commentid] in /home/fhlinux166/t/trivipedia.org/user/htdocs/judge.php on line 46 $commentid is a number, such as 1, 18 etc. Does php have rules against this or am I doing it wrong? Thanks.
  4. That's fantastic, works perfectly and I've learned a little something too Many thanks.
  5. Thanks for the quick reply. Unfortunately, that didn't seem to work either. After the increment, both $insert and $row['Rank'] are 1 (as opposed to 0 before). It's a matter of writing it to the database in the correct way, though I don't see what's going wrong.
  6. This following code snippet successfully takes a specific entry from the "comments" table and dumps it into the $row array. The 'if' statement looks at a $_GET value which, if set to 'up', takes an integer from this array, increases it, and is meant to write it back to the database. While the code does increase this integer (revealed when using echo lines), it doesn't seem to write the number back to the database, or if it does, not in the right place. $result = mysql_query("SELECT * FROM comments WHERE commentsID=$commentsid"); $row = mysql_fetch_array($result); if($judgement=="up") { $insert = $row['Rank']++; mysql_query("INSERT INTO comments ('Rank') VALUES ($insert)"); Any help will be much appreciated!
  7. Hey all. I run a phpBB forum for a Zelda site, and installed a big mod called Photo Album. I've been hacking away at its source code to create something more relevant and more streamlined to its use as a Fan Art gallery. My problems are three-fold. As you can see here: http://www.zeldaelements.net/forums/album_personal_index.php 1) "Fan Art Gallery" columns are not starting a new line after every third entry. 2) The code is only displaying a thumbnail preview from the first retrieved entry, rather than a random one from each user's gallery. 3) The sort functions are broken. You can read the source code here: http://www.zeldaelements.net/forums/album_personal_index.phps And the relevant part of the output template is here: [code]<!-- BEGIN memberrow --> <tr> <!-- BEGIN membercol -->   <td height="28" class="{memberrow.membercol.ROW_CLASS}" align="center"><br><span class="gen"><a href="{memberrow.membercol.U_VIEWGALLERY}" class="gen">{memberrow.membercol.USERNAME}</a></span> (<span class="gensmall">{memberrow.membercol.PICS}</span>)<br><br><a href="{memberrow.membercol.U_VIEWGALLERY}"><img src="{memberrow.membercol.THUMBNAIL}" style="border: 2px solid #000000"></a><br>  <br> &nbsp;  </td>     <!-- END membercol --> </tr> <!-- END memberrow -->[/code] Any help in this matter would be greatly appriciated, because I've wasted loads of time through trial and error and just don't seem to be getting anywhere! [b]Edit:[/b] Would this be better in the Third Party Mods section?
×
×
  • 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.