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 Each category has exclusive template?
1 2
Corneliusw
Posted on 29 Oct 2008, 07:48:04

Access: Member
Total Posts: 16
Joined: 2008-10-15

I wanted to know if it was possible for each category to have a different template for how the news appears on website.

Great script btw. Was always interested in but didn't know what features it had until I installed. 10x better than the very old one I was using, but I never switch out because it fit my needs but yours has more features.
#467
Joostthehost
Posted on 29 Oct 2008, 11:06:12

Access: Member
Total Posts: 10
Joined: 2008-10-21

Quote:
I wanted to know if it was possible for each category to have a different template for how the news appears on website.

It is possible to specify a template for a specific category on 'include', and it will look like this (always put the line that says 'include' below your other specifications!):
Code:

<?php 
$template 
= 'Template1'; 
#if specified this template will be used, if not the default will be used
$cat = 'category1'; 
#if specified this category will be used, if any posts that have not been assigned a category will be displayed
#you can also show all categories by using $cat = 'all';
include 'path/to/news/index.php'; #example 'news/index.php';
?> 



You could also use the option below to specify wich autor's articles to show:
Code:

$author = 'Chris'; 
#if specified then only articles for this author will be shown
#468
Corneliusw
Posted on 29 Oct 2008, 17:02:33

Access: Member
Total Posts: 16
Joined: 2008-10-15

Well what I am asking for is a little more advance. The script I was using had the feature to where I can have an exclusive template for each category, and I can display all categories on the page with each article showing their unique template when you click on them.

Let me give example. I own a MMA website and I have categories (UFC, HDNet Fights, PRIDE, etc). I want to assign a unique template to each category for the full article. I also want to display all articles from those categories on main page and have short news displayed which will link to the full article. The short news will look the same, just the full article needs to look different.
#470
Joostthehost
Posted on 30 Oct 2008, 10:54:08

Access: Member
Total Posts: 10
Joined: 2008-10-21

Quote:
Let me give example. I want to assign a unique template to each category for the full article. I also want to display all articles from those categories on main page and have short news displayed which will link to the full article. The short news will look the same, just the full article needs to look different.

In the current version of N-13 news; i believe that's impossible. You could solve your problem by using two different CSS-styles (one used by the main page, and another used on the page where you're displaying the full article.
#474
Last edited by Joostthehost at 2008-10-30 10:57:41 Reason:
Cow
Posted on 30 Mar 2010, 23:24:07

Access: Member
Total Posts: 18
Joined: 2010-03-30

HI,

I use the template PLAIN STYLE, but when viewing on my index.php page, it displays the correct titles, but no link. Can we post links on the titles of news?

on my nouvelles.php i use the AJAX 3.4 TEMPLATE.

Is it possible to connect the links of my index.php page with the PLAIN STYLE template on my page evenement.php with 3.4 ajax template?

Thank you very much


sorry for my english
#2168
Chris
Posted on 30 Mar 2010, 23:34:24

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

If you edit the PLAIN STYLE template, edit the 'news' section and change it to looks like this

Code:
<a href="nouvelles.php?id={id}">{title}</a><br />


This will make the titles into hyperlinks which will send the user to nouvelles.php to view the full news article.
#2169
Cow
Posted on 30 Mar 2010, 23:42:00

Access: Member
Total Posts: 18
Joined: 2010-03-30

Working :) thank Chris

can i remove the line under the link ? and when i want to click on the link, i show the line under the link ? it is possible ?
#2170
Last edited by Cow at 2010-03-30 23:52:02 Reason:
Chris
Posted on 31 Mar 2010, 00:07:57

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

Try this

Code:
<style>
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
<a href="nouvelles.php?id={id}">{title}</a><br /> 
#2171
Last edited by Chris at 2010-03-31 00:08:34 Reason:
Cow
Posted on 31 Mar 2010, 00:16:00

Access: Member
Total Posts: 18
Joined: 2010-03-30

heheh thx Chris,

exellent :)

last question please ....

can i remove (1,2 NEXT) for change the pages, because, i would like to show only 8 news

thx

i include this code on my index.php

<?php
$author = 'al';
$template = 'Plain style';
#if specified this template will be used, if not the default will be used
$cat = 'Nouvelles';
#if specified this category will be used, if any posts that have not been assigned a category will be displayed
#you can also show all categories by using $cat = 'all';
include '../news/index.php'; #example 'news/index.php';
?>

normaly, it's showing only Nouvelles category ????

He's showing 2 category :(
#2172
Last edited by Cow at 2010-03-31 00:20:38 Reason:
Chris
Posted on 31 Mar 2010, 00:25:41

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

To remove the "1,2 NEXT", edit the template you're using and expand the "News Structure" section, delete the {newspagintation} tag.

That code is old. Use this intead

Code:
<?php
$author 
= 'al';
$template = "Plain style";
$cat[] = "Nouvelles";
include 
'../news/index.php';
?>
#2173
1 2
Network-13.com © 2013