Error message but no error  Début

  • pnAvatar 1.0
    PN .761
    Followed default instructions.

    Hello,
    I keep getting an "_PNAVATARITEMSPERPAGE" error, even though I put in the number 10 for the items per page. If I leave it blank, I save the configuration with no errors and it defaults to 10. Any ideas?

    Thanks,
    Stretchr

    "It's a small world...
    But I wouldn't want to paint it!"
    Stephen Wright
  • You are right, there is something wrong with the number of items per page in admin. I will study the problem.
  • in the pnadmin.php file change:

    Code

    if (empty($itemsperpage)) {
        $itemsperpage = 10;
    }
    // make sure $itemsperpage is a positive integer
    if (!is_integer($itemsperpage) || $itemsperpage < 1) {
        pnSessionSetVar('errormsg', pnVarPrepForDisplay(_PNAVATARITEMSPERPAGE));
        $itemsperpage = (int)$itemsperpage;
        if ($itemsperpage < 1) {
                $itemsperpage = 25;
        }
    }
    pnModSetVar('pnavatar', 'itemsperpage', $itemsperpage);


    to:

    Code

    if (empty($itemsperpage)) {
        $itemsperpage = 25;
    }
    $itemsperpage = (int)$itemsperpage;
    if ($itemsperpage < 1) {
        $itemsperpage = 25;
    }
    pnModSetVar('pnavatar', 'itemsperpage', $itemsperpage);

  • Hello,
    I knew it was a missing Define but I wasn't sure exactly what the message was supposed to be so that is why I posted the codeed error. I am using English.

    Thank you for the reply.
  • vedrine

    in the pnadmin.php file change:

    Code

    if (empty($itemsperpage)) {
        $itemsperpage = 10;
    }
    // make sure $itemsperpage is a positive integer
    if (!is_integer($itemsperpage) || $itemsperpage < 1) {
        pnSessionSetVar('errormsg', pnVarPrepForDisplay(_PNAVATARITEMSPERPAGE));
        $itemsperpage = (int)$itemsperpage;
        if ($itemsperpage < 1) {
                $itemsperpage = 25;
        }
    }
    pnModSetVar('pnavatar', 'itemsperpage', $itemsperpage);


    to:

    Code

    if (empty($itemsperpage)) {
        $itemsperpage = 25;
    }
    $itemsperpage = (int)$itemsperpage;
    if ($itemsperpage < 1) {
        $itemsperpage = 25;
    }
    pnModSetVar('pnavatar', 'itemsperpage', $itemsperpage);



    Thank you but I tried this code and get a blank page when I go into pnAvatar Administration. I deleted and reinstalled the module with the same result.

    Cheers,
    Stretchr
  • I used exactly the fix I gave above and tested it with no problem.
    You can find a modified and tested pnadmin.php file here
  • Well, your file fixed everything. I'm going to do a diff with the fixed file and the package file because my package was having the problem I wrote about as well as not being able to upload any avatars. Now, after replacing the pnadmin.php file from the original package with the one you supplied, everything is fine. I'll let you know what I find out so that if there is a problem with the package files, you'll be able to address it easily.

    Thank you very much for your help!

    Cheers,
    Stretchr

    "It's a small world...
    But I wouldn't want to paint it!"
    Stephen Wright
  • Verdine,
    I diff'd the module files and also found and fixed a few english missing defines. If you would like it, I have posted the fixed package at

    http://design.web-dj.net/index.php?name=Downloads&req=getit&lid=1

    There were several differences between the pnadmin.php file from the package I got from your site and the pnadmin.php file you posted for me.

    This is a really great module and I appreciate your efforts in its revision as well as your help in getting it functioning for me.

    Cheers,
    Strechr

    "It's a small world...
    But I wouldn't want to paint it!"
    Stephen Wright
  • Yes there are a few differences in the 2 files because I send you the pnavatar 1.01 files.
    pnavatar 1.01 is now available in the Downloads section.
    Good news are also that with Jörg Napp we will merge our 2 projects (his Avatar hosted at the NOC and my pnavatar) because both are based on old EnvoAvatar. I really appreciate to work with Jorg because he is a great PostNuke coder (we already teamed for EZComments in the past and it was a good experience)
    I hope we will build the definite avatar module for PostNuke and we will be able to improve it's integration because we both work on the PostNuke core. Stay tuned.
  • 7 visiteurs

Données pour les 15 dernières minutes