That is what I am saying; you have accidentally added it inside of a loop in the file. just move it out of the loop.Quote:
Originally Posted by shackle
Printable View
That is what I am saying; you have accidentally added it inside of a loop in the file. just move it out of the loop.Quote:
Originally Posted by shackle
forgive me for being a noob, but whats a loop and where can it be found?Quote:
Originally Posted by dreamscape
A loop is something that repeats a process until it reaches some point at which it is told to stop. Common PHP loop constructs are for(), foreach(), and while().Quote:
Originally Posted by shackle
Where it can be found is whereever you placed the call to the new summary module. I have really no idea where that is or what exactly it looks like. I can't magically see your code in my head ;)
Your statement, "I added the code the those files at the bottom [..snip..] still kinda puzzled i don't rememeber changing anything," makes little sense. There is no way you could have added the news summary code to your site without changing your index template. So let's just assume that you did change a file, your index template, since the news summary is showing up [otherwise it would be impossible for it to show up]. The installation directions do not say exactly where you should put the news summary code in the file, because you can put it where-ever you want on the page; however, you have apparently placed it inside of a loop, which is why you see it repeating. You must remove it from the loop and reposition it in the code some place that is not being looped over. You'll need at least basic PHP knowledge to do this in order to know if you are inside or outside of a loop.
I mean i didn't change anything other then what the website said.
here are the 2 files changed:
Includes/modules/meta_tags.php
includes/templates/template_default/templates/tpl_index_default.php
download here: http://www.guildvalor.com/files.zip
Quote:
Originally Posted by dreamscape
Just as I've been saying, the problem is that you have placed the new summary inside of a loop.
The loop starts at line 44 with:
and it ends at lines 85-88 with:PHP Code:
while (!$show_display_category->EOF) {
You need to move the call to the news summary module outside of the loop.PHP Code:
<?php
$show_display_category->MoveNext();
} // !EOF
?>
Thanks! worked well!
Hi I'd just want to list news in one page. lets say five latest entrys and then link to previous five entrys. No archives etc. is it possible with this? thanks a lot
or if it cant be done. Can I somehow display just recent news and change the article heading instead of date.
News for Friday 19. Mayta
* test
View all news for Friday 19. Mayta on one page
Recent News
* Monday 08. May
* Monday 01. May
News archive
So that would change in to:
Recent News
* Test (Friday 19. May)
* Test 23 (Monday 08. May)
* test 3030 (Monday 01. May)
*the dates doesnt need to be displayed
Yea i was having the same issue mines set to show 7 days of news but when ever i make a new post my old ones are gone. :(
Quote:
Originally Posted by poosk
No the setting is not to show 7 days of news. It is to show the news summary if there has been news in the past XX [7 by default] days. So if you don't post anything for a week, then the summary will stop showing up. And it only shows for the last news day, only a summary of the top most entry.Quote:
Originally Posted by shackle
If you want something different, you will have to code it. Yes anything is possible, but you have to program it yourself. This is part of what open source is all about. The tools are all there, and the news module code should show you enough to get done what you want done.
If I've gone over your head now, then you will probably not be able to do it yourself, and thus your best course is to hire a programmer to do the programming for you... gee who would have thought there are these professionals called programmers who do programming :wink2: