 |
 |
 |
 |
 |
| Author |
Message |
al3loo
Joined: 04 Aug 2007 Posts: 61
|
|
New template with a new division ! |
|
Hello Everybody,
I'm back to make a new template for cutenewsru which contain a news and article that shows with a particular way ..
Lets see the template's style form first:
what should we do is making a table top for the 3 news, then another table with two columns then put the code of news' shape in template ..
this code is sample about what I did:
 |  | <html>
<head>
<title>Untitled Document</title>
</head>
<body>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="130"> </td>
<td width="640"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><? ##### Top 3 News -->
$template = 'header_title';
$number = 3;
$category = $ucat;
include $cutepath.'/show_news.php';
} ?></td>
</tr>
</table>
<? if ($do != 'category' and !$id){ ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"><? ##### Top 3 article from cat 1 -->
$static['template'] = 'template';
$static['number'] = 3;
$static['category'] = 1;
include $cutepath.'/show_news.php';
} ?></td>
<td width="50%"><? ##### Top 3 article from cat 2 -->
$static['template'] = 'template';
$static['number'] = 3;
$static['category'] = 2;
include $cutepath.'/show_news.php';
} ?></td>
</tr>
</table>
<? } ?>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</body>
</html> |
but the problem is the article will show double .. one in the top and the other in its category, so what is the solution for that ?!
and if anyone have any new things to add just share me with ..
Also, If I want to make it a little complex .. so I want to add some headlines title after every category articles what is the best code for that.
The method of the division if you didn't understand me:
I want to add news for any category and the news automatically go and show under its category, and in the top, there are 3 articles. That three articles are the last articles I have add it in any category, and for every new article go to the top the other go down to its category ... I hope you understand me
Best Regards,
AlEloo
|
|
| Sat Jun 07, 2008 7:55 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
al3loo
Joined: 04 Aug 2007 Posts: 61
|
|
|
|
Also, there is a problem with this code:
 |  | <? if ($do != 'category' and !$id){ ?> |
I want the second table of two column not shown in any category or any full news page, just in the home page .. I tried this:
 |  | <? if ($do != 'category' and !$category and !$id){ ?> |
but it didn't work well for me
I hope see someone replying here
|
|
| Sun Jun 08, 2008 7:58 pm |
|
 |
al3loo
Joined: 04 Aug 2007 Posts: 61
|
|
|
|
Hi
I have the solution for the second problem:
 |  | <? if ($do == 'category' or $category != $_GET['category'] or $do != $id) {}
else {
?> |
But, I'm waiting for anyone give me a solution for the double news problem ..
where you are ? FI-DD, scottdallas ?
I want to see your opinion here !
don't leave me like a crazy speak with himself ..
Regards
|
|
| Mon Jun 09, 2008 3:52 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2857 Location: Germany |
|
|
|
Can't you add $skip = 3; to the two columns?
|
|
| Tue Jun 10, 2008 7:20 pm |
|
 |
al3loo
Joined: 04 Aug 2007 Posts: 61
|
|
|
|
Hi
 |  | Can't you add $skip = 3; to the two columns? |
Unfortunately, I can't .. because I have more than one category in that two columns' table, so I don't know which one will need to skip a news from it.
For that, I need a modifying or something like that for making that news analysed ..
|
|
| Tue Jun 10, 2008 11:39 pm |
|
 |
al3loo
Joined: 04 Aug 2007 Posts: 61
|
|
|
|
Up !
I have some questions ..
1. If I want to add a tag containing two input variables how can I make that ? I mean like that:
 |  | <pre name="code" class="$1">$2</pre> |
2. How can I stop replacing "{nl}" to "<br>" not in whole article but just in a tag. Because I put a tag for putting colored code in the post, (here is the script: http://code.google.com/p/syntaxhighlighter/)
the code showing with <br> in it ..
3. If I want to not showing a category and its articles in the cn_archive and cn_category .. - I tried many solutions in this forum but it didn't work- !
4. How can I make the archive shows the articles before the current year with 365 days (year).
Best Regads
|
|
| Thu Jun 12, 2008 8:30 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|