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?

Database request to display news image

Asked Modified Viewed 80 times
L
Layzee71
L
  • Newbie, joined since
  • Contributed 1 post on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Hello there,

up to last week i only used the V7.2 of PHP-Fusion.
Now I'm about to change to the new Version.
The Problem is, on V7 my theme, especialy the startpage, displays the last 5 news in a little slider with image, subject and date - you can see it here: https://60minuten.net

My code to display the news on my startpage is the follow:
// NEWS SEKTION
 echo '<div class="block block--fullbg block--bgcover bottom-null inset-125 block-bg-11">
 <div class="container">
 <div class="title-wrap text-center">
 <h2 class="h--lg">News</h2>
 </div>';

 // DATENBANK AUSLESEN
 $resultln = dbquery("SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status, news_reads, news_image
 FROM ".DB_NEWS." tn
 LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
 LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
 WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
 AND (news_end='0'||news_end>=".time().") AND news_draft='0'
 GROUP BY news_id
 ORDER BY news_sticky DESC, news_datestamp DESC LIMIT 0,5"
 );

 // GLOBALE VARIABLEN SETZEN
 global $locale, $settings, $aidlink, $data, $dataln, $info, $infoln;

 // AUSGABE DER NEWS
 echo '<div class="row news-slider ini-news-slider-mobile">';
 if (dbrows($resultln)) {
 $i = 0;
while ($dataln= dbarray($resultln)) {
 $subjectln = trimlink(strip_tags(parseubb($dataln['news_subject'])), 60);
 $shortnews = trimlink(strip_tags(parseubb($dataln['news_news'])), 100);

 echo '<div class="col-sm-4 news-item">
 <div class="news-item-inside">
 <a href="'.BASEDIR.'news.php?readmore='.$dataln['news_id'].'" class="news-item-photo">
 <img src="'.IMAGES_N.''.$dataln["news_image"].'" alt="'.$subjectln.'" style="width:370px; height:370px;">
 </a>
 <div class="news-item-date"> '.showdate("%d.%b.%Y", $dataln["news_datestamp"]).'</div>
 <h4 class="news-item-title"><a href="'.BASEDIR.'news.php?readmore='.$dataln['news_id'].'">'.$subjectln.'</a></h4>
 </div>
 </div>';
 }
 }
 echo '</div>
 <!-- <div class="text-center offset-50">
 <h3><a href="'.BASEDIR.'news.php">»Alle Beiträge«</a></h3>
 </div> -->
 </div>
 </div>';


The same theme on V9 can be viewed here: https://60minuten.net/f9/home.php
As you can see, the news images are not visible. I used the same code as above.

What's the right code/database request to show the (correct) news images on my startpage?

Thank's in advance.
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

L
L
  • Newbie, joined since
  • Contributed 1 post on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet