CornerPixel Blog RSS 2.0

# Wednesday, September 09, 2009

Today I was trying to change how the Table of Contents drop down menu worked in MindTouch Core.

The drop down menu is dynamically created as a list of headers on the page.  For example if your page has an h1 header of Hello and an h2 header of You, the drop down menu would be.
1. Hello
    1.1 You

mindtouch-toc

As you see above, “Hello” and “You” are both links to their respective header on the page.

This is great for wiki's, but for the intranet site I am working on, we are using the headers manly for design this could be a problem.  For example, it is not uncommon to have an h2 of “Hello” and an h5 of “You” because the odd numbered headers I have styled with a yellow background, but I still want it to appear under the h2 in the Table of Contents. 

So in the above example the TOC will display like this.
1. Hello               <--h2
    1.1.1 You        <--h5

This is confusing for my users so I wanted this.
Hello
    You

Notice that it is still a list, but there is no number structure.

I looked at the markup via Firebug (in Firefox) and found that this should be easy.  The numbers I wanted to remove where in a span.  (i.e. <span>1.1</span> and the span was in a <li> inside of div with a class of pageToc.

Figuring this would be easy, I just added this to CSS.

.pageToc li {
    display: none;
    }

After adding this to the CSS it worked GREAT in Firefox, but not so well in IE 7/8.  The numbers were gone, but there was still a big space where the span used to be.  At first I thought that the span just some how wasn't going away, so I tried all sorts of CSS with NO luck.

mindtouch-toc-firefox
Above is the TOC without the numbers viewed in Firefox

MindTouch TOC in IE 8 and IE 7
Above is the TOC without the numbers viewed in IE7/8

After a lot of frustration I actually looked at the source and noticed that the markup had a space before the anchor links (i.e. Hello and You) I am not sure why MindTouch did this and it might just be a bug or something they overlooked.

MindTouch TOC markup via viewing source

I had to look at the source because I could not tell viewing the markup via Firebug (in Firefox) that the spaces were there.

MindTouch TOC markup as viewed in Firebug of Firefox

However when I viewed the webpage with Internet Explorer’s Developer Toolbar and I could see them a little better.  As you can see below you can see the Text – Empty Text Node.  The problem with Developer Toolbar is that it doesn’t display closing tags, so I didn’t catch this right away.

mindtouch-toc-markup-ie

After all that troubleshooting I was happy to know at least what the issue was.  Now I just need to add some jQuery to remove those blank spaces.  Below is the jQuery I have come up on page load.

$(document).ready(function(){
            // Used to replace the spaces in the TOC menu before the anchor links
            $(".pageToc li").each (  function ( i , val  )
            {
                $(val).html($(val).html().replace(/\s<a/ig, "<a"));
            });
        });

I had to use Regular Expression to replace only in front of the anchor.  I created another post to go a little further into JavaScript's Regex Syntax.

After I added this jQuerry script all was good and now I had the following TOC display. 

mindtouch-toc-firefox

I know this isn’t a common thing to do, but it works well for my customer’s intranet site, and the way they use the headers in content more as display elements than hierarchy elements.

I hope this helps anyone in the same boat.

Wednesday, September 09, 2009 3:07:26 PM (Pacific Standard Time, UTC-08:00)

#       Comments [1] - Trackback

Deki Wiki | jQuery | MindTouch

# Wednesday, August 05, 2009

I have been setting up a customers MindTouch 2009 site and I ran into an issue where I couldn’t search the contents of the PDF and Office 2007 attachments I had uploaded to MindTouch.

search  I found I could search and find the titles of the documents, but not the contents.

Fortunately I had the #mindtouch irc.freenode.net channel to go to.  The people there are very helpful there.  It turns out that I needed to download and install IFilters for both PDF’s and Office 2007.

They directed me to IFilter.org, and once there I found a whole bunch of links for all different types of IFilters. 

The PDF link brought me to the Adobe site, and the Office Suites link brought me to the Microsoft site.  I downloaded each of the IFilters and then logged onto my Windows Server 2008 box to install.

NOTE:  I found out something interesting though.  It turns out that if you use the Debian/Linux VM’s you will not have any of these issues because they do not have IFilters and use various other tools to those conversions.  I have been told that the IFilters seem to be a better method, but that may be up for argument by people smarter than I.

Once on my server I just ran the IFilters exe files and after both installs went easy, I restarted the server.

Once restarted I went to the control panel under Cache Management and clicked on the “Rebuild Now” button and within a couple minutes all was good and I could now search the contents of PDF’s and Office 2007 documents.

NOTE:  I only had a small amount of attachments and very few pages.  It might take a longer time to rebuild for bigger sites.

I hope this helps any out there who is having the same issues.  I also want to remind people about the IRC support that can be had at the #mindtouch channel at irc.freenode.net.  It is well worth it and they people are VERY patient.

Wednesday, August 05, 2009 10:40:43 AM (Pacific Standard Time, UTC-08:00)

#       Comments [0] - Trackback

Deki Wiki | Server Administration

# Monday, March 02, 2009

This sounds like a NO brainer but today I found out that someone had created an account and changed one of my skin pages.  They erased all the JavaScript I was using to allow users to change the background image.

I found out I hadn’t changed the configuration key for security/new-account-role. 

blog_DW_register

This could have been a BIG problem.  Hopefully my readers won’t have this issue.  To avoid this make sure to go to your Control Panel.  Click on the System Settings tab.

Once there Click on the Configuration sub menu and scroll down to the configuration key you see in the above picture.  (the one by the red arrow)  Change that to Viewer or whatever you want to change it to.

You can also keep people from registering by changing the security/allow-anon-account-creation to false.  You can also see this configuration key in the picture above.

Well I hope this helps.  It is something small, but could really get you in a bind REAL quick.  I think the default is set to Contributor, so PLEASE check this out right away.

~MikePixel (Michael Silva)

Monday, March 02, 2009 2:53:41 PM (Pacific Standard Time, UTC-08:00)

#       Comments [0] - Trackback

Deki Wiki

# Saturday, February 28, 2009

This weekend I am on cloud 9.  On Friday I was asked if I wanted to do a "Guest Blog" at mindtouch.com.  I was very honored and happy to do it.  I spent some time to formulate my opinions and late Friday my blog post was live.

Basically I went into the reasons I like Deki Wiki's skinning model.  Oh well, I don't have much to say here except for I am happy. 

~MikePixel (Michael Silva)

Saturday, February 28, 2009 8:38:46 PM (Pacific Standard Time, UTC-08:00)

#       Comments [2] - Trackback

Deki Wiki | Skinning

# Saturday, February 21, 2009

The Pixel-Season Deki Wiki skins are now available for download and to view at deki.cornerpixel.net.  These skins are available for the popular Deki Wiki web application made by MindTouch. 

MindTouch has an awesome product in their Deki Wiki.  I have enjoyed using it and am very happy to be able to provide the community with some extra skin options. 

pixel-fall-bgbitepixel-spring-bgbitepixel-summer-bgbitepixel-winter-bgbite

Once at CornerPixel’s Deki Wiki site, you can view the Pixel-Season skins which come in Spring, Summer, Fall and Winter.  You can view alternate backgrounds and templates there too.

Have fun with the skins, used them for free, and if you like them, or even hate them, please email me at admin@cornerpixel.net or comment to this blog post.

Thanks,
MikePixel  (Michael Silva)

Saturday, February 21, 2009 3:44:10 PM (Pacific Standard Time, UTC-08:00)

#       Comments [0] - Trackback

Deki Wiki | Skinning

# Saturday, February 14, 2009

I have been working here and there on some new Deki Wiki skins and they can be seen in action at deki.cornerpixel.net.  It took a little troubleshooting, but I figured out how to allow the user to view all my skins on one Deki Wiki site and allow the user to click through backgrounds. 

Viewing different skins on separate pages.

The first thing I did was to create an administrator page that included a link to the CSS sheet for the skin I wanted to display.  I created a new page under the administrators account with the following markup.

<h1>PixelFall</h1>
<link href="/skins/fiesta/Pixel-Plus/pixel-fall/style.css" type="text/css" rel="stylesheet" />

When I hit save and came back my source looked like this.

<h1>PixelFall</h1>
<p>&nbsp;</p><p> <link href="/skins/fiesta/Pixel-Plus/pixel-fall/style.css" type="text/css" rel="stylesheet" /></p>

This will cause a blank paragraph in the custom area I put this in, but I will show you how to take care of that in a minute.

Then I went to the page I wanted to use the different skin on.  I edited the page and place this extension on the page.

{{ wiki.template("User:Administrator/PixelFall", nil, "customarea1") }}

What this did was placed the administrator page I created earlier into Custom Area 1.  It isn’t valid to put link tags in the body of your html, but I used this just for the purpose of displaying my skins to users without having to create 4 different Deki Wiki sites.

Lastly there is the issue of the blank paragraph tags.  In order to get rid of those I just added this CSS to the stylesheet I linked to.

.custom1 p { display: none; }

That was how I managed to put multiple skins on my MindTouch Deki wiki website.  There might be a better way, and I am always up for criticism, but this is how I did it.

~MikePixel (Michael Silva)

Saturday, February 14, 2009 5:38:43 PM (Pacific Standard Time, UTC-08:00)

#       Comments [0] - Trackback

Deki Wiki | Skinning

# Wednesday, February 04, 2009

I have been working on skinning MindTouch Deki Wiki on and off for the last two weeks, maybe more, and I’ve gotten to a point where I have one of my skins packaged and ready for download.

I based the 4 skins I am working on, (to include Pixel-Spring) on the already popular Fiesta skin that comes with MindTouch Deki Wiki.  Some day in the near, maybe distant future I will create some skins that are a family of their own, but at the moment I just wanted to play around with the skinning process of Deki Wiki.  I’ve been quite happy with how easy it is to change the look and feel of Deki Wiki.

I also made it a point not to change any of the php files and only change the style.css sheet.  If I needed to over-ride anything in the _content.css sheet I included it at the bottom of the style.css sheet with an !important attribute attached.  The style.css sheet is commented so the user can see what any extra CSS is for.  In doing this, I hope it will allow the Pixel Skins to be used for a long time to come.  Basically as long as the fiesta skin is used.

Another thing I allowed for was multiple background choices.  I added seven background images and CSS for the user to place in the control panel’s custom CSS page.  The background images come with the skin package the user will find instructions on implementing them in the !NOTES.txt file.  I am planning on making several more alternate backgrounds in the near future, but first I need to get all four skins out and packaged.  (Before the end of the week)

templateBoxExample Last but not least, I included two extra templates in the !NOTES.txt file for the user to add to their Deki Wiki website for a little more pizzazz.  The image to the right is and example of the template box included in the Pixel-Spring skin.  It is simple but adds an extra area for the user to have extra “Stuff”.

There is a five step process to adding the templates, and the steps are easy to follow.  You can find the instructions in the !NOTES.txt file. 

I also have some instructional videos to help the users.  The quality of the videos could be better, but I think they will help.

 

I guess that’s all to blog for now.  I hope to have all four of the Pixel skins packaged as soon as possible, but for now feel free to download and use the Pixel-Spring Skin.  If you have any questions about the skin, or how to do something, feel free to email me.  admin@cornerpixel.net  I can’t promise I will respond same day, but I will try.

~MikePixel

Wednesday, February 04, 2009 12:17:35 PM (Pacific Standard Time, UTC-08:00)

#       Comments [2] - Trackback

CSS | Deki Wiki | Skinning

# Friday, January 23, 2009

As you all know I have been working with Deki Wiki and having a blast.  I am learning how Deki Wiki works and how to skin it.  I have been working on a few skins just for fun and they are getting closer to being done.  When I get them completed I will be offering them as a download for free to the MindTouch community.

If you want to see the three skins I am working on and the one I do in the future, feel free to surf over to deki.cornerpixel.net.  You will see in the navigation, links to all the skins I am working on.

Below are the screenshots of the skins I am almost finished with.  I have one for Spring, Fall and Winter.  I will eventually get one done for summer, and then work on more corporate looking skins.  For now here ya go.

PixelSpring-SS    PixelFall-SS   PixelWinter-SS

If anyone likes them, just submit a comment.  That way I can show the comments to my wife and she might forgive me for spending all my time skinning Deki Wiki.  I guess I should spend a little time with my family.  They are pretty cool.

Oh well, I hope you enjoy the skins,

~MikePixel (Michael Silva)

Friday, January 23, 2009 8:38:58 AM (Pacific Standard Time, UTC-08:00)

#       Comments [2] - Trackback

CornerPixel | Deki Wiki

# Tuesday, January 20, 2009

About two weeks ago I was asked to dig into Deki Wiki so that I could help my customer build an intranet site from Deki Wiki.  There had been a lot of research done on what CMS/Wiki to use for this companies intranet site, and it finally came down to Deki Wiki. 

At first I was a little worried about Deki Wiki.  I hadn’t heard much on skinning the application.  I am a type of person who likes to skin CMS’s and hate to be boxed into a solution that I can’t make prettier.  After I got a chance to look around I was impressed with the way Deki Wiki was built.  It was created in a way that allows a lot of customization and skinning options.

After messing for a little while I found out that you can do all sorts of modification and it’s even pretty easy to create your own skin from scratch to include the markup and php code for the layout.  I decided however that for this intranet site that I would stick to just tweaking and changing a skin that comes with Deki Wiki.  I decided this for the simple fact that I wanted the site to be safe even through future Deki Wiki updates.  I figure it will be less work this way and less pain for the customer.

I ended up choosing the fiesta skin to play with, and I had a lot of fun changing things around.  There were a couple things that were frustrating through the process, but that could be because I started by changing the PRO skin instead of the wireframe.  Below are two screenshots of the skins I have done so far.  I plan on doing many more.

deki_pixelplus      deki_pixelfall

The next step will be trying to figure out a way to install or have multiple Deki Wiki sites on one server so I can display different skins rather than just the fiesta skins I create.

You can see these two skins and some skinning guides soon to come at deki.cornerpixel.net.

~MikePixel (Michael Silva)

Tuesday, January 20, 2009 7:50:55 AM (Pacific Standard Time, UTC-08:00)

#       Comments [0] - Trackback

CMS | CornerPixel | Deki Wiki

Archive

<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Email Subscription

Sign up to get the CornerPixel Blog delivered to your email.

About the Author

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Sign In

Statistics

Total Posts: 51
This Year: 2
This Month: 0
This Week: 0
Comments: 26