X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   news posting (https://forum.x-cart.com/showthread.php?t=24033)

smv 10-12-2007 09:52 AM

Re: news posting
 
Hey is there a way to just show the subject as a link, and have like 5 news articles shown at a time by subject so people can click on them and be taken the the news article?

almenzies 11-04-2007 03:23 PM

Re: news posting
 
Yeah that's really what I'm looking for too.

I tried changing

HTML Code:

    if ($only_first) {
        $query .= " LIMIT 1";
    }


to

HTML Code:


    if ($only_first) {
        $query .= " LIMIT 5";
    }



in modules/news_management/func.php as suggested in a previous post, but it had no effect!

smv 11-05-2007 05:36 AM

Re: news posting
 
yeah, cause i mean if you have a huge news update it looks really bad in the little box. It'd be nice to just have headlines.

code4access 11-05-2007 04:02 PM

Re: news posting
 
Quote:

Originally Posted by mrkenzie
Here is what I did, you can check out the final product at:
www.techcentrichomes.com
.................
Good luck!


Hi mrkenzie, I like your solution and I had followed exactly your script, unfortunate i was not successful

I had total 3 news to display..

Problem 1. : when follow 100% the script, it display the text "news" only (or show only news_icon.gif without news subject which it shoud display as in your site)

Problem 2 : It did not shows all the 3 news i have, it shows only the last one, and it display repeately 12 times

I tried to change the script, if i quote out all "curr_message" in the scrpt, it solved problem1, but problem 2 remains same.

Kindly advise and help, thank you very much in advance and appreciated.

samz724 02-04-2008 07:10 AM

Re: news posting
 
I 2nd this problem.. I would love to implement this, but i'm coming up w/ the same issue.

Any ideas? thanks


Quote:

Originally Posted by code4access
Hi mrkenzie, I like your solution and I had followed exactly your script, unfortunate i was not successful

I had total 3 news to display..

Problem 1. : when follow 100% the script, it display the text "news" only (or show only news_icon.gif without news subject which it shoud display as in your site)

Problem 2 : It did not shows all the 3 news i have, it shows only the last one, and it display repeately 12 times

I tried to change the script, if i quote out all "curr_message" in the scrpt, it solved problem1, but problem 2 remains same.

Kindly advise and help, thank you very much in advance and appreciated.


MythNReality 04-18-2008 12:32 AM

Re: news posting
 
Quote:

Originally Posted by code4access
Hi mrkenzie, I like your solution and I had followed exactly your script, unfortunate i was not successful



Follow the message #17 then you'll get what you want. That's how I did it, and works like magic. No need for BIG codes!

find: /today_news.tpl (from your admin panel)

Quote:

Originally Posted by ozchris

<a href="news.php" class="SmallNotes">{$news_message.subject}</a>
instead of the old
{$news_message.body}

Wow. my first xcart code change!


Paul H 10-25-2008 07:52 AM

Re: news posting
 
I did the #17 mod and it works fine and cleans up the box nicely for long news messages.Just need to figure how to list several messages

I was a little confused with the news system but I think it works like this.
Create a news letter in the lists section to mail out to anyone who subscribes
and then create a message that displays on the site.
There is a tick box in the news list "show messages in site news" and another tick box
in "messages" "show as news"
but things don't seem to work quite like they should.

I'd of thought that just create a news item and then tick a box whether to display on the site would of been fine with no need for a separate message section but maybe I'm missing something ??

espresso 11-10-2008 02:55 PM

Re: news posting
 
Quote:

Originally Posted by balinor
Here's what I use:

open up today_news.tpl and replace this:

{$news_message.body}

with this:

{$news_message.body|truncate:114:"...":true}...read more

change the truncate value to shrink or expand as you like.


Just a side note that this will not work if you have HTML code in your news message body. Use plain text instead !

conradp24 05-18-2009 02:51 AM

Re: news posting
 
Has anybody managed to resolve the issues of not being able to add multiple subject headings or even multiple news items to the main today_news.tpl?

I tried doing a [section loop] .... [/section] but this didn't work. I've been looking through the php files but can't seem to find what I need to resolve this ( although not a php coder as such :oops: )

Also my news doesn't display the send_date in this code: {$news_message.date|date_format:$config.Appearance .date_format}

If I change it to date it displays the current date??!

I would like to be able to display the news the same as mrkenzie but after working on it for two days I have to put up my hand and ask for help

aurimasdulskis 05-20-2009 12:10 AM

Re: news posting
 
Anyone can tell in which file i can manage news box? My template is home made and when i done to show news in main site page - it was not shown. I need to insert tags, but where? Thanks!


All times are GMT -8. The time now is 01:31 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.