Problems with WEB Site CMS changibg codes

For discussion of the Poker Mavens server module and other administration topics

Re: Problems with WEB Site CMS changibg codes

Postby Kent Briggs » Thu Jan 27, 2011 10:35 pm

fstetson wrote:What file naming protocol are you using for your individual avatars? I am using avatarxx.gif Our source files are literally identical, so it has to be how it is displaying the content, and I also tried swf format with same results (either a red X, or a swf icon)


The built-in avatars are in flash swf format but they are compiled as resources in the program executable. They aren't included as individual files. Are you still referring to your php script? I thought you mentioned that they were just loading slowly.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3763
Joined: Wed Mar 19, 2008 8:47 pm

Re: Problems with WEB Site CMS changibg codes

Postby fstetson » Fri Jan 28, 2011 9:17 pm

This is the awkward remaining part. When using the following the code, I am getting the radio buttons displayed, with a bold Red-X. The actual avatar does not show.

$avatarurl = "http://stetsonmgtsolutions.com/avatar";
$avatarmax = 16;
$avatarswf = false;

The avatars are in a png format and labelled individual as avatar01.png thorugh avatar16.png. Should I be dropping the leading zero on the files <10, or use a different naming convention, such as index1 (or index01) through index16.

I am providing users with a graphical chart to review and select avatars from in the meantime. {Example attached}
Attachments
SMS_avatars.png
SMS_avatars.png (66.03 KiB) Viewed 2218 times
fstetson
 
Posts: 33
Joined: Mon Jan 18, 2010 11:03 pm

Re: Problems with WEB Site CMS changibg codes

Postby Kent Briggs » Fri Jan 28, 2011 9:34 pm

fstetson wrote:The avatars are in a png format and labelled individual as avatar01.png thorugh avatar16.png.


Do your custom avatars show up in the player client if you use the built-in account creator? Do you have "Avatar folder" set to the folder containing those files in the Client Settings group on the System tab in Poker Mavens?
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3763
Joined: Wed Mar 19, 2008 8:47 pm

Re: Problems with WEB Site CMS changibg codes

Postby fstetson » Fri Jan 28, 2011 9:41 pm

Yes, they do show on the client server, and yes they are visible to the users when using 'account settings". I have the originas files being called by the server in the Poker Maven 2 folder on my "C" drive.
fstetson
 
Posts: 33
Joined: Mon Jan 18, 2010 11:03 pm

Re: Problems with WEB Site CMS changibg codes

Postby Kent Briggs » Fri Jan 28, 2011 10:25 pm

Ok, I just tried using a custom communal set and it's not working for me either. Until I figure out where the bug is I have a faster solution for you anyway. Since you are in control of your own images, there's no reason to pull them off of the poker server. Just upload all of your png images into the same folder where your PHP script is running. Make sure they are capitalized and have the leading zero on 1 through 9 like this:

Avatar01.png
Avatar02.png
...
Avatar16.png

Then use this alternative code:

Code: Select all
<html>
<body>
 
  <?php

    $avatarmax = 16;       // number of avatars available

    include "API.php";

    if (isset($_REQUEST["Submit"]))
    {
      $Player = $_REQUEST["Player"];
      $RealName = $_REQUEST["RealName"];
      $Gender = $_REQUEST["Gender"];
      $Location = $_REQUEST["Location"];
      $Password1 = $_REQUEST["Password1"];
      $Password2 = $_REQUEST["Password2"];
      $Email = $_REQUEST["Email"];
      $Avatar = $_REQUEST["Avatar"];
      if ($Password1 <> $Password2) die("Password mismatch. Click Back Button to correct.");
      $params = "Password=$pw&Command=AccountsAdd" .
                "&Player=" .   urlencode($Player) .
                "&RealName=" . urlencode($RealName) .
                "&PW=" .       urlencode($Password1) .
                "&Location=" . urlencode($Location) .
                "&Email=" .    urlencode($Email) .
                "&Avatar=" .   urlencode($Avatar) .
                "&Gender=" .   urlencode($Gender) .
                "&Chat=" .     "Yes" .
                "&Note=" .     urlencode("Account created via API");
      $api = Poker_API($url,$params,true);
      if ($api["Result"] == "Ok") echo "Account successfully created for $Player";
      else echo "Error: " . $api["Error"] . "<br>Click Back Button to correct.";
      exit;
    }
  ?>

  <h3>Create New Account</h3>
  <form method="post">
    <table>
    <tr><td>Your player name:</td><td><input type="text" name="Player" /></td></tr>
    <tr><td>Your real name:</td><td><input type="text" name="RealName" /></td></tr>
    <tr><td>Your gender:</td><td><input type="radio" name="Gender" Value="Male" checked>Male</input> &nbsp;
                 <input type="radio" name="Gender" Value="Female">Female</input></td></tr>
    <tr><td>Your location:</td><td><input type="text" name="Location" /></td></tr>
    <tr><td>Select a password:</td><td><input type="password" name="Password1" /></td></tr>
    <tr><td>Confirm password:</td><td><input type="password" name="Password2" /></td></tr>
    <tr><td>Your email address:</td><td><input type="text" name="Email" /></td></tr>
    <tr><td>Your avatar:</td><td>
    <div style="width: 100px; height: 175px; overflow: auto; border: solid 2px">
      <?php
        for ($i=1; $i<=$avatarmax; $i++)
        {
          $s = "<input type='radio' name='Avatar' value='$i'";
          if ($i == 1) $s .= " checked";
          $s .= ">";
          if ($i < 10) $j = "0" . $i; else $j = $i;
          $s .= "<img src='Avatar" . $j . ".png' align='middle'>";
          echo $s . "<br>\r\n";
        }
      ?>
    </div>
    </td></tr>
    </table>
    <input type="submit" name="Submit" value="Submit" />
  </form>

</body>
</html>
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3763
Joined: Wed Mar 19, 2008 8:47 pm

Re: Problems with WEB Site CMS changibg codes

Postby fstetson » Sat Jan 29, 2011 9:07 am

Temporary solution works great! Mucho Gracias!
fstetson
 
Posts: 33
Joined: Mon Jan 18, 2010 11:03 pm

Previous

Return to Site Administration

Who is online

Users browsing this forum: No registered users and 3 guests

cron