Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Panel with 5 news and first with photo

Asked Modified Viewed 917 times
R
Ramage
R
Ramage 10
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
asked
Junior Member

Hello this panel show last 8 news from definied category, first have news image, but I dont know how to insert thumbs :(
Now is generate empty image....

openside("Ciekawostki");

$id_kategorii = 22;
$result = dbquery("SELECT news_id, news_image, news_news, news_subject FROM ".DB_NEWS." WHERE news_cat='$id_kategorii' ORDER BY news_datestamp DESC LIMIT 0,1");

while ($row = dbarray($result)) {
echo"<table border='0' class='' cellspacing='0' cellpading='0' width='100%'><td width='105px'><a href='".BASEDIR."news.php?readmore=".$row['news_id']."  ' ><img src='".IMAGES_N_T.$row['news_image_t2']."'  width='100px' height='72px' style='margin:0px' align='left' /></a></td>";

echo"</td><td valign='top'><strong><a href='".BASEDIR."news.php?readmore=".($row['news_id'])."' >".trimlink($row['news_subject'], 66)."</a></strong><table cellspacing='0' cellpading='0' border='0' valign='top'><td>";


echo"</table></table><br /><table>";

}
$id_kategorii = 22;
$result = dbquery("SELECT news_id, news_image, news_news, news_subject FROM ".DB_NEWS." WHERE news_cat='$id_kategorii' ORDER BY news_datestamp DESC LIMIT 1,6");

while ($row = dbarray($result)) {
echo"<tr><td valign='top' height='26px'>".THEME_BULLET."<a href='".BASEDIR."news.php?readmore=".($row['news_id'])."' >".trimlink($row['news_subject'], 66)."</a>";
}
echo"</td></table>";

closeside();
0 replies

2 posts

F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

You need to include the rows in the database call first of all.


$result = dbquery("SELECT news_id, news_image, news_news, news_subject FROM ".DB_NEWS." WHERE news_cat='$id_kategorii' ORDER BY news_datestamp DESC LIMIT 0,1");


to

$result = dbquery("SELECT news_id, news_image, news_image_t1, news_image_t2,  news_news, news_subject FROM ".DB_NEWS." WHERE news_cat='$id_kategorii' ORDER BY news_datestamp DESC LIMIT 0,1");


Now you have it in the array, check news codes how to display it. if it is IMAGES_N."xxx etc.
0 replies
R
Ramage
R
Ramage 10
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
answered
Junior Member

THX!
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

F
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
R
R
Ramage 10
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet