Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 40
SyntaxHighlighte... 47
Newsletters v4.03 106
Facebook Like Box 119
Newsletters v4.02 56
Metro 153
Facebook Connect 163
Shoutbox Panel 123
Redactor for PHP... 103
MI Floating Side... 105
Facebook Login/R... 147
Avatar Studio v2.03 177
Relationship Sta... 96
Sexual Orientati... 113
Fisherman 139
Popular Addons
iTheme2 5794
Arise 5783
User Control v1.23 4612
Event Calendar 4043
Photowidget panel 3881
Radio-Theme red2... 3348
Highslide Gallery 3310
CSS/JavaScript D... 3222
Facebook Connect... 2977
Dynamic Menu 2888
Slideshow Lightb... 2717
L-AMANT 2656
Enigma 2629
2Dark 2603
Black 2567
View Thread
Official Home of PHP-Fusion » General Addon and Modification Support » Themes Support
Who is here? 1 guest(s)
 Print Thread
Guide: 7.01 - 7.02 theme.php changes
Harly
I've made a list of the theme.php changes/additions from v. 7.01 to v. 7.02. So this guide should help you upgrade your 7.01 theme to 7.02, if you want to give it a go yourself!

Notice that this guide only concerns the theme.php, and is covering the basic upgrade of your theme, but I will advice you to also read this thread, here on Main, about the new style CSS options in the 7.02 series:
Guide:: New PHP-Fusion 7.02 Style Classes
Download source  Code

---------------------------------------------------------------------------------------------------------------------------------
>>> 7.01 - 7.02 Theme changes, in theme.php (comparing the old, 7.01, with the new, 7.02 theme.php from the Theme 'Gillette') <<<
---------------------------------------------------------------------------------------------------------------------------------

1) Code change, in function render_page:
----------------------------------------

Ex. old code:
-------------

function render_page($license = false) {
   
   global $settings, $main_style, $locale;


Ex. new code:
-------------

function render_page($license = false) {
   
   global $settings, $main_style, $locale, $mysql_queries_time;

--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------

2) NEW code-addition - Add this, just after the //Footer-code's end, but inside the function render_page code:
--------------------------------------------------------------------------------------------------------------
   
   /*foreach ($mysql_queries_time as $query) {
      echo $query[0]." QUERY: ".$query[1]."<br />";
   }*/

----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------

3) NEW code-addition, function render_comments - Add this, just after the function render_page code's end:
----------------------------------------------------------------------------------------------------------

/* New in v7.02 - render comments */
function render_comments($c_data, $c_info){
   global $locale, $settings;
   opentable($locale['c100']);
   if (!empty($c_data)){
      echo "<div class='comments floatfix'>\n";
         $c_makepagenav = '';
         if ($c_info['c_makepagenav'] !== FALSE) {
         echo $c_makepagenav = "<div style='text-align:center;margin-bottom:5px;'>".$c_info['c_makepagenav']."</div>\n";
      }
         foreach($c_data as $data) {
           $comm_count = "<a href='".FUSION_REQUEST."#c".$data['comment_id']."' id='c".$data['comment_id']."' name='c".$data['comment_id']."'>#".$data['i']."</a>";
         echo "<div class='tbl2 clearfix floatfix'>\n";
         if ($settings['comments_avatar'] == "1") { echo "<span class='comment-avatar'>".$data['user_avatar']."</span>\n"; }
           echo "<span style='float:right' class='comment_actions'>".$comm_count."\n</span>\n";
         echo "<span class='comment-name'>".$data['comment_name']."</span>\n<br />\n";
         echo "<span class='small'>".$data['comment_datestamp']."</span>\n";
   if ($data['edit_dell'] !== false) { echo "<br />\n<span class='comment_actions'>".$data['edit_dell']."\n</span>\n"; }
         echo "</div>\n<div class='tbl1 comment_message'>".$data['comment_message']."</div>\n";
      }
      echo $c_makepagenav;
      if ($c_info['admin_link'] !== FALSE) {
         echo "<div style='float:right' class='comment_admin'>".$c_info['admin_link']."</div>\n";
      }
      echo "</div>\n";
   } else {
      echo $locale['c101']."\n";
   }
   closetable();   
}

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

4) Code change, in function render_news, affecting the news category images:
-----------------------------------------------------------------------------

Ex. old code:
-------------

   echo "<td class='main-body middle-border'>".$news."</td>\n";

Ex. new code:
-------------

   echo "<td class='main-body middle-border'>".$info['cat_image'].$news."</td>\n";

---------------------------------------------------------------------------------------
>>> theme.php changes END! <<<
---------------------------------------------------------------------------------------


------------------------------------------------------------------------
>>> New Footer Copyright code-variation possibilities, in theme.php: <<<
------------------------------------------------------------------------

1) Footer Copyright kode can now be displayed in 1 or 2 lines, and assigned a class:
------------------------------------------------------------------------------------

Usage:

// Default 2 lines
showcopyright()

// Only one line
showcopyright("", true)

Or:

// Only one line
showcopyright($class = "", $nobreak = true)

--------------------------------------------
>>> Footer Copyright code-variation END! <<<
--------------------------------------------




Edited by Harly on 28-12-2011 08:01
Best regards, Harly.
OPEN SOURCE RULES! Cool
 
http://php-fusion.openworld.dk/
Kot
I tried it with Blue4U theme and it worked fine, but the button "Read more" disappeared, only empty box, not clickable Sad
 
Harly
I've just upgraded the D-Blog theme, on one of my sites, like descriped above, and had no problems doing that - it works just fine, so maybe you've made a mistake somehow?

If you want support on the Blue4U theme, please use the support thread for that. Okay?

Besides that, I asked the guys out there for a confirmation on this "theme upgrade guide", if I got it right, and I'm still waiting for that answer - so there's no use following it untill, I get that confirmation! Wink

UPDATE: I've just upgraded the Blue4U theme, following my own guide, and it worked just fine. No errors on the 'Read More' button! So you must have made a mistake when trying to upgrade the theme. So you must try upgrading it, one more time! Wink
Edited by Harly on 27-12-2011 16:45
Best regards, Harly.
OPEN SOURCE RULES! Cool
 
http://php-fusion.openworld.dk/
Kot
I'm sorry for bothering, everything is OK, I just expected something like separate button because in the same line as "read more", "reads" etc. there is a light-blue box on the right that dragged my attention away. That's probably because I got cold just on Christmas and I don't feel very well. Thanks for the great tutorial, I needed it.
 
Harly
No problem mate! Just glad to hear that it worked like it should - the second time around. Wink
And thanks to you, for the feedback. Smile

EDIT: Changed the first post to be more descriptive concerning the Guide, and refering to the new 7.02 style classes as well!
Edited by Harly on 28-12-2011 08:06
Best regards, Harly.
OPEN SOURCE RULES! Cool
 
http://php-fusion.openworld.dk/
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Theme Ddraig Themes Support 3 15-05-2013 19:11
Check theme before setting it Roadmap 1 09-05-2013 15:14
Theme Control Panel Content Administration 2 08-05-2013 13:19
Atom Theme Engine Framework Roadmap 4 04-05-2013 16:53
Possible Theme General Discussion 5 18-04-2013 08:48
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue