Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Multiple news post on the same page
Rschneider
Posted on 03 Mar 2010, 05:32:19

Access: Member
Total Posts: 15
Joined: 2010-03-03

Hi there,

First of all I would like to thank you for a really great script.

What I'm trying to accomplish, is to have my news to show on 2 different boxes in my page. First one showing in a box to the left, and second on the box to the right (basically changing the orientation of my page from top to bottom, to left to right).

I appreciate any help, and once again thanks for the amazing script.
#1983
Chris
Posted on 03 Mar 2010, 15:58:50

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

You could achieve this by doing multiple includes on the same page. Have a look at this page for instructions on how to do that.
#1992
Rschneider
Posted on 03 Mar 2010, 19:44:39

Access: Member
Total Posts: 15
Joined: 2010-03-03

When I try to do the static include (I just copy and paste your example code into an empty html file, using my news), it actually gives me all news on both sides of the table.
Instead, I would like to have the latest news showing on the left box, and the "second latest" showing on the right box.

I will upload an example of what I want, and what I'm getting on a page and upload really fast so it's easier to understand.

ok, here is the test page for the script:

http://www.agat.com.br/test_news.php

Thanks for the help so far.
#2007
Chris
Posted on 03 Mar 2010, 23:15:53

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Edit the template you're currently using, expand the "News Structure" section, by default it looks like this

Code:
{news}
{pagintation}


change it to

Code:
<table><tr>
{news}
</tr></table>


Then expand the "News" section and place a <td> at the beginning and </td> at the end so for example

Code:
<td>
{title}... the rest of your template here
</td>


And save. This should give you the layout you want.
#2008
Rschneider
Posted on 04 Mar 2010, 16:50:40

Access: Member
Total Posts: 15
Joined: 2010-03-03

Thanks Chris, but I have done that.

Even though it works if I'm using adjacent cells on a table, it doesn't when I'm trying to add it on a more complex layout. For instance, the cells I'm trying to add the news are not adjacent.

I guess my question is: is there a way to use a include, and tell it to ignore the latest new, and show only the second? This way I could do a normal include on the first box, and a second include on the other box, but hiding the latest new.

I appreciate your help
#2015
Chris
Posted on 05 Mar 2010, 15:00:57

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I made a small change to index.php which will allow you to specify which article you want to start from, for example if you have 2 includes on your page like so

Code:
<?php
include 'news/index.php';
?>

<hr />

<?php
include 'news/index.php';
?>


Both these includes will show the same news articles, but if you use the $start variable like so

Code:
<?php
include 'news/index.php';
?>

<hr />

<?php
$start 
= 1;
include 
'news/index.php';
?>


The second include will skip the first news article (news articles start at 0) and show news starting from the second.

Download this file and replace your own copy of index.php
#2018
Rschneider
Posted on 05 Mar 2010, 20:20:49

Access: Member
Total Posts: 15
Joined: 2010-03-03

Bro, you are amazing. Thanks a lot!!

I don't want to start a new topic, so I gonna make a quick question here. Is there a way I can make the news title to be the page title?
I'm making my "read more" link, to open a new page with only the news people clicked, and wanted to make that page use the News title as the page title. Simple way to do that?

thanks
#2048
Chris
Posted on 05 Mar 2010, 20:52:08

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

See here
#2049
Jkyr
Posted on 15 Jul 2010, 18:04:11

Access: Member
Total Posts: 5
Joined: 2010-07-13

Quote:
I made a small change to index.php which will allow you to specify which article you want to start from, for example if you have 2 includes on your page like so

Code:
<?php
include 'news/index.php';
?>

<hr />

<?php
include 'news/index.php';
?>


Both these includes will show the same news articles, but if you use the $start variable like so

Code:
<?php
include 'news/index.php';
?>

<hr />

<?php
$start 
= 1;
include 
'news/index.php';
?>


The second include will skip the first news article (news articles start at 0) and show news starting from the second.

Download this file and replace your own copy of index.php






In version 3.7 what changes needed to begin the second news article?
#2700
Jkyr
Posted on 16 Jul 2010, 22:15:23

Access: Member
Total Posts: 5
Joined: 2010-07-13

The parameter $start = 1; does not work in version 3.7
#2707
Network-13.com © 2013