Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
New template with a new division !

 
Reply to topic    Forum Index » Help View previous topic
View next topic
New template with a new division !
Author Message
al3loo



Joined: 04 Aug 2007
Posts: 61

Post New template with a new division ! Reply with quote
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:
Code:
<html>
<head>
<title>Untitled Document</title>
</head>

<body>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td width="130">&nbsp;</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">&nbsp;</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 ?!
Wink 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 Razz ... I hope you understand me Rolling Eyes


Best Regards,
AlEloo
Sat Jun 07, 2008 7:55 pm View user's profile Send private message
Guest








Please login to hide the ads.

al3loo



Joined: 04 Aug 2007
Posts: 61

Post Reply with quote
Also, there is a problem with this code:

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:
Code:
<? if ($do != 'category' and !$category and !$id){ ?>


but it didn't work well for me Exclamation Question




I hope see someone replying here Rolling Eyes

Sun Jun 08, 2008 7:58 pm View user's profile Send private message
al3loo



Joined: 04 Aug 2007
Posts: 61

Post Reply with quote
Hi

I have the solution for the second problem:
Code:
<? 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 ?
Wink I want to see your opinion here !
Mr. Green don't leave me like a crazy speak with himself ..



Regards
Mon Jun 09, 2008 3:52 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
Can't you add $skip = 3; to the two columns?
Tue Jun 10, 2008 7:20 pm View user's profile Send private message
al3loo



Joined: 04 Aug 2007
Posts: 61

Post Reply with quote
Hi Very Happy

Quote:
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 View user's profile Send private message
al3loo



Joined: 04 Aug 2007
Posts: 61

Post Reply with quote
Embarassed Up !

I have some questions .. Rolling Eyes

1. If I want to add a tag containing two input variables how can I make that ? I mean like that:

Code:
<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).




Wink Best Regads
Thu Jun 12, 2008 8:30 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
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



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.