1
devxtrm
Couple of questions on a couple of modules.
  • 2004/12/12 8:54

  • devxtrm

  • Just popping in

  • Posts: 75

  • Since: 2004/12/9


Hello all,

I've got a couple of questions on modules and i would appreciate it greatly if you guys are able to help me.

1) I am using News 1.21 and is it possible for the "Recent News" shown on the top page to display the title and a short intro the the news instead of the listing the titles?

If that isn't possible, how are people making their news appear in the top page with the title and a short portion of the news.

2) I would like more advertisements to be displayed on my website instead of just the top (example: left/right block), should i do this by adding a new block or is there a module for this? If not, do i have to edit the CSS template or sort to get more advertisements out?

3) I noticed that under "Registration" users have to fill out very little options to get them registered. Is there a way to include more blanks for guest wanting to register to sign up and even make some of those blank fields compulsary?

Thanks to all for taking your time to read this post and many thanks in advance again. XOOPS is a GREAT module and i hope i will be able to use it to its fullest potential!

2
intel352
Re: Couple of questions on a couple of modules.
  • 2004/12/12 9:38

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


problem 1: goto blocks admin, click on Edit beside the Recent/Top News block, you can set the spotlight & teaser info there


problem 2: create a custom Block in the admin, set the type to PHP Code, and paste in the following code

include_once XOOPS_ROOT_PATH.'/include/functions.php';
global 
$xoopsConfig;
$db =& Database::getInstance();
$bannerobject '';
$bresult $db->query("SELECT COUNT(*) FROM ".$db->prefix("banner"));
list (
$numrows) = $db->fetchRow($bresult);
if ( 
$numrows ) {
    
$numrows $numrows-1;
    
mt_srand((double)microtime()*1000000);
    
$bannum mt_rand(0$numrows);
} else {
    
$bannum 0;
}
if ( 
$numrows ) {
    
$bresult $db->query("SELECT * FROM ".$db->prefix("banner"), 1$bannum);
list (
$bid$cid$imptotal$impmade$clicks$imageurl$clickurl$date$htmlbanner$htmlcode) = $db->fetchRow($bresult);
if (
$xoopsConfig['my_ip'] == xoops_getenv('REMOTE_ADDR')) {
        
// EMPTY
    
} else {
        
$db->queryF(sprintf("UPDATE %s SET impmade = impmade+1 WHERE bid = %u"$db->prefix("banner"), $bid));
}
    
/* Check if this impression is the last one and print the banner */
    
if ( $imptotal == $impmade ) {
        
$newid $db->genId($db->prefix("bannerfinish")."_bid_seq");
        
$sql sprintf("INSERT INTO %s (bid, cid, impressions, clicks, datestart, dateend) VALUES (%u, %u, %u, %u, %u, %u)"$db->prefix("bannerfinish"), $newid$cid$impmade$clicks$datetime());
        
$db->queryF($sql);
        
$db->queryF(sprintf("DELETE FROM %s WHERE bid = %u"$db->prefix("banner"), $bid));
    }
    if (
$htmlbanner){
        
$bannerobject $htmlcode;
    }else{
    
$bannerobject '<center><a href="'.XOOPS_URL.'/banners.php?op=click&amp;bid='.$bid.'" target="_blank">';
        if (
stristr($imageurl'.swf')) {
            
$bannerobject $bannerobject
                
.'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="468" height="60">'
                
.'<param name=movie value="'.$imageurl.'">'
                
.'<param name=quality value=high>'
                
.'<embed src="'.$imageurl.'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; type="application/x-shockwave-flash" width="468" height="60">'
                
.'</embed>'
                
.'</object>';
        } else {
            
$bannerobject $bannerobject.'<img src="'.$imageurl.'" alt="" />';
        }

        
$bannerobject $bannerobject.'</a></center>';
}
echo 
$bannerobject;
}



problem 3: dunno

3
devxtrm
Re: Couple of questions on a couple of modules.
  • 2004/12/12 9:47

  • devxtrm

  • Just popping in

  • Posts: 75

  • Since: 2004/12/9


Wow, that was quick and informative, bd_csmc! Thanks a million. About the 3rd problem i've been doing some searching and found out that this was very difficult to do if not impossible. However, i hope that in the next large stable release of XOOPS this will be implemented. Thanks again for the help!

4
intel352
Re: Couple of questions on a couple of modules.
  • 2004/12/12 9:58

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


np

and, yes, i believe 2.1/2.2 is supposed to support extensible user tables (added profile/registration fields)

Login

Who's Online

123 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 123


more...

Donat-O-Meter

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

Latest GitHub Commits