81
jfebus
HELP!! HELP!!! Adding a new block to wfsections!
  • 2004/9/9 16:19

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


Hi All,

I wanted to have a block that will show articules in random order, so I try to do it myself!

As you can imagine I am having a problem!

I did the following changes:

xoops_version.pgp
$modversion['blocks'][10]['file'] = "wfs_random.php";
$modversion['blocks'][10]['name'] = "random";
$modversion['blocks'][10]['description'] = "Shows random articles";
$modversion['blocks'][10]['show_func'] = "b_wfs_random_show";
$modversion['blocks'][10]['edit_func'] = "b_wfs_random_edit";
$modversion['blocks'][10]['options'] = "published|10|19|1|1|1|1|100";
$modversion['blocks'][10]['template'] = 'wfs_block_random.html';


copied wfs_new.php into wfs_random.php
and change the sql statement
function b_wfs_random_show($options)
{
    global 
$xoopsDB$xoopsModuleConfig$wfsPathConfig;

    
$modhandler = &xoops_gethandler('module');
    
$xoopsModule = &$modhandler->getByDirname(WFSECTION);
    
$config_handler = &xoops_gethandler('config');
    
$xoopsModuleConfig = &$config_handler->getConfigsByCat(0$xoopsModule->getVar('mid'));

    
$myts = &MyTextSanitizer::getInstance();
    
$block = array();
    
$sql "SELECT articleid, title, published, expired, 
counter, groupid, articleimg, url, 
summary FROM " 
$xoopsDB->prefix(WFS_ARTICLE_DB)
 . 
" WHERE published < " 
time() . " AND published > 0  AND noshowart = 0 AND offline 
= 0 ORDER BY RAND() LIMIT 10"
;


copied the file wfs_block_new.html into wfs_block_random.html without any changes.

then I update the module, got the ramdom block in the admin block area, gave all the groups access to it, but it still doesn't appears!

any idea?

Best Regards




82
jfebus
Re: WF-Section and php
  • 2004/9/9 13:14

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


Hi,

You can edit the wfsection_article.html file and edit this part:

<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <{if 
$article.catimg }>
        <
td width="71" rowspan="3" align="center" valign="middle"><{$article.catimg}></td>
    <{/if}>
    <
td width="91%" class="style1"><{$article.titlemain}></td>
  </
tr>
  <
tr>
    <
td bgcolor="#000000"><img src="/images/blank.png" alt="" height="1" width="1" border="0"></td>
  </
tr>
  <
tr>
    <
td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <
tr>
        <
td align="left" valign="top" width="75%" class="style2">
            <
b><{$lang_author}></b> <{$article.poster}> <{$article.email}><br /> 
            <
b><{$lang_published}></b> <{$article.datetime}><br /> 
            <
b><{$lang_version}></b> <{$article.version}><br />
            <
b><{$lang_articleid}></b> <{$article.articleid}><br />
        </
td>
        <
td width="25%" align="right" valign="top" class="style3">
             <{if 
$novote == true}>
             <
b><{$lang_rating}></b> <{$article.rating}><br /> 
             <
b><{$lang_votes}></b> <{$article.votes}><br />
            <{/if}> 
             <
b><{$lang_views}></b> <{$article.counter}><{$lang_times}><br />
             <
b><{$lang_size}></b> <{$article.size}>
             
        </
td>
      </
tr>
    </
table></td>
  </
tr>
</
table>


Good Luck!

Jose Febus



83
jfebus
Re: WF-Section and php
  • 2004/9/9 12:49

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


What info do you want to hide?

I was able to hide several field "author" and "read" updating the templates.

Best regards,

Jose



84
jfebus
Re: error trying to clone a block
  • 2004/9/9 12:45

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


Hi All,

After updating xoops_version.php with
$modversion['blocks'][10]['file'] = "wfs_random.php";
$modversion['blocks'][10]['name'] = "random";
$modversion['blocks'][10]['description'] = "Shows random articles";
$modversion['blocks'][10]['show_func'] = "b_wfs_random_show";
$modversion['blocks'][10]['edit_func'] = "b_wfs_new_edit";
$modversion['blocks'][10]['options'] = "published|10|19|1|1|1|1|100";
$modversion['blocks'][10]['template'] = $wfsTemplates['newartblock'];


and uploading:
wfs_random.php to /modules/wfsection/blocks/
wfs_block_random.html to /modules/wfsection/templates/blocks/

and updating the module I am getting :
"Selected file does not exist)"

Any Ideas?

Best Regards,



85
jfebus
Re: Adding blocks in news module
  • 2004/9/9 12:29

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


I just follow the instruction and after updating the module I am still getting a "Selected file does not exist)" error.

Any hints?

Best regards,

Jose Febus



86
jfebus
Re: Problem @ XOOPS Admin - MASS MAIL SEND :(
  • 2004/9/8 18:09

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


how much memory will php/xoops needs for mass mail users?
16mb/70 users?

Best regards,

Jose



87
jfebus
Re: Random Articules Block
  • 2004/9/8 14:21

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


Hi Scott,

Thanks a lot!

Best Regards,

Jose



88
jfebus
Re: Random Articules Block
  • 2004/9/8 13:53

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


Hi All,

Any idea if changeing the wfs_new.php sql statement will do the work?

Best Regards,

Jose



89
jfebus
Random Articules Block
  • 2004/9/8 0:45

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


Hi All,

Any ideas on how to have a block displaying Ramdom Articules of wfsections? or any other Articule module?

Best Regards,

Jose Febus



90
jfebus
Re: how to add a link into the main menu?
  • 2004/9/7 22:59

  • jfebus

  • Just popping in

  • Posts: 97

  • Since: 2004/9/1 1


I just copy the html generated for the main menu and out it into a custom html block adding several new links.

Beware that the new custom html block will not expand when selecting the modules from it.

Best Regards,




TopTop
« 1 ... 6 7 8 (9) 10 »



Login

Who's Online

289 user(s) are online (209 user(s) are browsing Support Forums)


Members: 0


Guests: 289


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