We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29988
    • 89 Posts
    Well, after one day of playing with MODx, i’ve made some minor bugfixes that I’ve found, plus some visual changes.

    Please check: http://modx.dotprofit.cz/manager/
    Login admin, password passwd, should be provided.

    Changelog:

    -Merged with MODxGreen, but changed to brown. I don’t like the default fancy OfficeXP-wannabe colors

    -Menu - DHTML call to change (?/?) to numbers (count of messages) excluded if Opera is present - this destroyed the menu, for some reason. Once the setInnerHTML() is called, Opera (9.0 last weekly build) goes shit a little bit

    -Site schedule - repaired translations, many strings were hardcoded into html. English language file changed (lines added).

    -Site summary table - changed typo and css, smaller font, two columns. The tables with borders, that are presented on many places (statistics etc) still need some typo facelifting, imho.

    -Tabs - restylled, better look. Still needs heavy recoding to be XHTML Strict valid...

    -Header - added XHTML header. It is absolute need to do development not in quirk mode, otherwise hours will be wasted.

    -Document tree - not so fancy colors

    AFAIK all for now.

    The question naturally comes, how can I participate on the development, so espec. bugfixes will be taken into account. I do not want to develop my own CMS. Also, it is not very powerfull to post every fix in the forum and wait. If I see a bug in such a great software, I go and fix it.
    • Those are really great changes and I like what you’ve done. Do all the layouts work in the manager with our changes?

      As far as getting the changes in, please feel free to send them to me when you’re done and I can commit them to the main trunk after a bit of testing. One thing you might feel like taking a peek at is the settings tabs and the pop-up tree menu. Neither one of them works worth a squat in Safari.

      Up for the challenge? wink
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 18397
        • 3,250 Posts
        Here are my opinions regarding your changes.
        Quote from: tillda at Mar 14, 2006, 12:15 AM
        Merged with MODxGreen, but changed to brown. I don’t like the default fancy OfficeXPwannabe colors

        The default will be changing very soon--- and it won’t be "OfficeXPwannabe" for sure. As for brown..... I’m not a big fan but that is just me.

        Quote from: tillda at Mar 14, 2006, 12:15 AM
        Menu DHTML call to change (?/?) to numbers (count of messages) excluded if Opera is present this destroyed the menu, for some reason. Once the setInnerHTML() is called, Opera (9.0 last weekly build) goes shit a little bit

        Thanks! If you could provide the code changes you made we’ll test them out.

        Quote from: tillda at Mar 14, 2006, 12:15 AM
        Site schedule repaired translations, many strings were hardcoded into html. English language file changed (lines added).

        Ditto from above.

        Quote from: tillda at Mar 14, 2006, 12:15 AM
        Site summary table changed typo and css, smaller font, two columns. The tables with borders, that are presented on many places (statistics etc) still need some typo facelifting, imho.

        Could you tell us specifically what the typo is? As for the two colums bit when viewing pagedata that is great!
        Quote from: tillda at Mar 14, 2006, 12:15 AM
        Tabs restylled, better look. Still needs heavy recoding to be XHTML Strict valid...

        Nice work on the tabs. You might consider wrapping up your style changes and releasing a "brown" theme.

        Quote from: tillda at Mar 14, 2006, 12:15 AM
        Header: added XHTML header. It is absolute need to do development not in quirk mode, otherwise hours will be wasted.

        Where did you add the XHTML header?

        Quote from: tillda at Mar 14, 2006, 12:15 AM
        Document tree: not so fancy colors

        Could you be more specific about the color changes? I visited your site and do not see any difference in the document tree compared to a stock 0.9.1 install but it may be something on my end.

        Quote from: tillda at Mar 14, 2006, 12:15 AM

        The question naturally comes, how can I participate on the development, so espec. bugfixes will be taken into account. I do not want to develop my own CMS. Also, it is not very powerfull to post every fix in the forum and wait. If I see a bug in such a great software, I go and fix it.

        Bugfixes will be reviewed by the team and fellow forum members and if deemed stable, added to the core. As for "not very powerfull to post every fix in the forum and wait" it actually is. It allows everyone (including the team) to try out the changes and make sure they are stable. Bugs and suggestions should be logged in the bugtracker so that they can be handled appropriately. Thank you very much for your enthusiasm and willingness to assist with this project.
          • 29988
          • 89 Posts
          Hi,

          So, it would be probably best for now to post changes here. The ’typo’, as I write, is a short version of ’typography’ - fonts and their colors. I’m a big fan of clear, stylish text.

          (1) Language improvements
          ==========================


          (A) I’ve put this function in config.inc.php. I put it in this file, ’cos I don’t know where it would be better. Config is probably not the best idea:

          function lang($key) { /* returns translation form $lang array. But if it is not present, returns $key - better than nothing! */
          global $_lang;
          if (isset($_lang[$key])) {
          return $_lang[$key];
          } else return $key;
          }

          You may rewrite it using $_GLOBAL and you will probably know where the proper place for this function is.

          (B) For Site schedule translation, this needs to be appended to englis.inc.php:

          /* Site schedule */
          $_lang["document"] = "Document";
          $_lang["id"] = "ID";
          $_lang["publish_events"] = "Publish events";
          $_lang["unpublish_events"] = "Unpublish events";
          $_lang["all_events"] = "All Event";
          $_lang["no_docs_pending_unpublishing"]="There are no documents pending unpublishing.";
          $_lang["no_docs_pending_publishing"]="There are no documents pending publishing.";
          $_lang["no_docs_pending_pubunpub"]="There are no documents pending publishing or unpublishing.";

          (C) File site_schedule.static.action.php was changed, several lang() calls added. Changed file is in the attachment.

          (D) Please consider leaving_underscore_convention in $_lang[] keys. If it would be like lang("English text goes here") and $_lang["English text goes here"] in the language file, the english developer would be able to write almost-english in the code and with lang() function it would work even if the localization file is not complete.

          (2) XHTML header
          ================

          I’ve added these lines to header.inc.php:

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

          Remember, that DOCTYPE must be on the first line, no enter before that.

          Doing development out of quirk mode is imho absolute must, otherwise it would need heavy recoding when changed to standard mode later.


          (3) After saving translation
          ============================

          Please, in /actions/dynamic, change all

          <td><span class="comment">&nbsp;After saving:</span></td>

          to

          <td><span class="comment">&nbsp;<?=lang("after_saving");?>:</span></td>

          and add $_lang["after_saving"]="After saving"; to english language file.


          (4) Two columns in document info
          ================================

          Due to little bit mess in CSS files, I’m not sure if I can track my changes back correctly.

          So, in document_data.static.action.php, the table is broken into two:

          /* BEGIN CODE */
          
          <table class="docinfotable" style="float:left;margin-right:1em;" width="45%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td colspan="2"><h3><?php echo $_lang["page_data_general"]; ?></h3></td>
            </tr>
          
            <tr>
              <td width="50%" valign="top"><?php echo $_lang["document_title"]; ?>: </td>
              <td><b><?php echo $content['pagetitle']; ?></b></td>
            </tr>
            <tr> 
              <td width="50%" valign="top"><?php echo $_lang["long_title"]; ?>: </td> 
              <td><small><?php echo $content['longtitle']!='' ? $content['longtitle'] : "(<i>".$_lang["notset"]."</i>)" ; ?></small></td>
            </tr>   
            <tr>
              <td valign="top"><?php echo $_lang["document_description"]; ?>: </td>
              <td><?php echo $content['description']!='' ? $content['description'] : "(<i>".$_lang["notset"]."</i>)" ; ?></td>
            </tr>
            <tr>
              <td valign="top"><?php echo $_lang["type"]; ?>: </td>
              <td><?php echo $content['type']=='reference' ? $_lang['weblink'] : $_lang['document'] ; ?></td>
            </tr>
            <tr>
              <td valign="top"><?php echo $_lang["document_alias"]; ?>: </td>
              <td><?php echo $content['alias']!='' ? $content['alias'] : "(<i>".$_lang["notset"]."</i>)" ; ?></td>
            </tr>
              <tr>
              <td valign="top"><?php echo $_lang['keywords']; ?>: </td>
          	<td><?php
          	  	if(count($keywords) != 0) {
          	  		echo join($keywords, ", ");
          	  	} else {
          			echo "(<i>".$_lang['notset']."</i>)";
          		}
          	?></td>
            </tr>
            <tr>
              <td colspan="2"> </td>
            </tr>
            <tr>
              <td colspan="2"><h3><?php echo $_lang["page_data_changes"]; ?></h3></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_created"]; ?>: </td>
              <td><?php echo strftime("%d/%m/%y %H:%M:%S", $content['createdon']+$server_offset_time); ?> (<b><?php echo $createdbyname ?></b>)</td>
            </tr>
          <?php
          if($editedbyname!='') {
          ?>
            <tr>
              <td><?php echo $_lang["page_data_edited"]; ?>: </td>
              <td><?php echo strftime("%d/%m/%y %H:%M:%S", $content['editedon']+$server_offset_time); ?> (<b><?php echo $editedbyname ?></b>)</td>
            </tr>
          <?php
          }
          ?>
          </table>
          
          
          <table class="docinfotable"  style="float:left;margin-left:1em;"  width="45%" border="0" cellspacing="0" cellpadding="0">
          
            <tr>
              <td colspan="2"><h3><?php echo $_lang["page_data_status"]; ?></h3></td>
            </tr>
            <tr>
              <td width="50%"><?php echo $_lang["page_data_status"]; ?>: </td>
          	<td  width="50%"><?php echo $content['published']==0 ? "<b style='color: #821517'>".$_lang['page_data_unpublished']."</b>" : "<b style='color: #006600'>".$_lang['page_data_published']."</b>"; ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_publishdate"]; ?>: </td>
          	<td><?php echo $content['pub_date']==0 ? "(<i>".$_lang["notset"]."</i>)" : strftime("%d-%m-%Y %H:%M:%S", $content['pub_date']); ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_unpublishdate"]; ?>: </td>
          	<td><?php echo $content['unpub_date']==0 ? "(<i>".$_lang["notset"]."</i>)" : strftime("%d-%m-%Y %H:%M:%S", $content['unpub_date']); ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_cacheable"]; ?>: </td>
          	<td><?php echo $content['cacheable']==0 ? $_lang['no'] : $_lang['yes']; ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_searchable"]; ?>: </td>
          	<td><?php echo $content['searchable']==0 ? $_lang['no'] : $_lang['yes']; ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang['document_opt_menu_index']; ?>: </td>
          	<td><?php echo $content['menuindex']; ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang['document_opt_show_menu']; ?>: </td>
          	<td><?php echo $content['hidemenu']==1 ? $_lang['no'] : $_lang['yes']; ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_web_access"]; ?>: </td>
          	<td><?php echo $content['privateweb']==0 ? $_lang['public'] : "<b style='color: #821517'>".$_lang['private']."</b> <img src='media/images/icons/secured.gif' align='absmiddle' width='16' height='16' />"; ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_mgr_access"]; ?>: </td>
          	<td><?php echo $content['privatemgr']==0 ? $_lang['public'] : "<b style='color: #821517'>".$_lang['private']."</b> <img src='media/images/icons/secured.gif' align='absmiddle' width='16' height='16' />"; ?></td>
            </tr>
            <tr>
              <td colspan="2"> </td>
            </tr>
            <tr>
              <td colspan="2"><h3><?php echo $_lang["page_data_markup"]; ?></h3></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_template"]; ?>: </td>
          	<td><?php echo $templatename ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_editor"]; ?>: </td>
          	<td><?php echo $content['richtext']==0 ? $_lang['no'] : $_lang['yes']; ?></td>
            </tr>
            <tr>
              <td><?php echo $_lang["page_data_folder"]; ?>: </td>
          	<td><?php echo $content['isfolder']==0 ? $_lang['no'] : $_lang['yes']; ?></td>
            </tr>
          </table>
          
          
          <div style="clear:both;"> </div>
          
          /* END CODE */
          


          Please note the breaker at the end.

          Now, we need some CSS. I use <h3> for small titles in the table and class docinfotable for the tables.

          h3 {
          margin-bottom:0.3em;
          margin-top:0.5em;
          border-bottom:solid 1px black;
          padding-bottom:0.4em;
          }

          .docinfotable tr td {
          font-size:100%;
          }

          But as I said, I do not know what these standalone changes will produce. I would probably release my own Manager Theme and post changes in .php files.

          (5) Color changes in the tree
          =============================

          There is no green and oragne. Document in menu is black bold, document that is not in menu is just black, no bold.

          (6) Opera-working menu
          ======================

          In frames/scripter.php, change

          elm.setInnerHTML(messagestr);

          to

          if(navigator.userAgent.toLowerCase().indexOf("opera")==-1) elm.setInnerHTML(messagestr);

          (We want to exclude Opera. This is really a strange bug for me. I can’t figure out why setInnerHTML() destroys our menu (little bit, but it looks bad) ).

          (7) Others
          ==========

          > One thing you might feel like taking a peek at is the settings
          > tabs and the pop-up tree menu. Neither one of them works worth
          > a squat in Safari.

          The pop-up tree menu works poorly in Opera 9. It shows up ONLY when I click ON THE ICON with LEFT button (!?!?). As far as Opera is my favourite browser, I did not do anything with this popup menu. I can’t tell you anythig about why it is not working :-(.

          The settings tabs - where exactly does it not work? The problem for me is that i don’t have safari =(.

            • 29988
            • 89 Posts
            One more note, afaik.

            In aprox. 5 files in /actions, there stands:

            <link type="text/css" rel="stylesheet" href="media/style/tabs.css" />

            AFAIK, there should be:

            <link rel="stylesheet" type="text/css" href="media/style/<?php echo $manager_theme ? "$manager_theme/":""; ?>tabs.css<?php echo "?$theme_refresher";?>" />

            If this is an error, please repair it, becouse this makes a big big mess in css files (tabs.css are out of manager theme).
            • Thanks for the notes. Couple of thoughts:

              1) What the heck is the theme refresher anyway? lol I’ve never understood or even seen that used elsewhere.

              2) The document tree probably needs one more state. As it stands now the document can be published and used in menus, published and hidden from menus, and unpublished.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 32241
                • 1,495 Posts
                Sounds nice, one motifated advanced user had joined the community.
                Thanks for the helps, I’m looking forward to work together with you.

                Sincerely,
                  Wendy Novianto
                  [font=Verdana]PT DJAMOER Technology Media
                  [font=Verdana]Xituz Media
                  • 33337
                  • 3,975 Posts
                  I like the new simplified tabs much! but I think it needs some tweaks here and there smiley but I know its initial work and so far I like it!

                  Thanks for all the stuff.

                  Best regards,

                  zi
                    Zaigham R - MODX Professional | Skype | Email | Twitter

                    Digging the interwebs for #MODX gems and bringing it to you. modx.link
                    • 29988
                    • 89 Posts
                    Quote from: rthrash at Mar 14, 2006, 03:33 AM


                    1) What the heck is the theme refresher anyway? lol I’ve never understood or even seen that used elsewhere.


                    I don’t understand a lot - what does "theme refresher" mean?
                    • Maybe it’s related to INCLUDE_ORDERING_ERROR?
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org