Saturday, August 02, 2008

WSS 3.0: Where are my custom fields in the new, edit and display forms of a list?

The Problem

Last week, I was doing a self study on WSS, SharePoint Designer 2007 and their relatives, for one of our internal requirements.  With a few customization requirements we need to achieve, there was one piece where WSS really got me mad.  For our internal Project Management Office dashboard, we created a great WebPart thats pulls custom field values created in the Projects List.  Creating Custom Fields are very straight forward and designing a DataViewWebPart (DVWP for short) in SharePoint Designer 2007 is much fun too.  But then, the custom fields that I created did not make their way to the View/Edit forms of the list (DispForm.aspx and EditForm.aspx respectively).  I fired open SharePoint Designer 2007 only to find that the ListFormWebPart is dynamically rendered that it doesn’t allow you to edit from within SharePoint Designer 2007.  Either have it embedded in there or delete it entirely.  I was not really comfortable in going for hack around methods such as designing DVWP with all those style sheets to look just like the ListFormWebPart, since I expected SharePoint to dynamically detect and render the standard and custom columns in the display and edit pages.

While I could see those custom fields in the datasheet view and edit them, *also* that I could see custom fields work in display and edit pages for other normal lists, it didn’t make any sense on why custom fields don’t appear for “Projects List”.  Where are my custom fields gone from the display, new and edit pages?

As I was also working on a few customizations to documents related to the project, spending a few hours on webcasts, articles, research and all the possible distractions, I found that “Content Types” were a pretty interesting concept.  Only then i recollected seeing this term somewhere.  In one of my attempts to duplicate the frozen WebPart, I made use of what is known as “Custom List Web Part” and let me choose three things:  1) The List, 2) List Content Type and 3) an option group for new / edit / display.  Getting back to doing the same, I figured that “Project” was listed (and the only items listed) in the Content Type drop down of that dialog.

The solution

To get your custom fields show up on some of the list that don’t behave as you expected in regards to the custom field, the first think you need to check and conclude is the Content Type attached to this list.  Content Types are site level columns definitions for consistent use in your lists throughout the site.  They are a great abstraction to enforce consistency in the cotent design of your lists and workflows.

To check and redefine the content type attached to your list, get to your list and do the following:

List Settings->Advanced Settings : Turn on Allow management of content types.  (it’s turned off by default).

Click OK to get back to the list.  You should now see the section: Content Types.  In that section you should see at least one content type (in my case, it was “Project” as I was using a “Projects List").  Now this Content Type has a few column definitions and since this is the default content type for my list, the display, new and edit pages have dutifully obliged to restrict to only those column definitions. *Sigh*. Now go ahead and click to edit your content type and you should see options to add columns from existing column definitions.  TADA! and your next screen should have all your great custom fields (or columns) ready to be added as part of this content type.  If you do not like to tamper with the site wide content type, go ahead and create one, but remember, the new content type must manually be set as your default content type in order for display, new and edit pages to work.

Here is a good link I later found on this issue:  http://office.microsoft.com/en-us/sharepointserver/HA101106061033.aspx

Hope this helps!

------ Other links ----

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.availablecontenttypes.aspx
andrew_may’s “SharePointBeta2WhatAreContentTypes”
cliffgreen’s sharepoint-webs-web-service-createcontenttype-and-updatecontenttype

http://msdn.microsoft.com/en-us/library/aa543576.aspx
http://msdn.microsoft.com/en-us/library/lists.lists.createcontenttype.aspx

Saturday, July 19, 2008

Ajane! A new way to develop if you are planning on a Web 2.0 site

Why wouldn’t anyone come up something beyond Orbited.  Ajax and Comet have emerged to take over the Operating System platform.  Now one of the neat challenges in any lively business application, for that matter, is the networking possibilities and speed.  Due to issues such as Cross-site scripting, Ajax Architectural expertise, only a few Web 2.0 applications score over others.  Sites like LinkedIn, Meebo and a few more sites not mentioned here have a slick integration of Ajax but had there been a technology for the Web to contact as smoothly like any other Networking Chat application could, the Web 2.0 world would be full of great Social networking apps.

Ajane comes to the rescue.  Ajane will change the way you develop Web 2.0 sites that need communication to a Live TCP server, giving a different perception with just your existing, HTML, JavaScript/JQuery skills.  Suddenly, your small Web app could contact an IRC server from the browser without going through your own server.  With a good designer, (or an ExtJS developer), you could come up with a great Chat application with Ajane doing the networking work for you. Exciting and Enthralling to me!

More updates to Ajane are on the way. Look out!

Thursday, March 27, 2008

XStandard

XStandard Lite seems a good XHTML compliant WYSIWYG editor.  But I’m still looking for something that has rich features and the goodness of Table-less design in all accounts.  Content Management Systems like Typolight have a nice way of abstracting the flow, are a good option but then it needs quite a good visualization (unless you are a designer/programmer or such class) which requires a little bit of training.

Sunday, March 16, 2008

Out of the box : Success and failure

The definition of success and failure depends from individual to individual.  According to me, Success comes from the joy of influencing my subjectiveness and/or being influenced by other’s opinions about a single objective truth.  Success is achieved from many different ways, that’s all.

Appearance, Actions, Words, Art, Science, Spirituality, and the list grows endlessly.

Starting from the ground up, you can influence non-living things - the very act of moving an object, juggling few bottles etc.  At that point in time, one may say that those objects are under influence.  As we move up, influencing people seems the trickier part.  This is again in relation to situation, on whom one is trying to influence etc.  Very subjective!

Now, it is in my opinion that we are in constant search of those whom we can influence, or we can eventually influence.  What are we trying to influence?  Truth!  A larger objective!  And, only in the most subjective form each one of us have experienced.  Einstein being one of the most successful person at that.  Darwin to an extent but most agree he failed.

The secret being in the mental act of not concluding things!  So the next time your opinions are not accepted, be patient until they are.  The answer to the question “how long should one be patient?” may/may not be answered before the results themselves are successful, however.  And sometimes, it might not be in the same form that we may expect as well.  Since it is a “may/may not be” situation on the answer and the results are subjective, I guess it is logical to keep one’s hopes quite high!

Thanks!

Saturday, March 15, 2008

Links for Personal development!

Here are some great links that I’ve found for personal development:

I find Steve Pavlina’s the most inspiring ones.  Simple on the outside, mind blowing when intuitively seen smile

http://www.stevepavlina.com/blog/2005/04/30-days-to-success/
http://www.stevepavlina.com/blog/2005/05/how-to-become-an-early-riser/
http://jon.gaia.com/blog/2006/3/how_to_have_a_36_hour_day
the_four_best_ways_to_sit_at_your_computer

I stumbled upon Lori’s blog and love all the quotes as I relate them to my recent personal experiences.  One word: Lovely.

“In Love with Life”.
“I am living my heaven NOW and it is fabulous!”

http://inspire2act.gaia.com/

Life is supposed to be having fun with while we travel it!

Spreading Love!

Tuesday, March 11, 2008

Clean URL Site setup

As you might have known, my entire site runs on ExpressionEngine and my current setup is to have clean URLs both for human readability and SEO.  I have used the following approach to achieve this.

1. Do a normal install.  At the end of the install you will have URLs with index.php
2. Setup auto mode and check PATH_INFO value.  Since in my case PATH_INFO is empty, I have to use ORIG_PATH_INFO as provided by my hosting.
3. To remove index.php the first step is to configure your .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]

4. The next step is to logon to Administration panel, get to System Preferences -> General Configuration and empty the index page setting (that is, if you see index.php, remove it)
5. Go ahead and thoroughly test your site with confidence! ( This is not optional smile j/k )

Tech Help: If you don’t understand any of the above steps, get someone with PHP & .htaccess knowledge and/or read this documentation link from ExpressionEngine: Remove index.php from URLs using File and Directory Check Method

Hope this helps in tweaking and hacking your site!

Monday, March 03, 2008

Getting the most out of your team

Imagine you lead a small custom apps team with 7 developers or less, with each representing a part (puzzle piece) as in a jigsaw puzzle.  On a project that has stern deadlines, the project tasks are broken down into iterations.  Each iteration would have tasks under them.  It is common that you assign many individual tasks divided to each team member.  This is distribution.  However, there is an even better way to get most out of your team members.  Just like how a single puzzle piece is so unique both by its shape and the part of the picture it contains, you should make each team member feel that their part/role is as important as the overall big picture.  Even if a single part of the puzzle is missing, the big picture isn’t complete.  This also means knowning each team member’s strength and weaknesses (as in a jigsaw piece).

On the technical front, it is usually the person’s overall technical knowledge and about the project.  Both may not be the same!  It is important that all team member understands the overall big picture and how it would eventually be solved.  For an individual member, it is the awareness about the surrounding pieces.  And for a leader, it is the awareness of placement of each piece in the puzzle along their adjacent pieces.  Scale this out to small teams to bigger operations as well.  Interestingly, anyone could practice/could’ve already been practising this model even if they haven’t played a jigsaw puzzle before though smile

The advantages are:
- Resource allocation is at its best.
- Depending upon the member’s potential, the same member can play the role of two or more (at very adjacent places in the puzzle).
- Each member knows what should be asked and to whom.

Things to remember in this model:
- Team Leaders/Managers must ensure each team member’s awareness of both the entire big picture and the person’s individual role at every single iteration/task allocation.
- Got to stay away from the distribution model as it is very easy fall for it at time-constraint situations (Distribution model saves the situation but ends up exchanging legs for hands, for example).
- A visual representation that is circulated to the team on top of written task allocation always helps!

Saturday, March 01, 2008

Mind Mapping

Mind maps are a great way to store, organize your ideas.  With many commercial tools scattered around in the Web, I gave FreeMind a try and it satisfied most of the basic needs in Mind Mapping.  Mind Mapping software come with a multitude of features and one of the important feature that I love is the Calender.  They give you the ability to attach dates and reminders to any node in the Mind map tree.  I have stumbled upon on a few web based Mind mapping tools and seeking a way to attach Project Management features/tools that would help many folks out there.

Tony Buzan developed Mind Maps with the following key features in mind:
Key features are:
- Organization
- Key Words
- Association
- Clustering
- Visual Memory - Print the key words, use color, symbols, icons, 3D-effects,arrows and outlining groups of words
- Outstandingness - every Mind Map needs a unique center
- Conscious involvement

Following are some great useful resources to start with:
http://en.wikipedia.org/wiki/Mind_Mapping
http://members.optusnet.com.au/~charles57/Creative/Mindmap/

Some of the interesting tools out there:
http://www.mindman.com/
http://www.mindomo.com/
http://www.mindmeister.com/
http://www.comapping.com/

Second Business Trip

In continuation to my first trip, I made my second business trip that was perfectly planned and executed.  The requirement was to scale out a financial database that is fairly large.  After a two day research and Proof of concepting, we decided to go with SQL Server 2005 Mirroring feature.  While in the way, we overcame a few challenges such as SQL Server 2005 mirroring and permission issues. Later a day, we successfully started implementing Mirroring for one of the databases and continued with the others.  A snapshot was created for each of the mirrored databases so as to provide read-only access.  Its a great solution for anyone who owns a reporting application that only needs read-only access to OLTP databases.  A scheduler application was also developed in C# to take snapshots of the database at specific intervals, in order to keep the snapshots up to date to the principal database.

The entire project was completed in just 6 days.  We setup the scheduler and moved into production on last Saturday.  The team worked hard throughout the entire week.  Kudos!

On my way back to the airport, I had a chance to do a quick shopping on LandMark, bought myself a book and got myself a couple of lovely books gifted from the department head for Systems and Applications.  One of them is the International bestseller from Paulo Coelho titled The Alchemist.

Mumbai inspired me so much that I have also planned on a personal trip in the summer.  Good day ALL!

Monday, January 21, 2008

To the home city of Bollywood

Last Thursday, I was busy preparing for a two day business trip to the Home city of Bollywood.  Contrary to many’s assumptions, it was my first flight and a great experience travelling to the most populous city in India.  I spent 2 days and a night dedicating a day for each of the projects in my client site.  The entire plan was just perfect!

The sun was bright and shiny in the days and chilly breeze seemed to flow all through the city in the nights.  I was a given a nice suite and I enjoyed Bombay food, especially the ones the client kindly ordered for lunch from one of the restaurants near their building.  Site seeing was not included in the plan, so I’m hoping to allocate a day in my next trip to the city.

On the first day, I completed most of the important tasks for them including application deployment, training for the first project and initial requirements gathering on the second project.  I worked on a few requested changes at the start of the second day.  The rest of the second day was dedicated for doing a quick pilot.

I documented the requirements I gathered from both the projects and started to travel back home on Saturday night.  The city’s Domestic airport was so great that it made me wonder about the International one.  It was midnight by the time I reached here and I thought, ‘Hopefully, I will do more trips’.

Wednesday, October 10, 2007

Google took over the INTRANET world too?

As I was working on one of the local copies of my client’s site, suddenly all of the links start to respond very slowly.  Well, for a microsecond, I thought there was some problem with my Apache server, but apparently Google servers have been so busy to respond (at least, the server mirrors in India) that I couldn’t test even my local site.  Since my local site has a tweeny little code to contact google-analytics (which, of course, is being used by almost all public websites), my page waits, waits and waits so long, until finally when there’s no response from google it continues to load the rest of my content.  At this rate, I will have to wait 12-25 seconds just for a small spacing adjustment or a color change to a text in my site.

Like somone might comment: Google has taken over the INTRANET world too? What an Irony!  As I’m writing, Google hasn’t recovered still yet (from the past 40 minutes) and the only option I’m now left with is to pull off my LAN cable and work on completely isolated local site (so it no longer waits on google-analytics.com), until Google God is done with HIS nap!

Saturday, September 29, 2007

Ruby, Rails, Cygwin, MySQL

There are many teams and individuals that run Ruby on Rails under Cygwin although it is a little slower than the native Windows or the much faster Linux installations.  One of the problems those folks come across is with talking to mysql.  After starting ./script/server and trying to connect, Rails throws out an error looking for a unix socket:  Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ ‘/tmp/mysql.sock’.  But as most guess, mysql would have been already been running as a Windows Service.

The solution is to simply replace all ‘localhost’ occurences to ‘127.0.0.1’ because then, Rails will be forced to use Windows TCP/IP sockets instead of a unix socket.  And remember to restart your Rails server (WEBRick/Apache/Lighttp).

The simplest order of installing Rails under Cygwin on an all new Windows box would be:

- Make sure you have uninstalled all copies of RubyOneClick Installer.
- Install Cygwin and a shell such as bash (or xterm if you like Cygwin-X)
- Install Ruby from the cygwin setup under ‘Devel’ Category.
- Have MySQL installed as a Windows Service (or make one from mysql source packages)
- Download RubyGems, extract it to a temporary directory (c:/cygwin/tmp/ or c:/temp/ if you like)
- Open bash and navigate to that directory using “cd” commands, and type: ruby setup.rb
- When done, type: gem install rails --include-dependencies
- Then, type: gem install mysql and in the prompt, pick latest mswin32 if you installed mysql as a service or latest ruby version if you built it from the source.
- Create a sample rails application at /tmp/railstest/ by typing: rails /tmp/railstest

- and finally edit ./config/database.yml file to use 127.0.0.1 rather than localhost

The entire process along with the time taken to gather necessary knowledge etc (if you wish to) would take 2 hours but if you follow these instructions blindly it shouldn’t take more than 30-45 minutes on a quite fast machine.

As for an editor, download PSPad and turn on Ruby On Rails highlighter under Settings-->Highlighters Settings and pick “Ruby on Rails” and “Ruby” for any two unassigned slots.

Friday, September 28, 2007

Multiple Project URLs in Windows/Apache

Ever wanted to have your dev WAMP / XAMPP server to run multiple web projects on its own dummy hostnames?  Want your http://localhost/ point to the same document root but still need multiple dummy hostnames such as http://www.project1.local/ or http://www.project1.com.dev/ pointing to different project folders?

Well, the answer is to take advantage of Apache’s VirtualHosts feature and place dummy URLs in your hosts file.  In WinXP, your hosts file is located at the directory path: C:\Windows\System32\drivers\etc\

Note that the ‘hosts’ file has not extension so if you get a Open with dialog choose an appropriate text editor or simply notepad.

Once you have the file opened add a new line in the end like as show below:

        127.0.0.1      http://www.project1.local
        127.0.0.1      project1.local

So, now the first half of it is over.  To check the progress, open a cmd prompt and type “ping project1.local” you should see the ping going to 127.0.0.1.  Also, if you open your browser and point to where apache is running (http://localhost/ or http://localhost:81/ depending upon your setup) you would see the original document root files as expected and as it was working—you could also do: http://www.project1.local or http://project1.local

At this point, both http://localhost/ and http://www.project1.local/ point to the same directory location.  Now, here comes the VirtualHosts trick:

Open your httpd.conf file (C:\wamp\Apache2\conf\httpd.conf on a default WAMP installation) and append the following lines near the end

NameVirtualHost *

<VirtualHost *>
  ServerName localhost
  DocumentRoot "C:/Wamp/www"
</VirtualHost>

<VirtualHost *>
  ServerName project1.local
  DocumentRoot "C:/Wamp/project1"  # Change here
</VirtualHost>

Restart your apache server and thats it.. http://localhost/ will point to your default C:/wamp/www directory files and http://project1.local/ will point to the other different set of project files!

Target Audience: Beginner Apache Administrators, Beginner to Intermediate PHP Developers.
Difficulty level: Easy
Time: 10-15 minutes

Saturday, September 15, 2007

Expression Engine Password Lockout

If you ever get your passwords locked out or wanted to reset your password, being the domain/db owner yourself, then there is a way to solve this.  Connect to your ExpressionEngine database and browse to the table exp_members.  This will list rows corresponding to the the number of members registered in the system.  Now edit the corresponding row that has your username.  You will note that the password is encrypted and is 40 characters long.  ExpressionEngine uses SHA1 encryption, so you will need a tool to generate SHA1 hash.  If you don’t know (or don’t want to know) what those are, use this 40 character value:

8b60e9d739b5a5bfd87cbfe67501ab4fa6e41504

The above is the SHA1 hash for the word “recovery”.  Replace this in the password field in your database row (pay attention to the field name, there is a similar field named unique_id just next to it) and Save your row (hit Go in phpMyAdmin).  You have now successfully reset your password to “recovery”.  Now, go quickly login to your system and change your password the normal way.

Questions?

Do this only when you have no other choice of recovering your password.  If you have doubts that someone else reading this post, might try the same out to hack into your own system, then actually they can’t.  Well, they can’t as long as they don’t have access to your database rasberry This tells you two lessons:  Number 1) Always keep very secured passwords to your hosting and database accounts and Number 2) Do not forget any of your passwords rasberry

By and large, ExpressionEngine is more secured enforcing password lockouts and the folks have done necessary precautions to prevent hacker attacks—Kudos to them.  Honestly speaking, I haven’t seen a little security hole in EE myself as far.

Cheers and Happy ethical Hacking!

Monday, September 03, 2007

About

Welcome! This is my Personal weblog. I started this blog site in order to share my knowledge, thoughts, and other experiences in the Real world and the IT world. You may find some of my deep thoughts, advices and rants that are expressions of purely my own. My opinions change from time to time and I think this is necessary to keep oneself as open minded. My views that are a couple of years ago may slightly be different or even not relevant to my current views due to various changes in the environment, IT world, usage of jargon/terminiology/lingo in day-to-day life, psychological processes, and other such manifestations.

2007

As of 2007, I'm an aspiring Technology Architect, trying to sell my ideas and thus contribute to the growth of Drivestream and Technology overall. You may read about Drivestream on a seperate blog post here: About my company

I started off with Basic and VB6 as a hobby, moved onto the VC++ platform and COM/ActiveX staying there for a while and actually got into IT business through ASP programming. As time passed I started learning many different platforms and languages and by a year and a half after that moved completely to Web technologies such as PHP and JavaScript for my bread and butter. I work mostly on C based languages today, although I can also do equivalent VB.NET due to my strong background knowledge on VB6 and a couple of .NET projects.

As a Solutions Delivery Associate, I talk to clients understanding their web-based business needs and suggesting them with paths to solutions that improves their business, productivity, technology and technical dependence, and other strategies to satisfy their requirements on technology and IT support. As a Technical lead, I do framework/codebase level programming in C#, Webforms/MonoRail, JavaScript/JQuery/ActiveWidgets, and use ExpressiongEngine for CMS. I also recently did a full fledged Web2.0 based Java/J2EE project that uses GWT/Hibernate. My current craze is: CodeIgnitor, Ruby on Rails, MonoRail/NHibernate, JQuery. I mostly program in Windows, by using Visual Studio/Eclipse/PSPad and Subversion. I'm yet to publish a formal portfolio with a complete list of my skillsets, but you may check back soon.

I also allocate some time to contribute to my school, Sri Sitaram Vidyalaya, (SSRV, for short), by giving them an exposure/reach onto the Internet and a web presence at sri.sitaramvidyalaya.net (this site may not work yet as we are just about to launch in a month's time)

About

Sheriff Mohammed is a Technology Architect from Drivestream, Chennai. According to him every Innovation has a purpose and when an equally weighing force known as 'the Drive' is applied, it produces greater results called Solutions. He started this Weblog in order to share his knowledge, thoughts, and other experiences in the Real world and the IT world.

Read more...

Statistics

  • Page Views: 723
  • Page rendered in 6.1129 seconds
  • Total Entries: 17
  • Total Comments: 7
  • Total Trackbacks: 0
  • Most Recent Entry: 08/02/2008 12:20 am
  • Most Recent Comment on: 06/09/2008 08:41 am
  • Total Members: 1
  • Total Logged in members: 0
  • Total guests: 2
  • Total anonymous users: 0
  • Most Recent Visitor on: 08/15/2008 05:03 pm
  • Most visitors ever: 10 on 09/28/2007 04:38 pm
  • Referrers

Disclaimer

This is a personal blog. The blog entries I publish and express here represent my own and not those of the people, institutions or organizations that I may or may not be related with unless stated explicitly. Comments posted here are the opinions of their respective owners. Inappropriate comments will be deleted at the author's discretion.