For instance, I know how to get the user's username by:
$xoopsUser->getVar("uname", "E");
Is there a similar way for me to call the user's groupname?
Thank you!
<script language="javascript">
function nextpage(){
window.location = "'.$url.'";
}
script>
<body onload="setTimeout('nextpage()', 2500)">
$sform -> addElement( new XoopsFormText( 'Favorite TV Show:', 'favoritetvshow', 50, 80, $favoritetvshow) );
$sform -> addElement( new XoopsFormText( 'Favorite TV Show:', 'favoritetvshow', 50, 80, addSlashes($favoritetvshow)) );
<{counter assign="storycount" print=false start=1 skip=1}>
<{foreach item=news from=$block.stories}>
<{if $storycount == 1}><{$news.artimage}><{$news.title}> : <{$news.introtext}>[read more] (<{$news.date}>)
Other new headlines:
<{/if}><{if $storycount > 1}>-<{$news.title}> (<{$news.date}>)
<{/if}>
<{counter}>
<{/foreach}>
Array ( [MAX_FILE_SIZE] => 250000 [partnerlogo] => C:\Documents and Settings\User\My Documents\My Pictures\mylogo.jpg [xoops_upload_file] => Array ( [0] => partnerlogo ) [op] => uppImage [submit] => Upload )
Errors Returned While Uploading
File not found
function imageUpload()
{
$xoopsDB =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
xoops_cp_header();
echo ""
._MD_PARTNERADMIN."";
include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$form = new XoopsThemeForm(_MD_ADDPARTNER, "addform", "index.php");
$op_hidden = new XoopsFormHidden("op", "uppImage");
$submit_button = new XoopsFormButton("", "submit", "Upload", "submit");
$form->addElement($formweight);
//TN removed: $form->addElement($formimage);
//TN trying to add image upload
$form -> addElement( new XoopsFormFile( 'Upload an image', 'partnerlogo', '250000' ), false );
//TN EOF
$form->addElement($op_hidden);
$form->addElement($submit_button);
$form->display();
xoops_cp_footer();
}
function uppImage()
{
$allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png');
$maxfilesize = 50000;
$maxfilewidth = 120;
$maxfileheight = 120;
include_once(XOOPS_ROOT_PATH."/class/uploader.php");
$uploader = new XoopsMediaUploader(XOOPS_ROOT_PATH."/modules/xoopspartners/images/uploads/", $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
if ($uploader->fetchMedia($HTTP_POST_VARS['partnerlogo'])) {
if (!$uploader->upload()) {
echo $uploader->getErrors();
} else {
echo 'File uploaded successfully!
';
echo 'Saved as: ' . $uploader->getSavedFileName() . '
';
echo 'Full path: ' . $uploader->getSavedDestination();
}
} else {
echo $uploader->getErrors();
}
exit();
}