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.
Sign In
Not a member yet? Click here to register.

Code In Panel

Is there a way to place this code in a panel.

if (defined('DB_ARTICLES')) {
 $configs[DB_ARTICLES] = [
 'select' => "SELECT
 ar.article_id as id, ar.article_subject as title, ar.article_snippet as content, ar.article_reads as views,
 ar.article_datestamp as datestamp, ac.article_cat_id as cat_id, ac.article_cat_name as cat_name,
 us.user_id, us.user_name, us.user_status
 INNER JOIN ".DB_ARTICLE_CATS." as ac ON ac.article_cat_id = ar.article_cat
 INNER JOIN ".DB_USERS." as us ON us.user_id = ar.article_name
 WHERE ar.article_draft = 0
 AND ".groupaccess('ar.article_visibility')." ".(multilang_table("AR") ? "AND ".in_group('ac.article_cat_language', LANGUAGE) : "")."
 ORDER BY ar.article_datestamp DESC LIMIT ".$limit,
 'locale' => [
 'norecord' => $locale['home_0051'],
 'blockTitle' => $locale['home_0001'],
 'infSettings' => get_settings("articles"),
 'categoryLinkPattern' => INFUSIONS."articles/articles.php?cat_id={cat_id}",
 'contentLinkPattern' => INFUSIONS."articles/articles.php?article_id={id}",

We have latest_articles_panel.
yes we do, but that setup is not what I want. I want to use the exact setup as site content, except in a panel, so I can move it up or down.
Can this be done, and if so, any help would be nice. It is important for my site. Current location is no good.
In previous threads you have been showed how to make a custom panels, the same methods goes for these codes.
Not what I am asking. I have tried to use this in a custom panel. It throws an error. This is part of the code from home.php. Can it be used in a panel.

ORDER BY ar.article_datestamp DESC LIMIT ".$limit,
Line 14 -- 20 seconds ago
Undefined variable: limit

i have tried using <?php and echo
You asked if it can be put in panel, yes it can. You did not ask anything about errors thrown in the panel you added it to. You get answers depending on how the question is shaped. We can´t read minds here wink.

Add to the top or replace $limit variable with your own number in the query.
Ie, $limit = 10;
1. Show me a screenshot of your FTP directory containing..

2. Show me a screenshot of your panel admin selecting "custom_panel" assigning to latest_articles_panel

3. Show me the code in your latest_articles_panel.php.

Which part you have problem, come back and ask what you did and what should be done for each step. Once, done, I'll personally give you the code to what you need.
This is not out of latest articles panel. This is from the site content section in home.php


defined('IN_FUSION') || exit;

if (defined('ARTICLES_EXIST')) {
 include_once INFUSIONS."latest_articles_panel/templates.php";

 $result = dbquery("SELECT a.article_id, a.article_subject, u.user_id, u.user_name, u.user_status, u.user_avatar
 INNER JOIN ".DB_ARTICLE_CATS." AS ac ON a.article_cat=ac.article_cat_id
 LEFT JOIN ".DB_USERS." u ON u.user_id = a.article_name
 WHERE a.article_draft='0' AND ac.article_cat_status='1' AND ".groupaccess("a.article_visibility")." AND ".groupaccess("ac.article_cat_visibility")."
 ".(multilang_table("AR") ? "AND ".in_group('a.article_language', LANGUAGE)." AND ".in_group('ac.article_cat_language', LANGUAGE) : "")."
 ORDER BY a.article_datestamp DESC

 $info = [];

 $info['title'] = $locale['global_030'];
 $info['theme_bullet'] = THEME_BULLET;

 if (dbrows($result)) {
 while ($data = dbarray($result)) {
 $item = [
 'article_url' => INFUSIONS."articles/articles.php?article_id=".$data['article_id'],
 'article_title' => $data['article_subject'],
 'userdata' => [
 'user_id' => $data['user_id'],
 'user_name' => $data['user_name'],
 'user_status' => $data['user_status'],
 'user_avatar' => $data['user_avatar']
 'profile_link' => profile_link($data['user_id'], $data['user_name'], $data['user_status'])

 $info['item'][] = $item;
 } else {
 $info['no_item'] = $locale['global_031'];


hope i got what you asked for
Thread Information
9 posts
132 times
Last Post
Last updated on 1 month ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, Chan, Vyper69, RobiNN