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?

Blog, add related articles

Asked Modified Viewed 1,038 times
K
Kvido
K
Kvido 10
Linux-Ubuntu 09.03.60, Linux/Ubuntu, PHP5, HTML5, Mozilla-Firefox 3.6.3, Opera 10.51, IE 8.0.6
https://www.nekecamweb.cz
  • Senior Member, joined since
  • Contributed 524 posts on the community forums.
  • Started 108 threads in the forums
  • Started this discussions
asked
Senior Member

I think that for more comfort in the category Blog (from RobiNN) and also Articles (from Falk) it would be appropriate to place a short list of related articles below the article.
Under the articles Blog I have this and it works in total:


echo '<div class="well text-center m-t-10 m-b-0">';
openside("Politika - související články");
 
 $related_blog = dbquery("SELECT * FROM ".DB_BLOG."
 WHERE ".groupaccess('blog_visibility')."
 AND (blog_start='0'||blog_start<=".time().")
 AND (blog_end='0'||blog_end>=".time().")
 AND blog_draft='0'
 AND blog_cat='".stripinput($data['blog_cat'])."'
 AND blog_id !='".stripinput($_GET['readmore'])."'
 ORDER BY RAND()
 DESC LIMIT 0,6");

 echo"<div style='margin-left:20px; margin-right:auto;' class='tbl-border'>";
 if (dbrows($related_blog)) {
 $i = 0;
 while ($related_blog_data = dbarray($related_blog)) {
 $row_color = ($i % 2 == 0 ? "tbl1" : "tbl2");
 $subject = trimlink(strip_tags(parseubb($related_blog_data['blog_subject'])), 80);
 echo "<div class='$row_color'><a href='".INFUSIONS."/blog/blog.php?readmore=".$related_blog_data['blog_id']."'>".$subject."</a><div style='float: left; padding-right: 40px;'>".showdate("%d.%m.%Y %H:%M", $related_blog_data['blog_datestamp'])."</div>n</div>n";
 $i++;
 }
 }else{
 echo"<div style='text-align: center;'>Není žádný související článek Politika!</div>n";
 }
 echo"</div></div>n";
closeside();


Can I agree with that?
Sample here under the article:
https://nekecamweb.cz/blog/2816/koali...-rozpadne?
Edited by Kvido on 21-12-2021 12:55,
0 replies

1 post

N
ntn
N
ntn 10
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 8 threads in the forums
answered
Junior Member

so great!!!
0 replies

Labels

Statistics

  • Views 0 views
  • Posts 1 post
  • Votes 0 votes
  • Topic users 2 members

2 participants

K
K
Kvido 10
Linux-Ubuntu 09.03.60, Linux/Ubuntu, PHP5, HTML5, Mozilla-Firefox 3.6.3, Opera 10.51, IE 8.0.6
https://www.nekecamweb.cz
  • Senior Member, joined since
  • Contributed 524 posts on the community forums.
  • Started 108 threads in the forums
  • Started this discussions
N
N
ntn 10
  • Junior Member, joined since
  • Contributed 19 posts on the community forums.
  • Started 8 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet