1
drummond
Re: Manage User's Group Membership from Edit User
  • 2006/6/7 15:54

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


Yep, I've always had this problem with XOOPS with every version I have ever used. Still doesn't work in 2.0.13.2. And I've tried it on a couple different servers and browsers.

Anyone know how to fix this? Sounds like a system bug to me.



2
drummond
Re: Debaser user upload problem
  • 2005/7/16 2:34

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


I don't know if anyone is still working on this module or not, but I would like to say that it is SWEET! It is exactly what I was looking for! I have run into one snag though...

I have entered in 2 categories--one for Real Audio versions and one for Windows Media versions of songs. I got 2 tracks entered into the 2nd category and then it started telling me that the "File already exists." It tells me that even if the new track is assigned a different, name, album, track, weight, etc. than ANY other file when uploading. But even though it won't add the entry into the database, it does upload the track's file to the server. It is wierd.

Does anyone have an idea of what is going on?

Update:
Well, commenting out:

mpegExist($artist, $title);

in upload.php takes care of that problem.



3
drummond
Can't change link color
  • 2005/7/13 17:19

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


I am trying to get the news title(and list in Recent news block)link color to not be black-on-black in IE. It works as it should in Firefox. I have tried everything I can think of but it won't change! I can't stand it when something this simple isn't working and you can't find what's wrong...maybe a semi-colon is missing somewhere...*pulls hair out*

Here is the link to the page:

http://www.crucialbeats.com/home/modules/news/

Here is my CSS:

body {
    
font-familyVerdanaArialHelveticasans-serif;
    
padding0px;
    
margin0px;
    
color#FFFFFF;
}
{
    
color#6666CC;
    
text-decorationnone;
}
a:hover {
    
color#6666FF;
}
table {
    
font-size12px;
    
width100%;
}
table td {
}

h1 {}
h2 {}
h3 {}
h4 {}
h5 {}
ul margin2pxpadding2px; list-styledecimal insidetext-alignleft;}
li margin-left2px; list-stylesquare inside;}

input.formButton {

}

.
item {
    
color#FFFFFF;
    
font-weightnormal;
}
.
item a {
    
color#6666CC;
    
text-decorationnone;
}
.
item a:hover {
    
color#6666FF;
}
.
itemHead {
    
padding2px;
    
color#FFFFFF;
    
font-weightbold;
    
font-familyArialHelveticasans-serif;
    
font-size14px;
}
.
itemHead a {
    
color#6666CC;
    
text-decorationnone;
}
.
itemHead a:hover {
    
color#6666FF;
}
.
itemInfo {
    
text-alignright;
    
padding3px;
    
color#CCCCCC;
    
font-weightnormal;
    
font-size95%;
    
border-bottom1px dotted #666666;
}
.
itemTitle a {
    
font-variantsmall-caps;
    
background-colortransparent;
    
font-size120%;
    
color#FFFFFF;
}
.
itemPoster {font-size90%; font-style:italic;    color#CCCCCC;}
.itemPostDate {font-size90%; font-style:italic;    color#CCCCCC;}
.itemStats {font-size90%; font-style:italic;    color#CCCCCC;}
.itemBody {
    
font-size90%;
    
text-alignjustify;
    
color#FFFFFF;
}
.
itemText {
    
margin-top5px;
    
margin-bottom5px;
    
line-height1.5em;
    
color#ffffff;
    
font-weightnormal;
    
margin-right5px;
    
margin-left5px;
}
.
itemText:first-letter {font-size133%; font-weightbold;}
.
itemFoot {
    
text-alignright;
    
padding2px 3px 3px;
    
border-top-width1px;
    
border-top-styledotted;
    
border-top-color#666666;
    
font-size95%;
}
.
itemAdminLink {font-size90%;}
.
itemPermaLink {font-size90%;}

th {
    
background-imageurl(wtr.jpg);
    
padding-top2px;
    
padding-right5px;
    
padding-bottom2px;
    
padding-left5px;
    
font-familyArialHelveticasans-serif;
    
font-size12px;
    
font-weightbold;
    
color#FFFFFF;
    
letter-spacing.6pt;
}

td#headerbanner {}
td#headerbar {}


td#centercolumn {font-size: 12px;}

td#centercolumn th {
    
vertical-alignmiddle;
    
background-imageurl(sideback2.png);
    
border1px solid #CCCCCC;
    
font-size12px;
    
font-weightnormal;
}
td#centerCcolumn {padding: 0px 3px 1px 3px;}
td#centerCcolumn legend.blockTitle {
    
padding1px;
    
color#639ACE;
    
font-weightbold;
    
margin-top0px;
    
margin-right0px;
    
margin-left0px;
    
background-color#000099;
}
td#centerCcolumn div.blockContent {
    
padding1px;
    
margin-right0px;
    
margin-left0px;
    
margin-bottom2px;
    
line-height120%;
}

td#centerLcolumn {width: 50%; padding: 0px 3px 0px 0px;}
td#centerLcolumn legend.blockTitle {padding: 3px; color: #639ACE; font-weight: bold; margin-top: 0px;}
td#centerLcolumn div.blockContent {border-left: 1px solid #F8F7F1; border-right: 1px solid #F8F7F1; border-bottom: 1px solid #dddddd; padding: 3px; margin-left: 3px; margin-right: 2px; margin-bottom: 2px; line-height: 120%;}

td#centerRcolumn {width: 50%; padding: 0px 3px 0px 0px;}
td#centerRcolumn legend.blockTitle {padding: 3px; color: #639ACE; font-weight: bold; margin-top: 0px;}
td#centerRcolumn div.blockContent {border-left: 1px solid #F8F7F1; border-right: 1px solid #F8F7F1; border-bottom: 1px solid #dddddd; padding: 3px; margin-left: 2px; margin-right: 3px; margin-bottom: 2px; line-height: 120%;}

div#content {
    
text-alignleft;
    
width100%;
}

tr#footerbar {}

td#mainmenu a {
    
color#C49730;
    
text-decorationnone;
    
padding-top3px;
    
padding-bottom3px;
    
padding-left1px;
    
font-familyArialHelveticasans-serif;
        
font-weightbold;

}
td#mainmenu a:hover {
    
color#FFFFFF;
    
border1px solid #666666;
    
background-color#787FB5;
    
padding-top2px;
    
padding-bottom2px;
        
font-weightbold;


}
td#mainmenu a.menuTop {
    
padding-left10px;
}
td#mainmenu a.menuMain {
    
padding-left10px;
}
td#mainmenu a.menuSub {
    
padding-left15px;
}

td#usermenu a {
    
color#FFFFFF;
    
text-decorationnone;
    
padding-top3px;
    
padding-bottom3px;
    
padding-left11px;
    
font-familyArialHelveticasans-serif;
        
font-weightbold;

}
td#usermenu a:hover {
    
color#FFFFFF;
    
padding-top2px;
    
padding-bottom2px;
    
padding-left10px;
    
background-color#787FB5;
    
border1px solid #666666;
        
font-weightbold;

}
td#usermenu a.menuTop {
}
td#usermenu a.highlight {
    
padding-top2px;
    
padding-bottom2px;
    
padding-left10px;
}

.
outer {
    
background-color#333333;
    
vertical-aligntop;
    
text-alignleft;

}
.
head {
    
font-familyArialHelveticasans-serif;
    
font-weightbold;
    
padding2px 5px;
    
background-color#828282;
    
letter-spacing.6pt;
    
color#FFFFFF;

}
.
even {
    
padding3px;
    
background-imageurl(newsmid2.gif);
    
vertical-aligntop;
    
text-alignleft;
    
color#FFFFFF;

}
.
odd {
    
padding3px;
    
background-imageurl(newsmid.gif);
    
vertical-aligntop;
    
text-alignleft;
    
color#FFFFFF;
}
.
foot {
    
padding3px;
    
font-size80%;
    
background-imageurl(wtr.jpg);

}
tr.even td {
    
background-color#585858;
    
vertical-aligntop;
    
text-alignleft;
        
background-imageurl(newsmid2.gif);

}
tr.odd td {
    
vertical-aligntop;
    
text-alignleft;
    
background-imageurl(newsmid.gif);


}

div.errorMsg background-color#FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px;}
div.confirmMsg background-color#DDFFDF; color: #136C99; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px;}
div.resultMsg background-color #F8F7F1; color: #333333; text-align: center; border-top: 1px solid silver; border-left: 1px solid silver; font-weight: bold; border-right: 1px solid #666666; border-bottom: 1px solid #666666; padding: 10px;}

div.xoopsCode background#FFFFFF; border: 1px inset #000080; font-family: "Courier New",Courier,monospace; padding: 0px 6px 6px 6px;}
div.xoopsQuote background#FFFFFF; border: 1px inset #000080; font-family: "Courier New",Courier,monospace; padding: 0px 6px 6px 6px;}


.comTitle {
    
margin-bottom2px;
    
color#FFFFFF;
}
.
comText {padding2px;}
.
comUserStat {font-size10pxcolor#000099; font-weight:bold; border: 1px solid silver; background-color: #ffffff; margin: 2px; padding: 2px;}
.comUserStatCaption {font-weightnormal;}
.
comUserStatus {margin-left2pxmargin-top10pxcolor#000099; font-weight:bold; font-size: 10px;}
.comUserRank {margin2px;}
.
comUserRankText {font-size10px;font-weight:bold;}
.
comUserRankImg {border0;}
.
comUserName {
    
color#FFFFFF;
}
.
comUserImg {margin2px;}
.
comDate {font-weightnormalfont-styleitalicfont-sizesmaller}
.
comDateCaption {font-weightboldfont-stylenormal;}
.
mainbody {
    
padding10px;
    
color#FFFFFF;
    
}
.
mainbody a {
    
padding10px;
    
color#6666CC;
    
}
.
mainbody a:hover {
    
padding10px;
    
color#6666FF;
    
}        
    
.
btable {

}
.
btableouter {
    
width770px;
}
.
sidetable {
    
width100%;
    
margin0px;
    
border-right-width1px;
    
border-right-stylesolid;
    
border-right-color#333333;
}
.
sidemid {
    
width100%;
    
padding5px;
}
.
sidebot {
    
width100%;
    
padding0px;

}
.
sidetop {
    
padding2px 0px 2px 10px;
    
font-familyArialHelveticasans-serif;
    
font-size12px;
    
font-weightbold;
    
border-top-width1px;
    
border-top-stylesolid;
    
border-top-color#333333;
    
background-imageurl(wtr.jpg);
    
border-left-width1px;
    
border-right-stylesolid;
    
border-left-stylesolid;
    
border-right-color#000000;
    
border-right-width1px;
    
border-left-color#333333;
    
letter-spacing0.8pt;
}
.
newstable {
    
padding0px;
    
border1px solid #333333;
    
margin0px;
    
background-imageurl(newsmid.gif);
    
color#FFFFFF;
}
.
newstop {
    
padding2px 3px 2px 10px;
    
font-familyArialHelveticasans-serif;
    
font-size12px;
    
color#FFFFFF;
    
font-weightbold;
    
border-bottom1px solid #666666;
    
background-imageurl(wtr.jpg);
    
letter-spacing.6pt;
}
.
newsmid {
    
padding3px 10px;
    
text-alignjustify;    
    
color#FFFFFF;
}
.
newsmid a {
    
padding3px 10px;
    
text-alignjustify;    
    
color#FFFFFF;
}
.
newslrtable {
    
padding0px;
}
.
newstd {
}
.
newstablemain {
    
border1px solid #333333;
}
.
sidepanel {
    
height93px;
}
.
srchinput {
    
font-familyArialHelveticasans-serif;
    
font-size10px;
    
background-color#333333;
    
border1px solid #666666;
    
padding1px;
    
color#FFFFFF;
}
.
tdfooter {
    
font-size10px;
}
.
footertext {
    
font-size10px;
    
color#FFFFFF;
}
.
topnav {
    
font-size90%;

}
title {
}
.
notifications {
    
margin0px;
    
padding0px;
    
width98%;
}
.
comments {
    
padding0px;
    
width98%;
    
background-color#666666;

}
input {
    
font-size11pt;

}
.
srchbutton {
    
border0px none;
}
.
sidetd {
    
border-bottom-width1px;
    
border-bottom-stylesolid;
    
border-bottom-color#666666;
}




And here's my theme.html code:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<meta name="robots" content="<{$xoops_meta_robots}>" />
<meta name="Keywords" content="<{$xoops_meta_keywords}>" />
<meta name="Description" content="<{$xoops_meta_description}>" />
<meta name="rating" content="<{$xoops_meta_rating}>" />
<meta name="author" content="<{$xoops_meta_author}>" />
<meta name="copyright" content="<{$xoops_meta_copyright}>" />
<meta name="generator" content="XOOPS" />
<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#333366" alink="#6699FF" link="#FFFFFF" vlink="#CCCCCC" leftmargin="0" topmargin="0">
<{$xoops_module_header}> 
<script type="text/javascript">
<!--
<{$xoops_js}>
//-->
</script>
<a name="top" id="top"></a>
<table width="777" height="100%" border="0" cellpadding="0" cellspacing="0" class="btableouter">
<tr> 
<td width="766" valign="top" bgcolor="#000000"><table width="766" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" class="btable">
        <tr> 
          <td width="203" rowspan="2" valign="top" background="<{$xoops_imageurl}>left_bg.jpg"><img src="<{$xoops_imageurl}>logo.jpg" alt="Crucial" width="203" height="157" />
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td valign="top"> <{foreach item=block from=$xoops_lblocks}> <{include 
                  file="sev_ventti/theme_blockleft.html"}> <{/foreach}> </td>
              </tr>
              <tr> 
                <td valign="top"> <{foreach item=block from=$xoops_rblocks}> <{include 
                  file="sev_ventti/theme_blockright.html"}> <{/foreach}> </td>
              </tr>
          </table></td>
          <td width="560"><table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000">
            <tr>
              <td align="right" valign="middle"><{$xoops_banner}></td>
              <td align="right" valign="middle"><form style="margin-bottom: 0px; margin-top: 0px;" action="<{$xoops_url}>/search.php" method="post">
                  <input class="srchinput" name="query" type="text" size="15" />
                  <input type="hidden" name="action" value="results" />
                  <input name="Submit" type="image" value="Search" src="<{$xoops_imageurl}>srchbut.gif" alt="Search" align="middle" width="50" height="22" />
              </form></td>
            </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td class="mainbody" valign="top" bgcolor="#000000" background="<{$xoops_imageurl}>bg.jpg"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="100%" valign="top">
<{$xoops_contents}>
<div align="center"><table border="0" cellspacing="0" cellpadding="3">
  <tr>
    <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="245" height="145" title="Current Album">
      <param name="movie" value="/home/media/album.swf" />
      <param name="quality" value="high" />
      <embed src="/home/media/album.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="245" height="145"></embed>
    </object></td>
    <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="245" height="145" title="Specials">
      <param name="movie" value="/home/media/specials.swf" />
      <param name="quality" value="high" />
      <embed src="/home/media/specials.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="245" height="145"></embed>
    </object></td>
  </tr>
</table></div></td>
            </tr>
          </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td colspan="3"> <{if $xoops_showcblock == 1}> <{foreach item=block from=$xoops_ccblocks}> <table cellspacing="0" class="newstable">
                      <tbody>
                        <tr> 
                          <td class="newstop"><{$block.title}></td>
                        </tr>
                        <tr> 
                          <td class="newsmid"> <{$block.content}> </td>
                        </tr>
                        <tr> </tr>
                      </tbody>
                    </table>
                    <br /> <{/foreach}> </td>
                </tr>
                <tr> 
                  <td width="49%" valign="top" class="newstd" > <{foreach item=block 
                    from=$xoops_clblocks}> <table cellspacing="0" class="newstable">
                      <tbody>
                        <tr> 
                          <td class="newstop"><{$block.title}></td>
                        </tr>
                        <tr> 
                          <td class="newsmid"><{$block.content}> </td>
                        </tr>
                        <tr> 
                          <td class="newsbot"></td>
                        </tr>
                      </tbody>
                    </table>
                    <br /> <{/foreach}></td>
                  <td width="2%" valign="top" >&nbsp;</td>
                  <td width="49%" valign="top" class="newstd"><{foreach item=block 
                    from=$xoops_crblocks}> <table cellspacing="0" class="newstable">
                      <tbody>
                        <tr> 
                          <td class="newstop"><{$block.title}></td>
                        </tr>
                        <tr> 
                          <td class="newsmid"> <{$block.content}> </td>
                        </tr>
                        <tr> 
                          <td class="newsbot"></td>
                        </tr>
                      </tbody>
                    </table>
                    <br /> <{/foreach}></td>
                </tr>
            </table>
             <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td height="100%" valign="top"><{/if}></td>
                </tr>
            </table>
          </td></tr>
        <tr>
          <td width="203" valign="top" background="<{$xoops_imageurl}>wtr.jpg">&nbsp;</td>
          <td height="20" align="center" valign="middle" background="<{$xoops_imageurl}>wtr.jpg" bgcolor="#000000" class="tdfooter"><a href="#top">[TOP] 
            </a>
<!-- start of my buttons 
            <table border="0" cellpadding="10" cellspacing="0">
              <tr> 
                <td width="25%">&nbsp;</td>
                <td width="25%" align="center"><a href="http://www.scds.com.au/"><img src="http://www.scds.com.au/images/scdsani2.gif" alt="SCDS XOOPS Themes" border="0" /></a><br />
                </td>
                <td width="25%" align="center"><a href="https://xoops.org" target="_blank"><img src="http://www.scds.com.au/images/xoopsbut3.gif" alt="This site is powered by XOOPS" border="0" /></a></td>
                <td width="25%" align="left">&nbsp;</td>
              </tr>
            </table> 
            End of my buttons -->
            <br />
          </td>
        </tr>
    </table> </td>
<td width="11" background="<{$xoops_imageurl}>shadow.jpg"><img src="<{$xoops_imageurl}>shadow.jpg" width="11" height="35" /></td>
</tr>
<tr>
<td valign="top" class="tdfooter"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="<{$xoops_imageurl}>footer.jpg">
<tr>
<td width="204" height="20" bgcolor="#000000">&nbsp;</td>
<td align="center" bgcolor="#000000" class="footertext"><{$xoops_footer}></td>
</tr>
</table></td>
<td background="<{$xoops_imageurl}>shadow.jpg"></td>
</tr>
</table>
</body>
</html>



4
drummond
Re: Hiring programmer to customize Xoops modules
  • 2005/7/1 3:25

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


Thanks, Yeah I didn't plan on posting the projects here, just seeing if it was okay to use these forums for that purpose. I will check into the Mod Request forum later to post the stuff I need done.



5
drummond
Hiring programmer to customize Xoops modules
  • 2005/7/1 1:19

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


I run a design company and I am looking to hire someone on a contract "project-by-project" basis to customize XOOPS modules and create new modules for clients. Can anyone tell me a good place to find XOOPS programmers. Is there a place on this site that I can post projects and have people contact me about pricing?

Thank you!



6
drummond
Re: Can't change 'Xoopsgallery's Album Permissions' as admin
  • 2005/6/29 22:45

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


I am also getting this error when clicking on an image's properties:

Error 127 getting EXIF data

I deleted everything on the exe path config in the admin section, but it keeps coming up.

How to I keep this error message from appearing?



7
drummond
Member Homepages Module Help
  • 2005/6/27 16:13

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


I have a school as a client and they have been looking for exactly what the "Member Homepages" option provides. When I installed it, I ran into several errors, but I know this module is still in development. Since it looks like it hasn't been worked on in a while I have two problems that I just can't figure out. And I am not a "trained" programmer by any means, so forgive any "dumb" questions

PROBLEM #1:
The images block always causes the page with that block on it to report this error:
Notice [PHP]: Undefined index: fieldid in file modules/homepages/class/blocktypes/image.php line 215

It might have something to do with me not adding any images to the block yet. But that function doesn't work either. When I go to the edit page for an image block the Image manager button doesn't do anything. When I put in a URL to an image in there, the page with the image block on it appears blank with no error.


Here is the code for that file:
<?
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <https://xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
//  Original Author:  Mithrandir                                             //

/**
 * ImageBlock class
 *
 * @package modules
 * @subpackage Homepage
 */

class ImageBlock extends HomepageBlock {
    
    function 
ImageBlock() {
        
$this->HomepageBlock();
        
$this->assignVar('template''hp_blocktype_image.html');
        
$this->assignVar('blocktypename''Image');
        
//One day cache time
        
$this->assignVar('bcachetime'86400);
    }
    
    
/**
    * Builds a form for the block
    *
    */
    
function buildForm() {
        
$myts =& MyTextSanitizer::getInstance();
        include_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";
        
        echo 
$this->showImages();
        
        if (isset(
$_GET['imageid'])) {
            
$image $this->getImage($_GET['imageid']);
        }
        else {
            
$image = array('image' => '');
        }
        
        
$form = new XoopsThemeForm('''imageform''manage.php');
        
$image_input = new XoopsFormText(_HP_MA_IMAGE'image'60255$myts->htmlSpecialChars($image['image']));
        
$image_input->setExtra(" /><img align='middle' onmouseover='style.cursor="hand"' onclick='javascript:openWithSelfMain("".XOOPS_URL."/imagemanager.php?nocode=1&amp;target=image","imgmanager",400,430);' src='".XOOPS_URL."/images/image.gif' alt='image' title='image'");
        
$form->addElement($image_inputtrue);
        if (isset(
$image['fieldid'])) {
            
$form->addElement(new XoopsFormHidden('imageid'$image['fieldid']));
        }
        
$form->addElement(new XoopsFormHidden('op''editblock'));
        
$form->addElement(new XoopsFormHidden('blockid'$this->getVar('blockid')));
        
$form->addElement(new XoopsFormButton('''submit'_HP_MA_SUBMIT'submit'));
        
$form->display();
        if (isset(
$image['fieldid'])) {
            
$img = @imagecreatefromjpeg($image['image']);
            if (
$img) {
                
$img_height imagesy($img) + 10;
                
ImageDestroy($img);
            }

            echo 
'<div>
                    <iframe src="'
.$image['image'].'" width="99%" height="'.$img_height.'px" frameborder="0">
                        <a href="'
.$image['image'].'">Image</a>
                    </iframe>
                  </div>'
;
        }
    }
    
    
/**
    * Builds a homepageblock
    *
    * @return array
    */
    
function buildBlock() {
        
$block['image'] = $this->getRandomImage();
        
$img = @imagecreatefromjpeg($block['image']['image']);
        if (
$img) {
            
$block['img_height'] = imagesy($img) + 10;
            
ImageDestroy($img);
        }
        return 
$block;
    }
    
    
/**
    * Performs actions following buildForm submissal
    *
    */
    
function updateBlock() {
        
$myts MyTextSanitizer::getInstance();
        if (isset(
$_POST['imageid']) && $_POST['imageid'] > 0) {
            
$sql "UPDATE ".$this->table.
                    SET value='"
.$myts->addSlashes($_POST['image'])."',
                        weight=0,
                        updated="
.time()."
                    WHERE blockid="
.$this->getVar('blockid')." AND fieldid=".intval($_POST['imageid']);
        }
        else {
            
$sql "INSERT INTO ".$this->table." (blockid, weight, value, updated) VALUES
                    ("
.$this->getVar('blockid').", 0, '".$myts->addSlashes($_POST['image'])."', ".time().")";
        }
        return 
$this->db->query($sql);
    }
    
    
/** Deletes a single item
    * 
    * @return bool
    */
    
function deleteItem() {
        
$id intval($_REQUEST['id']);
        
$sql "DELETE FROM ".$this->table." WHERE blockid=".$this->getVar('blockid')." AND fieldid=".$id;
        if (
$this->db->queryF($sql)) {
            return 
true;
        }
        return 
false;
    }
    
    
/**
    /* Show items already present in the block
    *
    * @return string
    */
    
function showImages() {
        
$images $this->getImages();
        
$ret "<table>";
        
$ret .= "<tr class='head'><td>"._HP_MA_IMAGE."</td><td>"._HP_MA_EDIT."</td><td>"._HP_MA_DELETE."</td></tr>";
        foreach (
$images as $imageid => $row) {
            
$page = isset($page) && $page == "odd" "even" "odd";
            
$ret .= "<tr class='".$page."'>";
            
$ret .= "<td>".$row['image']."</td>";
            
$ret .= "<td><a href='manage.php?op=editblock&amp;blockid=".$this->getVar('blockid')."&amp;imageid=".$imageid."'>"._HP_MA_EDIT."</a></td>";
            
$ret .= "<td><a href='manage.php?op=deleteitem&amp;b=".$this->getVar('blockid')."&amp;id=".$imageid."'>"._HP_MA_DELETE."</a></td>";
            
$ret .= "</tr>";
        }
        
$ret .= "</table>";
        return 
$ret;
    }
    
    
/**
    * retrieve item from database
    *
    * @param int $id imageid
    *
    * @return array
    */
    
function getImage($id) {
        
$id intval($id);
        
$sql "SELECT * FROM ".$this->table." WHERE fieldid=".$id;
        
$result $this->db->query($sql);
        
$row $this->db->fetchArray($result);
        
$row['image'] = $row['value'];
        return 
$row;
    }
    
    
/**
    * Retrieves all items in a block
    *
    * @return array
    */
    
function getImages() {
        
$ret = array();
        
$myts =& MyTextSanitizer::getInstance();
        
$sql "SELECT * FROM ".$this->table." WHERE blockid=".$this->getVar('blockid')." ORDER BY updated DESC";
        
$result $this->db->query($sql);
        while (
$row $this->db->fetchArray($result)) {
            
$ret[$row['fieldid']] = array('imageid' => $row['fieldid'], 
                                         
'image' => $myts->htmlSpecialChars($row['value']),
                                         
'weight' => $row['weight']);
        }
        return 
$ret;
    }
    
    
/**
    * retrieve random item from database
    *
    * @return array
    */
    
function getRandomImage() {
        
$myts =& MyTextSanitizer::getInstance();
        
$sel_time time() - (86400 2);
        
$sql "SELECT * FROM ".$this->table." WHERE blockid=".$this->getVar('blockid')." AND updated > ".$sel_time;
        
$result $this->db->query($sql);
        
$images = array();
        while (
$row $this->db->fetchArray($result)) {
            
$images[] = $row;
        }

        
$num_images count($images);
        if (
$num_images == 0) {
            
$sql "SELECT * FROM ".$this->table." WHERE blockid=".$this->getVar('blockid')." LIMIT 0,1";
            
$result $this->db->query($sql);
            
$images[] = $this->db->fetchArray($result);
        }
        
$random_number rand(0$num_images-1);
        
$row $images[$random_number];
        
//$row['image'] = $myts->displayTarea($row['value']);
        
$row['image'] = $row['value'];
        
$sql "UPDATE ".$this->table." SET updated=".time()." WHERE fieldid=".$row['fieldid'];
        
$this->db->queryF($sql);
        return 
$row;
    }
}
?>


PROBLEM #2:
It looks like none of the default xoopsform areas are working properly. None of the formatting, date/time, or "Add" buttons seem to do anything. I am not getting any PHP errors though.

Thanks for your help!



8
drummond
Re: Custom User Profile Depending on Membership
  • 2005/6/23 14:57

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


Ahh, thanks...I haven't tried that yet, but I found that this worked in the xoopsmembers/index.php file to only show the extended profile link if the person viewing was a member:

if ( $xoopsUser ) {
$userdata['realname'] = $foundusers[$j]->getVar("name") ? "<A HREF='/userinfo.php?uid=".$foundusers[$j]->getVar("uid")."'>".$foundusers[$j]->getVar("name")."" "</A>";

} else {
$userdata['realname'] = $foundusers[$j]->getVar("name") ? $foundusers[$j]->getVar("name") : "&nbsp;";
}



9
drummond
Re: Custom User Profile Depending on Membership
  • 2005/6/22 17:17

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


Is there a global XOOPS variable that will detect if the person viewing a page is logged in, or if they are anonymous? If so, that could be used in a template file to determine what items that user should be seeing.

Anyone? Help!



10
drummond
Custom User Profile Depending on Membership
  • 2005/6/14 5:35

  • drummond

  • Just popping in

  • Posts: 36

  • Since: 2004/6/19


I am trying to make it so anonymous users can only view certain parts of a member's profile, but if a user is a member, allow them to see the entire profile.

I have been hacking around in system_userinfo.html but I am not a programmer and am not having much luck. This is what I was thinking:

<{$chkgroup = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_REGISTERED;}>

<{if $chkgroup == true}>
<tr valign="top">
<td class="head"><{$lang_extrainfo}></td>
<td class="even"><{$user_extrainfo}></td>
</tr>
<{/if}>

Can anyone give me a hint as to what I need to do? Should I be hacking userinfo.php instead?




TopTop
(1) 2 3 4 »



Login

Who's Online

184 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 184


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits