1
council
A Simple News Block
  • 2005/3/2 8:20

  • council

  • Not too shy to talk

  • Posts: 184

  • Since: 2004/12/18


I'm not sure if people have given up on my earlier message so I'll try again here.

I'm looking for a simple news block similar to the Spotline block that doesn't mess up the formatting of text and photos the way the Spotline block does.

Tried AMS but it doesn't display article content in its blocks, only headlines.

Custom blocks don't format like text blocks and also don't provide text editors.

Ric

2
karedokx
Re: A Simple News Block
  • 2005/3/2 16:50

  • karedokx

  • Quite a regular

  • Posts: 319

  • Since: 2004/7/1 6


if you can explain more (provide example), we might be able to assist you more ric.

ams (and the latest news module for example, or other article mgt modules) are advanced news module which i believe should be able to fulfill your requirement..

3
exbanious
Re: A Simple News Block
  • 2005/3/2 18:34

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


you might want to try "xf_newsmod_blocks"
find it in this thread:HERE

I found that i had to edit the "news_all.php" block to make it display the text and html the way i wanted it to.

Quote:


$hometext = $myts->displayTarea(substr($myrow['hometext'], 1, ($options[3] - 1), 1 ))."...";


i changed this to:


$hometext = substr($hometext, 0, ($options[3] - 1))."...";



NOTE: this will only affect the display if you opt to limit the amount of characters of the hometext to display.
also, i did this a while ago, and as far as i can remember, this is all that i changed, so with this in mind, keep a backup......

hope that helps.

4
council
Re: A Simple News Block
  • 2005/3/3 1:19

  • council

  • Not too shy to talk

  • Posts: 184

  • Since: 2004/12/18


Quote:

exbanious wrote:
you might want to try "xf_newsmod_blocks"
find it in this thread:HERE

I found that i had to edit the "news_all.php" block to make it display the text and html the way i wanted it to.

Quote:


$hometext = $myts->displayTarea(substr($myrow['hometext'], 1, ($options[3] - 1), 1 ))."...";


i changed this to:


$hometext = substr($hometext, 0, ($options[3] - 1))."...";



NOTE: this will only affect the display if you opt to limit the amount of characters of the hometext to display.
also, i did this a while ago, and as far as i can remember, this is all that i changed, so with this in mind, keep a backup......

hope that helps.



Right, this is want I needed. Did the mod and it turned out fine.

Thanks, all.

Ric

5
council
Re: A Simple News Block
  • 2005/3/3 1:26

  • council

  • Not too shy to talk

  • Posts: 184

  • Since: 2004/12/18


By the way, how do I mod this so it pulls from news2 instead of news?

ric

6
exbanious
Re: A Simple News Block
  • 2005/3/3 2:22

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


i haven't really tried using this with news2, but you might
try changing the following code in news_all.php:

Quote:


$sql = "SELECT storyid, title, bodytext, topicdisplay, topicalign, published, counter FROM ".$xoopsDB->prefix("stories")." WHERE published < ".time()." AND published > 0 AND (expired = 0 OR expired > ".time().") ORDER BY ".$options[0]." DESC";




change ("stories") to ("stories2")

Quote:


$var_image = $xoopsDB->query("SELECT topicid FROM ".$xoopsDB->prefix("stories")." WHERE storyid=".$newsid."",1,0);
list ($patt_image) = $xoopsDB->fetchRow($var_image);
$var_image2 = $xoopsDB->query("SELECT topic_imgurl FROM ".$xoopsDB->prefix("topics")." WHERE topic_id=".$patt_image."",1,0);
list ($image_display) = $xoopsDB->fetchRow($var_image2);
$news['image_display'] = $image_display;

$block['stories'][] = $news;



also change ("stories") to ("stories2") and
("topics") to ("topics2")

like i said, i haven't tried this, but i should work....theoretically.

Login

Who's Online

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


Members: 0


Guests: 127


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