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?

My 2 cents on 9's forums list

Asked Modified Viewed 8,119 times
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
asked
Senior Member

The list would look cleaner if it was a dropdown and not all on 1 page..see what I mean here:

http://www.frackemall.com/nebula/infusions/forum/index.php

Just a thought!
0 replies

17 posts

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

Woah. Run a Custom Template then to your liking. Here is how:

Create a new file in Septenary Theme / Templates folder. Call it custom_forum_item.php.

The code (copied from Forum Infusion/Templates/forum_main.php):


/**
    * Switch between different types of forum list containers
    * @param $data
    * @param $i
    */
   function render_forum_item($data, $i) {
      global $locale;
      if ($i > 0) {
         echo "<div id='forum_".$data['forum_id']."' class='forum-container'>\n";
      } else {
         echo "<div id='forum_".$data['forum_id']."' class='panel panel-default'>\n";
         echo "<div class='panel-body'>\n";
      }
      echo "<div class='pull-left forum-thumbnail'>\n";
      if ($data['forum_image'] && file_exists(FORUM."images/".$data['forum_image'])) {
         echo thumbnail(FORUM."images/".$data['forum_image'], '50px');
      } else {
         echo "<div class='forum-icon'>".$data['forum_icon_lg']."</div>\n";
      }
      echo "</div>\n";
      echo "<div class='overflow-hide'>\n";
      echo "<div class='row m-0'>\n";
      switch ($data['forum_type']) {
         case '3':
            echo "<div class='col-xs-12 col-sm-12'>\n";
            echo "<a class='display-inline-block forum-link' href='".$data['forum_link']['link']."'>".$data['forum_link']['title']."</a>\n<span class='m-l-5'>".$data['forum_new_status']."</span><br/>";
            echo $data['forum_description'] ? "<div class='forum-description'>".$data['forum_description']."</div>\n" : '';
            echo ($data['forum_moderators'] ? "<span class='forum-moderators text-smaller'><strong>".$locale['forum_0007']."</strong>".$data['forum_moderators']."</span>\n" : "")."\n";
            if (isset($data['child'])) {
               echo "<div class='clearfix sub-forum'>\n";
               foreach ($data['child'] as $cdata) { // <---------- THIS IS LOOP ALL CHILD OUT

// CHANGE THIS PART
echo "CHANGE THIS PART";

                  echo "<i class='entypo level-down'></i>\n";
                  echo "<span class='nowrap'>\n";
                  if (isset($cdata['forum_type'])) {
                     echo $data['forum_icon'];
                  }
                        echo "<a href='".INFUSIONS."forum/index.php?viewforum&amp;forum_id=".$cdata['forum_id']."&amp;parent_id=".$cdata['forum_cat']."' class='forum-subforum display-inline-block m-r-10'>".$cdata['forum_name']."</a></span>";

                  echo "<br/>\n";

// END CHANGE;

               }
               echo "</div>\n";
            }
            echo "</div>\n";
            break;
         default:
            echo "<div class='col-xs-12 col-sm-6'>\n";
            echo "
            <a class='display-inline-block forum-link' href='".$data['forum_link']['link']."'>".$data['forum_link']['title']."</a>\n<span class='m-l-5'>".$data['forum_new_status']."</span><br/>";
            echo $data['forum_description'] ? "<div class='forum-description'>".$data['forum_description']."</div>\n" : '';
            echo ($data['forum_moderators'] ? "<span class='forum-moderators text-smaller'><strong>".$locale['forum_0007']."</strong>".$data['forum_moderators']."</span>\n" : "")."\n";
            if (isset($data['child'])) {
               echo "<div class='clearfix sub-forum'>\n";
               echo "<div class='pull-left'>\n";
               echo "<i class='entypo level-down'></i>\n";
               echo "</div>\n";
               echo "<div class='overflow-hide'>\n";
               foreach ($data['child'] as $cdata) {
                  if (isset($cdata['forum_type'])) {
                     echo $data['forum_icon'];
                  }
                        echo "<a href='".INFUSIONS."forum/index.php?viewforum&amp;forum_id=".$cdata['forum_id']."&amp;parent_id=".$cdata['forum_cat']."' class='forum-subforum display-inline-block m-r-10'>".$cdata['forum_name']."</a><br/>";
               }
               echo "</div>\n";
               echo "</div>\n";
            }
            echo "</div>\n";
            echo "<div class='hidden-xs col-sm-3 col-md-2 p-l-0 text-right'>\n";
            echo "<div class='text-lighter count'>".$data['forum_postcount_word']."</div>\n";
            echo "<div class='text-lighter count'>".$data['forum_threadcount_word']."</div>\n";
            echo "</div><div class='forum-lastuser hidden-xs hidden-sm col-md-4'>\n";
            if ($data['forum_lastpostid'] == 0) {
               echo $locale['forum_0005'];
            } else {
               echo "<div class='clearfix'>\n";
               if (!empty($data['last_post']['avatar'])) echo "<div class='pull-left lastpost-avatar m-t-5'>".$data['last_post']['avatar']."</div>";
               echo "<div class='overflow-hide'>\n";
               echo "<span class='forum_profile_link'>".$data['last_post']['profile_link']." ".$data['last_post']['time']."</span>\n";
               echo "<a class='lastpost-goto' href='".$data['last_post']['post_link']."' title='".$data['thread_subject']."'><i class='fa fa-external-link-square'></i></a><br />\n";
               echo fusion_first_words(strip_tags($data['last_post']['message']), 10);
               echo "</div>\n</div>\n";
            }
            echo "</div>\n";
      }
      echo "</div>\n"; // end row
      echo "</div>\n"; // end overflow-hide
      if ($i > 0) {
         echo "</div>\n";
      } else {
         echo "</div>\n</div>\n";
      }
   }


Then, go to theme.php file of Septenary..

Find:

// Declare custom codes functions here
include THEME."templates/custom_news.php";


Include your custom template. Add after the custom_news.php


include THEME."templates/custom_forum_item.php";
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Beauty lies in the eyes of the beholder... you should do whatever you think fit. That's why default ones are only done for "presentation" only.

I'll be always helping everyone out to familiarize with PHPFusion 9.. just ask anyway no matter how trivial the questions are.
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Thank You Chan....Looks like I'm going to have to update the theme, files look different. I've never used github, so here goes.
Edited by daimonbok1 on 30-07-2016 05:25,
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Grabbed all files from github and made the changes, now to upload.... :-):D
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Line 31 of theme.php blew up. Line is:

const THEME_BULLET = "<img src='".THEME."images/bullet.png' class='bullet'  alt='&raquo;' />";


I noticed a period before THEME, is that supposed to be there?
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Uhm, i'm not sure where you're referring to but constant must be echo in enclosed (colon dot) --> ".xxxx."

if there are nothing in front between 2 php codes, no need to add colon dot.

echo THEME."folder/";


If there are something in between 2 php codes, need to add colon dot.


echo "<a href='      ".THEME."/folder/me.gif       '> ". THEME ." </a>";


Except for string:


echo $string; // is ok
echo "I am not a php $string is ok";
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Ok Chan, that did answer my question. I'll reinstall and post the error that I get when I run the theme....
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

The error:

Parse error: syntax error, unexpected '.', expecting ',' or ';' in /hermes/walnaweb14a/b538/pow.daimonbok/htdocs/nebula/themes/Septenary/theme.php on line 35

This is the section of theme.php // Definition of Constant

Below is what's on line 35 of theme.php

const THEME_BULLET = "<img src='".THEME."images/bullet.png' class='bullet' alt='&raquo;' />";
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Rechecked all the code using an online php code checker, found no problems, but theme blows up. Can't figure that out????
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Still can't get it to work....don't know if I need to update some other file in RC3 to stop the errors with the new theme lay out....
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Upgrade your server PHP Version? Latest is 7.0 now
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

I'll send an e-mail to customer service about the problem....don't know if they'll act on it...
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Quote

Upgrade your server PHP Version? Latest is 7.0 now
- by Chan


Are most new functions in 9 going to need php 7?
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

No, they ought to run fine on 5.6 at least minimum.

For the constant error, it's an easy fix, please show me your error logs.
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Ok, added all of this and nothing changed.
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

This is fixed too?
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Quote

This is fixed too?
- by Chan


No, I replied after I uploaded and received no errors, should have checked to see if it accomplished the task before posting, but at least there were no errors...
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 17 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,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
D
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet