1
pessi
article module (random article)
  • 2006/5/12 13:03

  • pessi

  • Quite a regular

  • Posts: 204

  • Since: 2004/5/16


Dear All

I have installed the newest article module and would like to know if its possible to have a block with a random article in it?

I see that it has no such block so how can i create one of my own with a random article displayed? preferably with a "more" option rather than the full article in the block.

thanks so much in advance,
prasad..

2
phppp
Re: article module (random article)
  • 2006/5/12 13:37

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


article does have such block, currently only works for XOOPS 2.2*
will work for 2.3

3
pessi
Re: article module (random article)
  • 2006/5/12 13:43

  • pessi

  • Quite a regular

  • Posts: 204

  • Since: 2004/5/16


i have 2.0.13.2! Is there a way out that I can make this block myself if it is not available?

thanks for your reply.

cheers
prasad.

4
phppp
Re: article module (random article)
  • 2006/5/12 13:52

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


$i++;
$modversion["blocks"][$i]["file"] = "block.php";
$modversion["blocks"][$i]["name"] = art_constant("MI_ARTICLE");
$modversion["blocks"][$i]["description"] = art_constant("MI_ARTICLE_DESC");
$modversion["blocks"][$i]["show_func"] = $GLOBALS["ART_VAR_PREFIX"]."_article_show";
$modversion["blocks"][$i]["options"] = "time|10|0|0|c|0";
$modversion["blocks"][$i]["edit_func"] = $GLOBALS["ART_VAR_PREFIX"]."_article_edit";
$modversion["blocks"][$i]["template"] = $GLOBALS["ART_VAR_PREFIX"]."_block_article.html";


change
$modversion["blocks"][$i]["options"] = "time|10|0|0|c|0";
=>
$modversion["blocks"][$i]["options"] = "random|10|0|0|c|0";

5
pessi
Re: article module (random article)
  • 2006/5/12 13:54

  • pessi

  • Quite a regular

  • Posts: 204

  • Since: 2004/5/16


sorry for my ignorance but should I create a new block and add this code? or should I change this code? which script?

thanks in advance,
prasad.

6
pessi
Re: article module (random article)
  • 2006/5/14 17:31

  • pessi

  • Quite a regular

  • Posts: 204

  • Since: 2004/5/16


for anyone who was confused like me. you need to change
the code in /modules/articles/xoops_version.php

Login

Who's Online

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


Members: 0


Guests: 506


more...

Donat-O-Meter

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

Latest GitHub Commits