General Community > WebsiteBaker Website Showcase
My website
mr-fan:
ok no problem... you will get it qiuck and and have a better solution!
you shoult look at this codesnippet:
http://www.websitebakers.com/pages/code-snippets/listings/anynews.php
this is the ultimate anynewssnippet.... 8-)
you can modify everything and can use this snippet in your template instead of this code
--- Code: --- <?php ob_start(); // start output buffer
global $database;
$query = "SELECT post_id,title,content_short,group_id,link FROM ".TABLE_PREFIX."mod_news_posts ORDER BY position DESC LIMIT 0,3";
$error = mysql_error();
if (!$result = mysql_query($query)) {
print "$error";
exit;
}
while($data = mysql_fetch_object($result)){
$title = $data->title;
$id = $data->post_id;
$link = $data->link;
$short = $data->content_short;
echo '<p><a href="'.WB_URL.'/pages/'.$link.PAGE_EXTENSION.'">'.$title.'</a><br />'.$short.'</p>';
}
$foo=ob_get_contents(); // put outputbuffer in $foo
ob_end_clean(); // clear outputbuffer
if ($foo<>"") { // some code to execute cause there is some block
echo '<h1>Latest News</h1>';
echo $foo;
} else { // some code for no info
echo '<h1>No New News</h1>';
}
?>
--- End code ---
use the # button next time...
install the module and replace with something like this...
--- Code: ---<?php display_news_items(0, 5, 50, 2,
'The latest news', 'show full news text', 'uups, no news available',
true, '<a><img>', true, ' (h:i, d.m.Y)', 1, 1); ?>
--- End code ---
the setting of the snippet you can read there:
http://addons.WebsiteBaker.org/modules/anynews/help/help_en.html
you can set the newsgroup if you have some - or you can set the leght of the shortnews or if you don't like the short news you can set it up that you will get only the headers...
if you have different newsgroups (maby webdesign/print....) also you can play with the blogmenu (its a little modified anynewsnippet that shows up a newsgroup overview...)
this snippet you will find here:
http://www.websitebakers.com/pages/code-snippets/listings/blog-menu.php
so it's time to play if you have problems i will help!
regards martin
albatros:
Hi,
the first thing I saw was "hgpgroup.jpg" (2592px × 3888px scaled to 100px × 150px, 428.29 KB). That's not really so very good looking.
Apart from that I like it very much.
Best regards
Uwe
Argos:
Took a quick glance at it. Nice fresh design, clear layout. Nice job!
caz1963:
Thank you all for your nice comments. Martin I will try out the news snippets and let you know how I get on. Thank you so much for your help! Much appreciated.
Caroline
Navigation
[0] Message Index
[*] Previous page
Go to full version