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?

Adding panel into the theme code.

Asked Modified Viewed 1,790 times
L
lpanic
L
lpanic 10
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

Hello,

Sorry if topic like this already exist. I was looking for that on this forum for about 2hours and nothing.

I want to ask how to add panel into the theme code. For example if i want to add infusion : "forum_threads_panel.php" somewhere into the theme code, how should i do it?

I know where in theme code should i put it. Problem is that i dont know how.

cheers.
0 replies

5 posts

C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

You are right. This question never raised before. You are the first one.

Our panels are divided into few position. LEFT, RIGHT, CONTENT. (Indestructible super global constant).

Have your panels added. Then, echo LEFT to list out all panels added to the left side in admin panel panel management there. You can exclude and include to filter them so only a selected will display on a certain page.
0 replies
L
lpanic
L
lpanic 10
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Im sorry but i still dont have idea how to. xD

Can you give me example ?

I've tryied to take code of "forum_threads_panel.php"
if (!defined("IN_FUSION")) { die("Access Denied"); }



openside($locale['global_020']);

echo "<div class='side-label'><strong>".$locale['global_021']."</strong></div>\n";

$result = dbquery("

   SELECT tt.forum_id, tt.thread_id, tt.thread_subject, tt.thread_lastpost FROM ".DB_THREADS." tt

   INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id

   WHERE ".groupaccess('tf.forum_access')." AND tt.thread_hidden='0'

   ORDER BY thread_lastpost DESC LIMIT 5

");

if (dbrows($result)) {

   while($data = dbarray($result)) {

      $itemsubject = trimlink($data['thread_subject'], 23);

      echo THEME_BULLET." <a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side'>$itemsubject</a><br />\n";

   }

} else {

   echo "<div style='text-align:center'>".$locale['global_023']."</div>\n";

}

echo "<div class='side-label'><strong>".$locale['global_022']."</strong></div>\n";



$timeframe = ($settings['popular_threads_timeframe'] != 0 ? "thread_lastpost >= ".(time()-$settings['popular_threads_timeframe']) : "");

list($min_posts) = dbarraynum(dbquery("SELECT thread_postcount FROM ".DB_THREADS.($timeframe ? " WHERE ".$timeframe : "")." ORDER BY thread_postcount DESC LIMIT 4,1"));

$timeframe = ($timeframe ? " AND tt.".$timeframe : "");



$result = dbquery("

   SELECT tf.forum_id, tt.thread_id, tt.thread_subject, tt.thread_postcount

   FROM ".DB_FORUMS." tf

   INNER JOIN ".DB_THREADS." tt USING(forum_id)

   WHERE ".groupaccess('tf.forum_access')." AND tt.thread_postcount >= '".$min_posts."'".$timeframe." AND tt.thread_hidden='0'

   ORDER BY thread_postcount DESC, thread_lastpost DESC LIMIT 5

");

if (dbrows($result) != 0) {

   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";

   while($data = dbarray($result)) {

      $itemsubject = trimlink($data['thread_subject'], 20);

      echo "<tr>\n<td class='side-small'>".THEME_BULLET." <a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side'>$itemsubject</a></td>\n";

      echo "<td align='right' class='side-small'>[".($data['thread_postcount'] - 1)."]</td>\n</tr>\n";

   }

   echo "</table>\n";

} else {

   echo "<div style='text-align:center'>".$locale['global_023']."</div>\n";

}

closeside();

?>


And put it into theme code. I know its wrong but i forgot code to include it right.

Theme name is cveu-easy (easy)

In attachment you can see where i want to put it.
lpanic attached the following file:
problem_1.png [No information available / 47 Downloads]
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Would a :


require_once INFUSIONS."forum_threads_panel/forum_threads_panel.php";


Work?
0 replies
L
lpanic
L
lpanic 10
  • Newbie, joined since
  • Contributed 3 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Yes its working :)

Thats the code i was looking for. Thank you.
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Welcome.
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

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

2 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
L
L
lpanic 10
  • Newbie, joined since
  • Contributed 3 posts 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