Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 11:25:36 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155473 Posts in 21708 Topics by 7734 Members
Latest Member: rofroodoOvego
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: News item help  (Read 1116 times)
applepie

Offline Offline

Posts: 342


« on: December 10, 2008, 12:26:51 PM »

Hi, how do I get the news item to show the title and the short description only?This is the code on my index file:

<?php display_news_items(0, 8, 50, 2,
  ' News', 'show full news text', 'uups, no news available',
  true, '<a><img>', false, ' (h:i, d.m.Y)'); ?>

Thanks.
Logged
erpe

Offline Offline

Posts: 2077


WWW
« Reply #1 on: December 10, 2008, 05:20:04 PM »

Please have a look at the anynews help file

rgds

erpe
Logged

applepie

Offline Offline

Posts: 342


« Reply #2 on: December 10, 2008, 05:47:21 PM »

Please have a look at the anynews help file

Ok, i know I havent done it right. My page came out blank when I tried to change the codes on my index file. Grr... do you mind pasting the right code here? Thanks.
Logged
erpe

Offline Offline

Posts: 2077


WWW
« Reply #3 on: December 10, 2008, 07:07:21 PM »

It is not a matter of code but a matter of css.
Read the help me file.
Look at your html code output.
Wrap the code in a div or class and then format this in the css file for example:

Code:
.news hr {display:none;}
.news a {display:none;}

rgds

erpe
Logged

applepie

Offline Offline

Posts: 342


« Reply #4 on: December 11, 2008, 01:10:42 AM »

It is not a matter of code but a matter of css.
Read the help me file.
Look at your html code output.
Wrap the code in a div or class and then format this in the css file for example:

Code:
.news hr {display:none;}
.news a {display:none;}

Ok, maybe I am think. Hands up. The help file mentioned code page. I am not sure what code page or code module the author is referring to.
Logged
erpe

Offline Offline

Posts: 2077


WWW
« Reply #5 on: December 11, 2008, 09:05:08 AM »

Quote
<?php display_news_items(0, 8, 50, 2,
  ' News', 'show full news text', 'uups, no news available',
  true, '<a><img>', false, ' (h:i, d.m.Y)'); ?>

You can place the above code in your index.php at the place, where you want the news items to be shown, so your code must be
Code:
<div id="news"><?php display_news_items(08502,
  
' News''show full news text''uups, no news available',
  
true'<a><img>'false' (h:i, d.m.Y)'); ?>
</div>
or you can put the code (on top of this post) in a page or section "code" or "code2" in your backend to get the news displayed.

Hope this helps.

rgds

erpe
Logged

applepie

Offline Offline

Posts: 342


« Reply #6 on: December 11, 2008, 05:17:01 PM »

Quote
<?php display_news_items(0, 8, 50, 2,
  ' News', 'show full news text', 'uups, no news available',
  true, '<a><img>', false, ' (h:i, d.m.Y)'); ?>

You can place the above code in your index.php at the place, where you want the news items to be shown, so your code must be
Code:
<div id="news"><?php display_news_items(08502,
  
' News''show full news text''uups, no news available',
  
true'<a><img>'false' (h:i, d.m.Y)'); ?>
</div>
or you can put the code (on top of this post) in a page or section "code" or "code2" in your backend to get the news displayed.

Hi, I dont see the difference what I have done. The news is showing fine. All I want to do is to show the title and short description of the news on my home. At the memont it is showing the titles of my news only. Does that make sense? I odnt undestand what you mean by Code or Code2. What are you referring to? The index page which the news code? huh
Logged
vyni

Offline Offline

Posts: 566


« Reply #7 on: December 12, 2008, 12:36:12 AM »

Hi there,

Your mistake lies in Your call

display_news_items(0, 8, 50, 2,......  will show a list only
display_news_items(0, 8, 50, 1,......  will show details with title, description and link

that´s the reason.

regards from Himberg, still near Vienna
Logged

PS: Falls jemand eine Idee hat was zu tun ist und mir das erklären könnt - geh bitte davon aus dass ich ahnungslos bin, was php und so betrifft. Ich kann grad was lesen, kopieren und einfügen,  ungefähr verfolgen und glauben.
applepie

Offline Offline

Posts: 342


« Reply #8 on: December 16, 2008, 10:59:23 PM »

Hi there,

Your mistake lies in Your call
Thanks, mate. You have been very helpful.
Cheers Wink
Logged
applepie

Offline Offline

Posts: 342


« Reply #9 on: December 19, 2008, 02:30:42 PM »

Vyni have been really helpful and helped me to resolved most of my problem. This is another question I have. Can someone show me how can I replaced <hr> with dotted lines? My news item is separated by <hr> and I would like to replace it with dotted lines, eg:

#news a:hover {color:red;}
#news h2 {margin-bottom: 10px; font-size: 1.2em; font-weight: bold;}
#news hr {margin-top:-10px; margin-bottom:10px; color:#666666;}

Thanks.
Logged
applepie

Offline Offline

Posts: 342


« Reply #10 on: December 19, 2008, 10:00:37 PM »

Hello, is the anybody out there? No one knows the answer?
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #11 on: December 20, 2008, 09:29:36 AM »

You can style it via CSS, you could even give it a backgroundimage ...

http://www.sovavsiti.cz/css/hr.html

cheers

Klaus

Hello, is the anybody out there? No one knows the answer?
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!