Profile
MAJ is an Open Source, PHP-based content management system (CMS) that can be deployed as a blog, bulletin or message board, Internet forum, and wiki. It is extensible via PHP panels and is HTML5 and CSS3 ready.
Git
This commit has been accessed 930 times via Git panel.

commit db3c9f6eb6b8c36372187f2c95b43e502be1cfb0
tree 9b6538ed2c23979fedbba72dd740e2e26a92e8d3
parent 18a29752fa9a2e0a60809fbf717ab43e95c290d4
author Engels Antonio <engels@majcms.org> 1280606868 +0800
committer Engels Antonio <engels@majcms.org> 1280606868 +0800

    Fix custom font size problems introduced by clean-up

diff --git a/css.php b/css.php
index d5321b0..01fd882 100644
--- a/css.php
+++ b/css.php
@@ -144,57 +144,65 @@ a {
 }
 
 a:link {
-       color: #666666;
        <?php
 
-       echo "font-size: $maj_font_Mpx;\n";
-
        if (file_exists("data/colors/link.txt")) {
                $maj_a_link_color = file_get_contents("data/colors/link.txt");
-               echo "\tcolor: $maj_a_link_color;\n";
+               echo "color: $maj_a_link_color;";
+       }
+       else {
+               echo "color: #666666;";
        }
 
+       echo "\n";
+      
        ?>
 }
 
 a:visited {
-       color: #666666;
        <?php
       
-       echo "font-size: $maj_font_Mpx;\n";
-
        if (file_exists("data/colors/vlink.txt")) {
                $maj_a_visited_color = file_get_contents("data/colors/vlink.txt");
-               echo "\tcolor: $maj_a_visited_color;\n";
+               echo "color: $maj_a_visited_color;";
+       }
+       else {
+               echo "color: #666666;";
        }
+      
+       echo "\n";
 
        ?>
 }
 
 a:hover {
-       color: #336699;
        <?php
 
-       echo "font-size: $maj_font_Mpx;\n";
-      
        if (file_exists("data/colors/hover.txt")) {
                $maj_a_hover_color = file_get_contents("data/colors/hover.txt");
-               echo "\tcolor: $maj_a_hover_color;\n";
+               echo "color: $maj_a_hover_color;";
+       }
+       else {
+               echo "color: #336699;";
        }
+      
+       echo "\n";
 
        ?>
 }
 
 a:active {
-       color: #336699;
        <?php
 
-       echo "font-size: $maj_font_Mpx;\n";
-      
        if (file_exists("data/colors/hover.txt")) {
                $maj_a_active_color = file_get_contents("data/colors/hover.txt");
-               echo "\tcolor: $maj_a_active_color;\n";
+               echo "color: $maj_a_active_color;";
        }
+       else {
+               echo "color: #336699;";
+       }
+      
+       echo "\n";
 
        ?>
 }
@@ -353,55 +361,6 @@ a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
        ?>
 }
 
-.input {      
-       width: 300px;
-       color: #666666;
-       background: #ffffff;
-       border: #999999 solid 1px;
-       font-family: arial,helvetica,sans-serif;
-       <?php
-      
-       echo "font-size: $maj_font_Ipx;";
-
-       if (file_exists("data/colors/border.txt")) {
-               $maj_input_color = file_get_contents("data/colors/border.txt");
-               echo "\n\tcolor: $maj_input_color;";
-       }
-
-       if (file_exists("data/colors/border.txt")) {
-               $maj_panel_footer_border_color = file_get_contents("data/colors/border.txt");
-               echo "\n\tborder-color: $maj_panel_footer_border_color;";
-       }
-
-       if (file_exists("data/fonts/input.txt")) {
-               $maj_font_input = file_get_contents("data/fonts/input.txt");
-               echo "\n\tfont-family: $maj_font_input,arial,helvetica,sans-serif;";
-       }
-      
-       echo "\n";
-      
-       ?>
-}
-
-.search {      
-       width: 100%;
-       color: #666666;
-       background: #ffffff;
-       font-family: arial,helvetica,sans-serif;
-       <?php
-      
-       echo "font-size: $maj_font_Mpx;";
-      
-       if (file_exists("data/fonts/input.txt")) {
-               $maj_font_input = file_get_contents("data/fonts/input.txt");
-               echo "\n\tfont-family: $maj_font_input,arial,helvetica,sans-serif;";
-       }
-      
-       echo "\n";
-      
-       ?>                                     
-}
-
 .panel_free {
        padding: 0px;
        margin: 0px;
@@ -484,6 +443,61 @@ a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
        ?>
 }
 
+.input {      
+       width: 300px;
+       color: #666666;
+       background: #ffffff;
+       border: #999999 solid 1px;
+       font-family: arial,helvetica,sans-serif;
+       <?php
+      
+       echo "font-size: $maj_font_Ipx;";
+
+       if (file_exists("data/colors/border.txt")) {
+               $maj_input_color = file_get_contents("data/colors/border.txt");
+               echo "\n\tcolor: $maj_input_color;";
+       }
+
+       if (file_exists("data/colors/border.txt")) {
+               $maj_panel_footer_border_color = file_get_contents("data/colors/border.txt");
+               echo "\n\tborder-color: $maj_panel_footer_border_color;";
+       }
+
+       if (file_exists("data/fonts/input.txt")) {
+               $maj_font_input = file_get_contents("data/fonts/input.txt");
+               echo "\n\tfont-family: $maj_font_input,arial,helvetica,sans-serif;";
+       }
+      
+       echo "\n";
+      
+       ?>
+}
+
+.search {      
+       width: 100%;
+       color: #666666;
+       background: #ffffff;
+       font-family: arial,helvetica,sans-serif;
+       <?php
+      
+       echo "font-size: $maj_font_Mpx;";
+      
+       if (file_exists("data/fonts/input.txt")) {
+               $maj_font_input = file_get_contents("data/fonts/input.txt");
+               echo "\n\tfont-family: $maj_font_input,arial,helvetica,sans-serif;";
+       }
+      
+       ?>                                     
+}
+
+.footer {
+       <?php
+
+       echo "font-size: $maj_font_Spx;\n";
+
+       ?>
+}
+
 <?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
 
 </style>
diff --git a/index.php b/index.php
index 2dd7618..78517f3 100644
--- a/index.php
+++ b/index.php
@@ -2482,7 +2482,7 @@ foreach ($maj_disp as $maj_d) {
                $maj_crypt_passwd = crypt($maj_crypt_passwd,$maj_crypt_passwd);
        }
 
-       echo "<font style=\"font-size: $maj_font_10px; color: #999999;\">";
+       echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
 
        if ((file_exists("data/items/$maj_d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and !file_exists("data/avatar.txt"))))) {
                $maj_xavatar_author = file_get_contents("data/items/$maj_d/author.txt");
@@ -2586,7 +2586,7 @@ foreach ($maj_disp as $maj_d) {
                        }
 
                        foreach ($maj_entry_categories as $maj_filed_under) {
-                               $maj_category_list = $maj_category_list . " | <a href=\"index.php?category=$maj_filed_under\">$maj_filed_under</a>";
+                               $maj_category_list = $maj_category_list . " | <a href=\"index.php?category=$maj_filed_under\" class=\"footer\">$maj_filed_under</a>";
                        }
 
                        echo "<div class=\"panel_category\"";
@@ -2643,7 +2643,7 @@ foreach ($maj_disp as $maj_d) {
        if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in'])) or file_exists("data/items/$maj_d/ucomment.txt")) {
 
                if (!file_exists("data/items/$maj_d/comments/live")) {
-                       echo "<a href=\"index.php?entry=$maj_d&show=comments\">add comment</a>";
+                       echo "<a href=\"index.php?entry=$maj_d&show=comments\" class=\"footer\">add comment</a>";
                }
                else {
                        if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
@@ -2659,7 +2659,7 @@ foreach ($maj_disp as $maj_d) {
 
                        $maj_count_live_comments = count($maj_live_comments);
 
-                       echo "<a href=\"index.php?entry=$maj_d&show=comments\">";
+                       echo "<a href=\"index.php?entry=$maj_d&show=comments\" class=\"footer\">";
 
                        if ($maj_count_live_comments == 1) {
                                echo "$maj_count_live_comments comment";
@@ -2676,7 +2676,7 @@ foreach ($maj_disp as $maj_d) {
                }
        }
        else {
-               echo "<a href=\"index.php?entry=$maj_d\">permalink</a>";
+               echo "<a href=\"index.php?entry=$maj_d\" class=\"footer\">permalink</a>";
        }
 
        if (file_exists("data/items/$maj_d/views.txt")) {
@@ -2711,7 +2711,7 @@ foreach ($maj_disp as $maj_d) {
 
                $maj_album = count($maj_items_album);
 
-               echo " | <a href=\"index.php?entry=$maj_d&show=album\">";
+               echo " | <a href=\"index.php?entry=$maj_d&show=album\" class=\"footer\">";
 
                if ($maj_album == 1) {
                        echo "$maj_album image";
@@ -2776,7 +2776,7 @@ foreach ($maj_disp as $maj_d) {
 
                $maj_filedrop = count($maj_items_filedrop);
 
-               echo " | <a href=\"index.php?entry=$maj_d&show=filedrop\">";
+               echo " | <a href=\"index.php?entry=$maj_d&show=filedrop\" class=\"footer\">";
 
                if ($maj_filedrop == 1) {
                        echo "$maj_filedrop file";
@@ -2826,7 +2826,7 @@ foreach ($maj_disp as $maj_d) {
 
        if (!file_exists("data/nopdf.txt") and file_exists("data/items/$maj_d/pdf/file")) {
 
-               echo "| <a href=\"index.php?entry=$maj_d&show=pdf\">pdf</a> ";
+               echo "| <a href=\"index.php?entry=$maj_d&show=pdf\" class=\"footer\">pdf</a> ";
 
                if (($maj_req_show == pdf) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username))) {
 
@@ -2853,7 +2853,7 @@ foreach ($maj_disp as $maj_d) {
        }
 
        if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in'])) or file_exists("data/items/$maj_d/ucomment.txt")) {
-               echo "| <a href=\"index.php?entry=$maj_d\">permalink</a>";
+               echo "| <a href=\"index.php?entry=$maj_d\" class=\"footer\">permalink</a>";
        }
 
        echo "</div>";
@@ -3655,7 +3655,7 @@ foreach ($maj_disp as $maj_d) {
                                        echo "<td width=598 valign=top>";
                                }
 
-                               echo "<font style=\"font-size: $maj_font_10px; color: #999999;\">";
+                               echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
 
                                if ((file_exists("data/items/$maj_d/comments/live/$maj_comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/comments/live/$maj_comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and !file_exists("data/avatar.txt"))))) {
                                        $maj_cxavatar_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
@@ -3723,11 +3723,11 @@ foreach ($maj_disp as $maj_d) {
                        if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}")))) {
       
                                if (isset($maj_req_show) and !empty($maj_req_show) and isset($_POST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_POST['firstname']) and !empty($_POST['firstname']) and isset($_POST['lastname']) and !empty($_POST['lastname']) and isset($_POST['email']) and !empty($_POST['email']) and isset($_POST['new_comment']) and !empty($_POST['new_comment']) and isset($_POST['captcha_put']) and !empty($_POST['captcha_put']) and ($_REQUEST['captcha_get'] == $_POST['captcha_put']) and (ereg("@",$_POST['email'])) and (ereg("\.",$_POST['email']))) {
-                                       echo "<font style=\"font-size: $maj_font_12px;\"><b>Thanks!</b></font><p>Your comment has been submitted for approval. Please check back soon to see if it has been posted.</p>";
+                                       echo "<font style=\"font-size: $maj_font_Lpx;\"><b>Thanks!</b></font><p>Your comment has been submitted for approval. Please check back soon to see if it has been posted.</p>";
                                }
                        }
 
-                       echo "<font style=\"font-size: $maj_font_12px;\"><b>Add Comment</b></font>";
+                       echo "<font style=\"font-size: $maj_font_Lpx;\"><b>Add Comment</b></font>";
 
                        if (file_exists("data/items/$maj_d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $maj_login_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
                                echo "<p>This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$maj_d&show=comments>here</a> to enter it.</p>";
@@ -4142,7 +4142,7 @@ foreach ($maj_disp as $maj_d) {
                                        echo "<td width=598 valign=top>";
                                }
       
-                               echo "<font style=\"font-size: $maj_font_10px; color: #999999;\">";
+                               echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
       
                                if ((file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_username) and !file_exists("data/avatar.txt"))))) {
                                        $maj_pxavatar_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
@@ -4296,7 +4296,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $maj_login_user
 
                                        echo "<a href=\"index.php?entry=$maj_entry_list_pending_comment_flags&show=comments#pending\">";
                                        readfile("data/items/$maj_entry_list_pending_comment_flags/title.txt");
-                                       echo "</a><br><font style=\"font-size: $maj_font_10px; color: #999999;\">";
+                                       echo "</a><br><font style=\"font-size: $maj_font_Spx; color: #999999;\">";
                                        $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt","r");
                                        $maj_comment_count_value = fread($maj_fp_comment_count_txt,filesize("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt"));
                                        fclose($maj_fp_comment_count_txt);
diff --git a/rel.txt b/rel.txt
index d14d83c..e1e5a87 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201008010223
+201008010354
 
Credits
Sunday, Sep 18, 2005, 12:00 AM (Revision 11 - Thursday, Jul 14, 2011, 7:30 PM)
Open Source enables software developers to stand on the shoulders of giants instead of reinventing the wheel, so to speak. Kudos and many thanks to the folks who made their work freely available for reuse in MAJ.

read more
Bugs and Exploits
Friday, Aug 26, 2005, 12:00 AM (Revision 23 - Wednesday, May 29, 2013, 5:25 AM)
Although MAJ started as a family project, care has been taken to make it as "safe" as possible. With more people now working on MAJ, bugs and exploitable code may sometimes slip in. We invite you to poke around and see if you can find any. Generally, there are two things you can do when you find a MAJ or PHP-related bug or exploit:

1. Take advantage of it. But hey, what's so exciting about messing up someone's blog? Ho-hum, right?
2. Report it here so that we can work on a fix and make MAJ better.

read more
Search
Download
MAJ 2.0
75 files
33164 downloads
MAJ 1.0
26 files
13196 downloads
MAJ 0.14
45 files
35116 downloads