31
exbanious
Re: mysterious td background color
  • 2005/11/5 5:48

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


after downloading the phpkaox theme, i noticed that the left and right column settings are hard-coded into the theme.html file.




here is the code for the left column
<td width="20%" bgcolor="#EFEFEF">
          <!-- 
Start left blocks loop -->
            <{foreach 
item=block from=$xoops_lblocks}>
            <
table cellspacing="0" cellpadding="2">
              <
tr>
                <
td class="blockTitle">&nbsp;<{$block.title}></td>
              </
tr>
              <
tr>
                <
td class="blockContent"><{$block.content}></td>
              </
tr>
            </
table>
            <{/foreach}>
          <!-- 
End left blocks loop -->




and for the right column w/blocks

<{if $xoops_showrblock == 1}>
          <
td width=20bgcolor=#efefef align=center>
          
<!-- Start right blocks loop -->
            <{foreach 
item=block from=$xoops_rblocks}>
            <
table cellspacing="0" cellpadding="2">
              <
tr>
                <
td class="blockTitle">&nbsp;<{$block.title}></td>
              </
tr>
              <
tr>
                <
td class="blockContent"><{$block.content}></td>
              </
tr>
            </
table>
            <
br />
            <{/foreach}>
          <!-- 
End right blocks loop -->


change the bgcolor for those td settings or make your own reference in the css file for those columns.

as far as the grey spaces between the blocks on the right column, it looks like you have a break tag in the right block code which is showing the column background instead of the block background. so every time it loads a block, it throws a break tag in between each block.
delete that, and it should look like the left side.



32
exbanious
Re: Can't update a theme.
  • 2005/10/29 15:55

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


delete the theme file in the templates_c directory.
it should look something like this
"%%2F^2FE^2FE3BDD0%%theme.html.php"

also, while your testing the theme, go into your system preferences\general preferences\
and turn on "Update module template .html files from themes/your theme/templates directory".

just turn it off when your done.



33
exbanious
Re: mysterious td background color
  • 2005/10/29 4:21

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


can you post the code from your css file? what are the settings for your left and right columns?



34
exbanious
Re: Want to develop a module to show me more than one block - HOW ?
  • 2005/10/15 4:40

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30





35
exbanious
Re: News module +keywords
  • 2005/7/14 23:24

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


you might want to turn your debug on and see what it says.
there are several places in news 1.3.1 that make references to the keywords function.
off hand, "admin/index.php", "submit.php" and "class.newsstory.php", in addition to "article.php". you would have to add these references in as well...

i had made several modifications to news 1.2 and found it much easier to port those changes over to higher versions, rather than add elements from later versions to earlier ones. but everyone has their own method, so do whatever works for you.



36
exbanious
Re: News module +keywords
  • 2005/6/8 1:33

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


i was looking into a way to show related articles. i just made this, and so far it seems to work correctly.

first i added a fulltext index to the "keywords" key
and put the following code in article.php



if($article->keywords() !='') {

$id intval($_GET['storyid']);
        
    
$db =& Database::getInstance();
    
$myts =& MyTextSanitizer::getInstance();
    
$query "SELECT * FROM ".$db->prefix("stories")." WHERE MATCH (keywords) AGAINST ('$article->keywords') AND storyid != '$id' ";
    
$result mysql_query($query);
    
$number mysql_numrows($result);

    if (
intval($number) != 0){
        
$xoopsTpl->assign('related_articles'"Related Articles");

        while (
$myrow $db->fetchArray($result)){

            
$ret[$myrow['storyid']] = array( 'title'=>'<a href='.XOOPS_URL.'/modules/news/article.php?storyid='.$myrow['storyid']. '>'.$myts->htmlSpecialChars($myrow['title'] ).'</a>''date'=>formatTimestamp($myrow['published'], "s"));
            }

    }
}

$xoopsTpl->assign('ret'$ret);


then i placed the following code into "news_article.html"


<table width='50%' cellspacing='0' cellpadding='1'>
<
tr>
<
th><{$related_articles}></th>
</
tr>
<{foreach 
from=$ret item=storyid}>
<
tr class="<{cycle values="even,odd"}>">
<
td>
               
<{
$storyid.title}> (<{$storyid.date}>)<br/>
</
td></tr><{/foreach}>
</
div><br/>
</
td>            
</
tr>
</
table>


i haven't tested it on a large site as of yet, so i'm not sure how practical this solution is. If anyone has a better idea of how to accomplish this, i am interested in any input.



37
exbanious
Re: datestring for comment posts..
  • 2005/5/22 20:23

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


thanks fellas....
that was exactly what i needed.



38
exbanious
datestring for comment posts..
  • 2005/5/11 18:53

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


This isn't the question you probably think it is...

In news 1.2... or if that matters.

i keep wandering through the same files trying to locate where the datestring format is defined specifically for the comment posts.

i know where to change the format for the datestrings, but
i cannot change any of the three definitions without affecting other areas of the site.
i am actually looking to create a separate datestring definition for the comment posts only.

can anybody point me to the correct file?



39
exbanious
Re: add css class to images in news
  • 2005/4/9 22:49

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


put this in news_item.html

<style type="text/css">
<!--
img {
    
border1px;
}
-->



40
exbanious
Re: how to put latest news in home page
  • 2005/4/4 8:14

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


I believe the hack brash is refering to is to edit xoops_version.php in modules\news\

find this bit of code:

Quote:



$modversion['config'][1]['options'] = array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30);




and change it to:

Quote:


$modversion['config'][1]['options'] = array('1' => 1, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30);



then update your news module, go into preferences and select number of news stories to show.
the code will give you the option to show only 1 news item in the index at a time.




TopTop
« 1 2 3 (4) 5 6 7 8 »



Login

Who's Online

245 user(s) are online (157 user(s) are browsing Support Forums)


Members: 0


Guests: 245


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