Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Themes
Author Message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Fri Jun 29, 2012 3:11 pm Reply with quote

Guy! I tested all themes from Nukecode with Ravennuke 2.5 and unfortunately none of them work. I can not understand why designers do not update their themes. I undestand everybody wants to do their own code and design but how difficult and frustrated could be for people who want to try other themes. I think this is a nice theme, please help me to fix this problem. Sad Sad

This is the theme.php from NC_MidTown, right block goes to the left and mess everything,

Code:
<?php

if (!defined('NUKE_FILE')) die ('You can\'t access this file directly...');

$bgcolor1 = '#FAFAFA';
$bgcolor2 = '#F2F2F2';
$bgcolor3 = '#EFEFEF';
$bgcolor4 = '#FEFEFE';
$textcolor1 = '#000000';
$textcolor2 = '#000000';

// this will switch the blocks on/off in forums.
// true = blocks ON  |  false = blocks OFF
$forums_showblocks = false;

// Choose the Search Bar content:
// Possible Values (case sensitive)
// 'forums'  = Searches forums
// 'news'    = Searches articles
// 'welcome' = Show user welcome message
// ''        = (<- empty single quotes) Show nothing
$theme_search_bar = 'welcome';

function themeheader() {
  global $banners, $sitename, $user, $admin, $module_name, $admin_file;
 
  echo '
  <body>
 
  <div id="wrap">
 
    <div id="header">
      <img alt="" src="themes/NC_MidTown/images/logo.gif" style="float: left; margin-top: 10px;" />
      <ul>
        <li'.((defined('HOME_FILE')) ? ' id="current"' : '').'><a href="index.php"><span>'._HOME.'</span></a></li>
        <li'.(($module_name == 'Downloads') ? ' id="current"' : '').'><a href="modules.php?name=Downloads"><span>'._UDOWNLOADS.'</span></a></li>
        <li'.(($module_name == 'Forums') ? ' id="current"' : '').'><a href="modules.php?name=Forums"><span>'._BBFORUMS.'</span></a></li>
        <li'.(($module_name == 'Your_Account') ? ' id="current"' : '').'><a href="modules.php?name=Your_Account"><span>'._FSIYOURACCOUNT.'</span></a></li>
  ';
  if (is_user($user))
  {
    echo '<li'.(($module_name == 'Your_Account' && $op == 'logout') ? ' id="current"' : '').'><a href="modules.php?name=Your_Account&amp;op=logout"><span>'._LOGOUT.'</span></a></li>';
  }
  if (is_admin($admin))
  {
    echo '<li'.((defined('ADMIN_FILE')) ? ' id="current"' : '').'><a href="'.$admin_file.'.php"><span>'._FSIADMINMENU.'</span></a></li>';
  }
  echo '
      </ul>
    </div>
    <div id="header-logo">
      <div id="logo">Mid<span class="red">Town</span></div>
  ';
 
  global $theme_search_bar;
  switch($theme_search_bar)
  {
    case 'forums':
      echo '
      <form action="modules.php?name=Forums&amp;file=search&amp;mode=results" method="post" class="search">
        <p>
        <input name="search_keywords" class="textbox" type="text" />
        <input type="hidden" name="search_terms" value="any" />
        <input type="hidden" name="show_results" value="topics" />
        <input name="search" class="searchbutton" value="'._SEARCH.'" type="submit" />
        </p>
      </form>
      ';
    break;
   
    case 'news':
      echo '
      <form method="post" class="search" action="modules.php?name=Search">
        <p>
          <input name="query" class="textbox" type="text" />
          <input name="search" class="searchbutton" value="'._SEARCH.'" type="submit" />
        </p>
      </form>
      ';
    break;
   
    case 'welcome':
      echo '
      <script type="text/javascript">
      <!--
     
      function updateClock ( )
      {
        var currentTime = new Date ( );
        var currentHours = currentTime.getHours ( );
        var currentMinutes = currentTime.getMinutes ( );
        var currentSeconds = currentTime.getSeconds ( );
        currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
        currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
        var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
        currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
        currentHours = ( currentHours == 0 ) ? 12 : currentHours;
        var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;
        document.getElementById("header_clock").firstChild.nodeValue = currentTimeString;
      }
     
      function showDate() {
        // Array ofmonth Names
        var monthNames = new Array( "'._JANUARY.'","'._FEBRUARY.'","'._MARCH.'","'._APRIL.'","'._MAY.'","'._JUNE.'","'._JULY.'","'._AUGUST.'","'._SEPTEMBER.'","'._OCTOBER.'","'._NOVEMBER.'","'._DECEMBER.'");
        var now = new Date();
        thisYear = now.getYear();
        if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
        current_day = now.getDate();
        if (current_day.length < 2) {
          check = current_day;
        } else {
          check = current_day;
          if (check >= 20) {
            check = check - 20;
          } else if (check >= 10) {
            //check = check - 10;
          }
        }
       
        var suffix = "";
        if (check == 1) {
          suffix = "st";
        } else if (check == 2) {
          suffix = "nd";
        } else if (check == 3) {
          suffix = "rd";
        } else {
          suffix = "th";
        }
       
        document.getElementById("header_date").innerHTML = monthNames[now.getMonth()] + " " + current_day + suffix + ", " + thisYear;
      }
     
     
      window.onload = function() {showDate(); updateClock(); setInterval(\'updateClock()\', 1000 )}
      // -->
      </script>
      <div class="search">
      <span id="header_date">&nbsp;</span> <span id="header_clock">&nbsp;</span><br />
      ';
      if (is_user($user)) {
        $uinfo = cookiedecode($user);
        echo _BWEL." ".stripslashes($uinfo[1]);
      }
      else
      {
      echo '
        <a href="modules.php?name=Your_Account">'._LOGIN.'</a> '._OR.'
        <a href="modules.php?name=Your_Account&amp;op=new_user">'._BREG.'</a>
      ';
      }
      echo '</div>';
    break;
   
    default:
     
    break;
  }
 
  echo '
    </div>
    <div id="content">
  ';
 
  global $forums_showblocks, $name;
  if ($name == 'Forums' && $forums_showblocks === false)
  {
    echo '<div id="middle_full"><!-- center column -->';
  }
  else
  {
    if(defined('INDEX_FILE')) {
      // right blocks are showing
      echo '<div id="middle"><!-- center column -->';
    }
    else
    {
      // right blocks are NOT showing
      echo '<div id="middle_alt"><!-- center column -->';
    }
  }
}

function themefooter() {
  global $module_name, $forums_showblocks;
  echo '
    </div><!-- end center column -->
  </div><!-- end content -->
  ';
 
  if ($module_name != 'Forums' || $forums_showblocks)
  {
    echo '<div id="left"><!-- left column -->'."\n";
    blocks('l');
    echo "\n".'</div><!-- end left column -->'."\n";
  }
 
  if(defined('INDEX_FILE')) {
    echo '
    <!-- start right column -->
    <div id="right">
      ';
    blocks('r');
    echo '
    </div>
    <!-- end right column -->
    ';
  }
  echo '
  </div>
  <div style="clear: both"></div>
  <div class="footer">
    <p>
      <a href="index.php">'._HOME.'</a> | <a href="modules.php?name=Downloads">'._UDOWNLOADS.'</a> | <a href="modules.php?name=Forums">'._BBFORUMS.'</a> | <a href="modules.php?name=Your_Account">'._FSIYOURACCOUNT.'</a>
    </p>
    Theme by: <a href="http://nukecoder.com/">nukecoder</a>
  ';
  footmsg();
  echo '
  </div>
  ';
}

function OpenTable() {
  echo '<div class="table">'."\n\n";
}

function CloseTable() {
  echo '</div>'."\n\n";
}

function OpenTable2() {
  echo '<div class="table2">'."\n\n";
}

function CloseTable2() {
  echo '</div>'."\n\n";
}

function themesidebox($title, $content) {
  echo '
    <div class="block">
      <div class="block_titlebar"><div>'.$title.'</div></div>
      <div class="block_content">
        '.$content.'
      </div>
    </div>
  ';
}

function themecenterbox($title, $content) {
  echo '
    <div class="centerbox">
      <div class="centerbox_titlebar"><div>'.$title.'</div></div>
      <div class="centerbox_content">
        '.$content.'
      </div>
    </div>
  ';
}

function FormatStory($thetext, $notes, $aid, $informant) {
  global $anonymous;
  $content = '';
  $thetext = '<div>'.$thetext.'</div>';
  if (!empty($notes)) {
    $notes = '<br /><strong>'._NOTE.'</strong>&nbsp;<div>'.$notes.'</div>';
  } else {
    $notes = '';
  }
  if ($aid == $informant) {
    $content = $thetext.$notes;
  } else {
    if(!empty($informant)) {
      global $admin, $user;
      if (is_user($user)||is_admin($admin)) {
        $content = '<a href="modules.php?name=Your_Account&amp;op=userinfo&amp;username='.$informant.'"><i>'.$informant.'</i></a> ';
      } else {
        $content = $informant.' ';
      }
    } else {
        $content = $anonymous.' ';
    }
    $content .= '<em>'._WRITES.':</em>&nbsp;&nbsp;'.$thetext.$notes;
  }
  echo $content;
}

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
  global $anonymous, $tipath;
  echo '
    <div class="article">
      <div class="article_title">
        <h1>'.$title.'</h1>
        <p>'._POSTEDBY.' ';
  formatAidHeader($aid);
  echo ' '._ON.' '.$time.' | '._TOPIC.': <a href="modules.php?name=News&amp;new_topic='.$topic.'">'.$topictext.'</a>
        </p>
      </div>
      <blockquote>
  ';
  FormatStory($thetext, $notes, $aid, $informant);
  echo '
      </blockquote>
      <div class="links">
  ';
  echo substr($morelink, 1, strlen($morelink) - 2); //get rid of the ( ) around the $morelink :)
  echo ' | '. $counter .' '. _READS;
  echo '
      </div>
    </div>
  ';
}

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext, $notes) {
  global $admin, $sid, $tipath;
  echo '
    <div class="article">
      <div class="article_title">
        <h1>'.$title.'</h1>
        <p>'._POSTEDBY.' ';
  formatAidHeader($aid);
  echo ' '._ON.' '.$datetime.' | '._TOPIC.': <a href="modules.php?name=News&amp;new_topic='.$topic.'">'.$topictext.'</a>
        </p>
      </div>
      <blockquote>
  ';
  FormatStory($thetext, $notes, $aid, $informant);
  echo '
      </blockquote>
    </div>
  ';
}
?>
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1775

PostPosted: Sat Jun 30, 2012 7:49 am Reply with quote

unicornio wrote:
I can not understand why designers do not update their themes. I undestand everybody wants to do their own code and design but how difficult and frustrated could be for people who want to try other themes

There are many themes for phpnuke and also many different versions of the CMS. No one succeeds all themes to meet a standard. I work since 2002 with phpnuke and in this year was it the same thing with the themes. The best one is, you get an working theme and rebuild it to your own design thinking.
 
View user's profile Send private message
hicuxunicorniobestbuildpc







PostPosted: Sat Jun 30, 2012 8:22 am Reply with quote

Actually the theme is working properly now but I just want to impletment the nuke navigation. I've been testing lots of theme since I work with phpnuke. Ravennuke, in my eyes is the best CMS out there. The problems are the themes. I want to learn how to make a theme but I do not know what is the best code to be validate it or not. It is difficult. Joomla all themes are almost the same and beautiful. That is why I do want to learn how to make themes for Ravennuke and validated. If someone make a video will be the best ever. I can not understand why so many secrets about how to make a theme for phpnuke. If you look on youtube you can not find any video. It doesn't exist.
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sat Jun 30, 2012 8:36 am Reply with quote

There are no secrets, you can design a theme anyway you want to. You can use an existing theme and modify it like you want to as neralex suggested, or you can make your own following the included themes as examples. If you can't figure out the themes from the included example themes, a video is probably not going to help. The functions in the theme.php are used by various different files in RN to style the site. You can modify those functions to do anything your imagination and a little css can come up with. The content in most of the themes is displayed in divs with related css classes that give the theme it's unique look and feel, but they are all basically doing the same thing.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
neralex







PostPosted: Sat Jun 30, 2012 8:57 am Reply with quote

Yes, there are no secrets. Its pure HTML, CSS and PHP. The nuke theme system is very easy to use. You can create your own header, footer, and blocks in which styles do you want. Try it self, to rebuild an exisiting theme. Work with the css classes and the html markup. This is the best way to learn it.

For the firefox give it two very cool addons:

http://users.skynet.be/mgueury/mozilla/ < easy way to found validation errors
http://getfirebug.com/ < on site live editing of all elements
 
hicuxunicorniobestbuildpc







PostPosted: Sat Jun 30, 2012 4:29 pm Reply with quote

Ok, guys thanks for all your efforts but for me to understand better I think I video tutorial will help me a lot. I don't know why but I learn more when I can see a video. My problem to start rebuilding a theme is the CSS and the design. I don't know how to start? That is why I request from a video tutorial if you have the time. I want to learn how to make a beautiful CSS Validated Theme. I love the way RickTido has been made but I do not like the colors and the design but I love how this guy made this theme and all the stuff he had been made for Ravennuke. Amazing and terrific brain!! Shocked
 
nuken







PostPosted: Sat Jun 30, 2012 4:50 pm Reply with quote

I suggest you google basic css and html videos. Most of the theme.php files have what the functions do documented already. There is no one way to make a theme. Variables enclosed in divs with css classes defined in the style.css.
 
nuken







PostPosted: Sat Jun 30, 2012 4:59 pm Reply with quote

Also, I did the RickTido theme. The way it looks is controlled 99% by the css file. The size, colors, text, etc. can all be changed by modifying the style.css using basic css. Only a few images are coded in the theme.php and they are all basic html.
 
hicuxunicorniobestbuildpc







PostPosted: Sat Jun 30, 2012 6:28 pm Reply with quote

So you did the RickTido themes? Wow, I can believe my eyes! I checked your themes and these codes should be the future for Ravennuke's themes. perfect but the desing. I just spent some time to make an example what I would like to see in Ravennuke's future. I will create a new topic.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Themes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©