257361
hlint
background-repeat="no-repeat"
  • 2004/5/13 14:22

  • hlint

  • Friend of XOOPS

  • Posts: 25

  • Since: 2004/2/6 7


I'm trying to get the backgroud in a <td>not to repeat itself.
But I don't have the knowledge nor the program that tells me the right code.

This is what I'm using now
Quote:
<td width="100%" background-repeat="no-repeat" background="<{$xoops_imageurl}>images/logolente.jpg" bgcolor="#FFFFFF">


It doen't work. please help.

greetings erik

(one of the many bumps to XOOPS heaven)



257362
ladon
Re: Displaying News by their Category?
  • 2004/5/13 14:21

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


News 1.2 beta has a block to diplay news per topic. I've send Mithrandir some code to put the option in the old blocks so 1 or more topics can be selected for each block. It uses a multi-select form. Little problem I couldn't figure out how to solve is: it gives each topic the name ARRAY. But that figures, I'm not a coder . It works anyway.

If you don't mind hacking you news module a little, here is the code: (place this in modules/news/news_top.php, replace all.)
function b_news_top_show($options) {
    global 
$xoopsDB;
    
$myts =& MyTextSanitizer::getInstance();
    
$block = array();
    
$options_new array_slice $options); 
    
$topicpick '('.implode ','$options_new ).')'
    if ( 
$options[3] == ) {
        
$sql "SELECT storyid, title, published, expired, counter FROM ".$xoopsDB->prefix("stories")." WHERE published < ".time()." AND published > 0 AND (expired = 0 OR expired > ".time().") ORDER BY ".$options[0]." DESC";
        }
        else {
            
$sql "SELECT storyid, title, published, expired, counter FROM ".$xoopsDB->prefix("stories")." WHERE published < ".time()." AND published > 0 AND (expired = 0 OR expired > ".time().") AND topicid in ".$topicpick." ORDER BY ".$options[0]." DESC";
            }    
$result $xoopsDB->query($sql,$options[1],0);
    while ( 
$myrow $xoopsDB->fetchArray($result) ) {
        
$news = array();
        
$title $myts->makeTboxData4Show($myrow["title"]);
        if ( !
XOOPS_USE_MULTIBYTES ) {
            if (
strlen($myrow['title']) >= $options[2]) {
                
$title $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."...";
            }
        }
        
$news['title'] = $title;
        
$news['id'] = $myrow['storyid'];
        if ( 
$options[0] == "published" ) {
            
$news['date'] = formatTimestamp($myrow['published'],"s");
        } elseif ( 
$options[0] == "counter" ) {
            
$news['hits'] = $myrow['counter'];
        }
        
$block['stories'][] = $news;
    }
    return 
$block;
}

function 
b_news_top_edit($options) {
    global 
$xoopsDB;
    
$form ""._MB_NEWS_ORDER."&nbsp;<select name='options[]'>";
    
$form .= "<option value='published'";
    if ( 
$options[0] == "published" ) {
        
$form .= " selected='selected'";
    }
    
$form .= ">"._MB_NEWS_DATE."</option>n";
    
$form .= "<option value='counter'";
    if(
$options[0] == "counter"){
        
$form .= " selected='selected'";
    }
    
$form .= ">"._MB_NEWS_HITS."</option>n";
    
$form .= "</select>n";
    
$form .= "&nbsp;"._MB_NEWS_DISP."&nbsp;<input type='text' name='options[]' value='".$options[1]."' />&nbsp;"._MB_NEWS_ARTCLS."";
    
$form .= "&nbsp;<br>"._MB_NEWS_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[2]."' />&nbsp;"._MB_NEWS_LENGTH."";
    
$form .= "<br /><br />test<br /><select id='options[]' name='options[]' multiple='multiple'>";
    include_once 
XOOPS_ROOT_PATH."/class/xoopsstory.php";
    
$xt = new XoopsTopic($xoopsDB->prefix("topics"));
    
$alltopics $xt->getTopicsList();
    
$alltopics[0] = "All topics";
    
ksort($alltopics);
    
$size count($options);
    foreach (
$alltopics as $topicid => $topic) {
        
$sel "";
        for ( 
$i 2$i $size$i++ ) {
            if (
$options[$i] == $topicid) {
                
$sel " selected='selected'";
            }
        }
        
$form .= "<option value='$topicid'$sel>$topic</option>";
    }
    
$form .= "</select>";
    return 
$form;
}


If you want to be certain everything works flawless, wait for the release of the new news module or use the Topics Block Module. But as far as I know you can only select 1 topic with that module. If that's enough, no need to use this code



257363
limecity
Re: Setting up a Multi Language Xoops Site
  • 2004/5/13 14:20

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


Solo71,
I followed your tutorial step by step.. and i successfully installed the Multilanguage 1.3

Now can switch back and forth between those 2 language.

Now the problem.. is that i still can't get the theme text to change..





Quote:


// ML Hack by marcan. Thanks to King76 !
// $this->assign(array('xoops_url' => XOOPS_URL, 'xoops_rootpath' => XOOPS_ROOT_PATH, 'xoops_langcode' => _LANGCODE, 'xoops_charset' => _CHARSET, 'xoops_version' => XOOPS_VERSION, 'xoops_upload_url' => XOOPS_UPLOAD_URL));
$this->assign(array('xoopsml_version' => '1.3', 'lang_name' => $xoopsConfig['language'], 'xoops_url' => XOOPS_URL, 'xoops_rootpath' => XOOPS_ROOT_PATH, 'xoops_langcode' => _LANGCODE, 'xoops_charset' => _CHARSET, 'xoops_version' => XOOPS_VERSION, 'xoops_upload_url' => XOOPS_UPLOAD_URL));

// Add your custom smarty variables here. You will be able to use them in your theme<BR>global
$myts;<BR>$myts =&
MyTextSanitizer::getInstance();<BR><BR>$this->assign('developpedby',$myts->makeTboxData4Show(\"[sc]CHinese text1<BR>Moi[/sc][en]English text1[/en]\"));<BR>$this->assign('mycopyrights',$myts->makeTboxData4Show(\"[sc]
Copyright © 2004 <BR>Chinese text Here 2 [/sc][en] English text 2[/en]\"))



// End of ML Hack






257364
Jools_chem
Re: Avatar, Images
  • 2004/5/13 14:06

  • Jools_chem

  • Just popping in

  • Posts: 14

  • Since: 2004/5/10


Forgive my ignorance, but what directory is that? I've tried to do this and failed!

Sorry for being a Newbie.

Cheers
Jools



257365
ladon
Re: is it possible
  • 2004/5/13 14:05

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


Yup, can be done for Xoops, I took a look at the source and found the name of the theme: "LogicII". The website seems to be running PostNuke, so search for a PostNuke theme with that name. If you are allowed to port/clone it, it shouldn't be to much work (not a little work either ).



257366
Jools_chem
Re: Xoops looks great is IE and Opera but in firefox it looks like it is Unstyled or without any CSS
  • 2004/5/13 14:04

  • Jools_chem

  • Just popping in

  • Posts: 14

  • Since: 2004/5/10


Firefox does all sorts fo wierd stuff especially if themes have any kind of what appear to be pop-up menus written in DHTML. Its a bit of a pain, maybe I might hop on over to mozilla.org and have a moan!

Love XOOPS though



257367
Jools_chem
Re: Upload Avatar on xoops.org?
  • 2004/5/13 13:57

  • Jools_chem

  • Just popping in

  • Posts: 14

  • Since: 2004/5/10


Your not the only one - great stuff this XOOPS though!



257368
Jools_chem
Re: Installing themes
  • 2004/5/13 13:45

  • Jools_chem

  • Just popping in

  • Posts: 14

  • Since: 2004/5/10


There are some fantastic themes available, try the art theme from the XOOPS official site - very nice. Its also quite easy to edit - to give you new letters etc.

Some themes can make XOOPS run a little slow though in my humble experience.

Part of the fun in setting up an XOOPS site is playing with the fantastic range of themes available. I just can't help changing when I find a new theme.

Be careful though as some of them don't work with the Mozilla family of browsers - especially when writers use DHTML. But hey thats part of the fun!

Enjoy



257369
phppp
Re: is it possible
  • 2004/5/13 13:36

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


I like the color, like zara



257370
tl
Re: Blank page after "confirm database settings"
  • 2004/5/13 13:33

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Make sure your PHP has MySQL compiled in. I don't see any entry on MySQL under your php version.php.

Is this a typo?
Quote:
'--with-mysql=shared,/usr'








Login

Who's Online

156 user(s) are online (94 user(s) are browsing Support Forums)


Members: 0


Guests: 156


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