1
Greg21
Xnews 1.71 and article images
  • 2011/8/18 12:14

  • Greg21

  • Just popping in

  • Posts: 3

  • Since: 2011/8/18


Hi,

Despite several searches on the forums and some tests
hack code, I still cannot have the desired result.

Indeed, on Xnews 1.71 (dnprossi) everythings working good but i wish that when we join an image to the article, the clic on it (on the image on news list) goes to the news and not to the category (like it is now)

I tried to modify the template
"nw_news_item.html"
I know that I have to look near <{$story.imglink}>

But I didn't succeed...


Big thanks in advance if you have an idea...

Greg

2
Mamba
Re: Xnews 1.71 and article images
  • 2011/8/19 10:41

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


I guess, the premise of this behavior is that you assign an image to a topic.

In an article, you decide, if you want to show the topic image, or not.

You have also an option to replace the "topic image" with your own image.

But because it is still a "topic image", when you click on it, it opens the Topic.

If you want to change the behavior, it seems like you would need to rewrite the
function imglink() in class.newsstory.php

And also change the function nw_seo_UrlGenerator in functions.php, specifically the line:

return NW_MODULE_URL "/index.php?topic_id=${id}";

to something like:

return NW_MODULE_URL "/article.php?storyid=${id}";

where the "id" is the ID of the article, which you will be sending from the function imglink() when you call nw_seo_UrlGenerator.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
Greg21
Re: Xnews 1.71 and article images
  • 2011/8/19 13:06

  • Greg21

  • Just popping in

  • Posts: 3

  • Since: 2011/8/18


Wonderful ! it works !

in functions.php
I changed the code like you explain (ligne 806 in my version)

and in class.newsstory.php

i changed ligne 653 and 666
$this->topicid() to $this->storyid()

Thanks a lot !

Login

Who's Online

351 user(s) are online (210 user(s) are browsing Support Forums)


Members: 0


Guests: 351


more...

Donat-O-Meter

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

Latest GitHub Commits