Tuesday, December 15, 2009

How to set up email forwarders in Exchange Server 2007


Login to the Exchange server
Open the Exchange Management Console
First create a mail contact then set up the forwarder.

Detailed instructions :
To create a MailContact using the Exchange Management Console:

1. Expand Recipient Configuration | Mail Contact
2. In the Action pane, click New Mail Contact
3. To create a new Contact object, leave the default (New Contact) selected | click Next
4. Type First name, Last name
5. Click Edit to add the external email address
6. Click New to complete creation of new MailContact

To forward mail for a recipient to the MailContact using the Exchange Management Console:

1. Expand Recipient Configuration | Mailbox | select mailbox | properties | Mail Flow Settings tab | Delivery Options
2. Under Forwarding address, select the Forward to checkbox
3. Click Browse to select the MailContact

Figure 1: Modifying Delivery Options to forward email to an alternate recipient

4. Optional: If a copy of the message needs to be delivered to both the external recipient and the original recipient's mailbox, select theDeliver message to both forwarding address and mailbox
5. Click OK to close Delivery Options properties
6. Click OK to close recipient's properties

Thursday, December 10, 2009

MOSS 2007 server not sending email for domain

So one of our Sharepoint 2007 Servers was not sending out email to anyone anymore after a datacenter move. The reason was dns issues related to the move.

Here is how it was solved:
MB - per yesterdays research and changes: A request was sent to NetSource to create a reverse DNS for the IP 68.70.161.12 to point to portal.harmonicconsulting.com. HarmonicConsulting.com MX records we edited to add portal.harmonicconsulting.com as a e-mail server with a low priority. The SMTP server was reconfigured to relay mail for the harmonicconsulting.com domain to google and Sharepoint was configured to use the local SMTP server to send mail. Rlaying to harmoinic from the SMTP server worked - I can't seem to add myself to the notification list here so I will wait to hear badck from the real bacuff to verify this is working now. - Mark

Monday, November 23, 2009

Forgot root password

Forget your root password?
On Red Hat/Centos most any linux box:

1. Get physical access to the box
2. reboot it
3. during the grub menu, type e
4. go down to the line that has 'quiet' in it, usually that's the one I use but it doesnt'really matter. what you are basically going to do is type single at the end of whatever line you want to boot.

*this will also walk you though it
http://www.cyberciti.biz/faq/grub-boot-into-single-user-mode/


5. this will dump you to single user mode, and you can just do passwd to set new root password

Wednesday, November 11, 2009

Roaming Profiles Windows Server 2003

Trying to set up roaming profiles on Windows Server 2003 domain?

Try this:

To setup roaming profiles, first log onto your server and open Active Directory users and Computers. Right click on a user; choose properties and the click the profiles tab. In the profile box type the UNC path of the shared folder you made on the server. For example you would type:

\\servername\profiles\%username%

Where servername is the name of your server and the profiles folder is on the root of the C or D or whatever data drive the server is using. Do not type in the users name at the end but make sure it says %username% like in the example.

Make sure you have created this profiles folder and shared it with the same name as the folder. You can leave the share permissions wide open if you want because the %username% will create the users profile with permissions that grant only the user the right to view the contents.

The next time the user logs in, the users local profile will be copied to the new profiles folder on the server creating a new folder with the users name and permissions set up so that only the user can access it.

Tuesday, November 10, 2009

Rhapsody Playlist - GLEE TV Show hits ;-)

dorky post but trying some html generated from rhapsody to see if images are sent properly or are red xs after the post.

http://rhaplinks.real.com/rhaplink?rhapid=6393732&type=playlist&title=Playlist&from=msn
1. Sweet Caroline (Glee Cast Version) - Glee Cast
2. Bust A Move (Glee Cast Version) - Glee Cast
3. Don't Stop Believin' (Glee Cast Version) - Glee Cast
4. Halo / Walking On Sunshine (Glee Cast Version) - Glee Cast
5. Gold Digger (Glee Cast Version) - Glee Cast
6. Can't Fight This Feeling (Glee Cast Version) - Glee Cast
7. Rehab (Glee Cast Version) - Glee Cast
8. Dancing With Myself (Glee Cast Version) - Glee Cast

or this version (generic, not the blogger format as above):
http://rhaplinks.real.com/rhaplink?rhapid=6393746&type=playlist&title=Playlist&from=msn

Tuesday, November 03, 2009

MOSS 2007 External Web Resolution Issues/Alternate Access Mappings

So when building a MOSS site, you cannot simply assign an IP say 64.24.232.177 and then make a DNS A record say moss1.yourdomain.com point to it, then in IIS configure that MOSS Web Site to run on say, port 80 for example.

No, that is not good enough, you have to tell Sharepoint about it -- go into Central Administration, then there is a slew of different alternate access mappings you can configure for the site.

There are different zones (dont you just love IIS/Internet Explorer?!?):
default, intranet, public, extranet, custom (blah blah)

All you really need to do to enable your moss site to be viewed externally (assuming you set the DNS as explained above) is:

1. In IIS, configure the host header for the site (right click it go to properties, Advanced, Add the DNS name i.e. moss1.yourdomain.com in the host header box).

and

2. In MOSS Central Administration, Operations, Alternate Access Mappings add a public URL as http://moss1.yourdomain.com (I just added it into the default zone and erased what was there -- the http://hcmoss02 which is the internal name of the server)

VOILA you are done. Now your site resolves externally. Take a coffee break.

Wednesday, October 14, 2009

Shared images for MOSS 2007 templates

put shared images for the MOSS site in %12 hive%\template\images
i.e.:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES

Wednesday, September 30, 2009

Linux Find Command find text in files

To find the text "JoomlArt" in all files in all subdirectories under the current dir, use this:

find . -type f -name "*" -exec grep -il JoomlArt {} \;

If you just wanted to search in php file for example, it would be this:

find . -type f -name "*.php" -exec grep -il JoomlArt {} \;

(grep is not needed in these examples)

Thursday, September 24, 2009

DirectAdmin forgot admin password?

If you forget the Direct Admin admin password, all you have to do is if you have ssh to the box as root type:

passwd admin

(then reset it you goof!)

Monday, August 31, 2009

exim permissions error

When I see this:

login as: root
root@64.254.200.10's password:
Last login: Mon Aug 31 15:44:06 2009 from adsl-70-131-140-218.dsl.emhril.sbcglob al.net
[root@ls3 ~]# 2009-08-31 15:45:42 1MiDl0-0001b0-SA Failed to create spool file / var/spool/exim/input//1MiDl0-0001b0-SA-D: Permission denied
[root@ls3 ~]#


I do this (temporarily):
chmod -R 777 /var/spool/exim
because this does not work:
chmod -R 755 /var/spool/exim

Thursday, August 27, 2009

Directadmin - MySql move a database and grant user permission

So to move a Mysql database from one server to another all you have to do is copy the database over and then grant the appropriate permissions to the new database on the new server.

In the example below the username is da_admin and password kbjlms1X

the database name is aurorafcs_md
the database user name is also aurorafcs_md
the database user password is gggyro33

To grant the permissions:
2. [root@ns2 conf]# mysql -uda_admin -pkbjlms1X
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6118
Server version: 5.0.37-standard MySQL Community Edition - Standard (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on aurorafcs_md.* to aurorafcs_md@localhost identified by 'gggyro33';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

Saturday, August 22, 2009

Exchange 2003 Information Store Repair

So a client had a Exchange 2003 Information Store corruption issue on a lovely saturday night when I was supposed to be at the movies at the park in the neighborhood with the kids.

Anyway, here is a command to fix it (after you have made backups of the edb and stm files):

ESEUTIL /P "D:\Program Files\Exchsrvr\MDBDATA\priv1.edb" /S"D:\Program Files\Exchsrvr\MDBDATA\priv1.stm" /T"D:\Program Files\Exchsrvr\MDBDATA\tempdb.edb"

Thursday, August 20, 2009

Remove 'Welcome to the Frontpage' title in Joomla! 1.5

How to remove 'Welcome to the Frontpage' title in Joomla! 1.5
Navigation
• •
If you install new Joomla! 1.5 on your server, you get the 'Welcome to the Frontpage' title on your Frontpage. Sometimes, it is difficult to find, where you can change this title.

Go to your Joomla! 1.5 Administration site and login. In your administration site go to:

Menus - Main Menu (now you are in: Menu Item Manager: mainmenu).
Click on 'Home' link to edit this link (you are now in: Menu Item: Edit).
Click on Parameters System and change or delete the Page title.
If you change the Page title, changed title will be displayed on your Frontpage as a title.
If you delete the Page title, Menu link will be displayed on your Frontpage as a title (in the present case 'Home' will be displayed as title, because 'Home' is the name of the link to the Frontpage).
If you don't want to display any title, set Show Page Title below Page title parameter to 'No'.
Don't forget to save changes.

Tuesday, August 18, 2009

Transfer linux pop mail directadmin command

so to transfer email from one DA box to another:
scp -r 64.254.200.10:/etc/virtual/rubesreadymeals.com/* /etc/virtual/rubesreadymeals.com

scp -r 64.254.200.10:/var/spool/virtual/rubesreadymeals.com/* /var/spool/virtual/rubesreadymeals.com

Mysql directories and move info

It is no fun when a linux shared hosting server crashes. You have to move the web files, email, and any mysql databases the users websites are running on, not to mention DNS info. So get some mountain dew and lets get started:

Mysql important directories:
The databases are all here: /var/lib/mysql

Grep for the mysql username and password in:
Joomla - configuration.php
Drupal - settings

Directadmin info is here: /usr/local/directadmin

Wednesday, August 12, 2009

tar help (zip up a linux dir and all files and subdirs)

use this to zip up linux dirs, files, folders, subdirs, etc.

tar -cvzpffilename.gz {source dir or files wildcard}

Example:
tar -cvzpfpublic_html_backup_08122009_plinkgolf.gz public_html

where:
-f - whatever follows the f is the filename, so public_html_backup_08122009_plinkgolf.gz is the tarball/zip file name in this case.
-v indicates verbose listing of command output.
-c indicates create a new tar ball file.
-z indicates use gzip.
-p indicates preserve all permissions of underlying files/dirs being zipped.
public_html - is the name of the top level folder I am zipping including all its subfolders and files underneath it

Have a nice day!

Oops - almost forgot, to explode/unzip the zip file in the current directory, just type:

tar -xvf nameofzipfile.gz

Tuesday, July 21, 2009

Modify Joomla footer Part 2

To modify the joomla footer in a template, it is overridden in the template directory (Joomla 1.5, the mod_footer module).

/home/plinkgolf/domains/powerlinksgolf.com/public_html/templates/ja_helio/html/mod_footer/

is where the files are located.

Friday, July 03, 2009

Find out who is logged on as root (or any other user)

So I want our support team to get an email when someone logs on as root or su to root on our servers. So I saw this:
Want to be notified instantly when someone logs into your server as root? No problem, check out this nice tutorial on email notification for root logins. Keeping track of who logs into your server and when is very important, especially when you're dealing with the super user account. We recommend that you use an email address not hosted on the server your sending the alert from.

So lets get started!

1. Login to your server and su to root, I know the irony!

2. cd /root

3. pico .bashrc

4. Scroll to the end of the file then add the following:
echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" you@yourdomain.com

Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address

5. Crtl + X then Y

Now logout of SSH, close the connection and log back in! You should receive an email address of the root login alert a few minutes afterwards.

But I changed to this:
Edit root (or whatever user you wanted) .bash_profile

echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `netstat | grep ssh`" you@yourdomain.com

Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address

This netstat gives you all users connected to your box via ssh at that time, not just the specific user who just sshed in.

Example Output (user SSH sessions from my home laptop ip of 70.131.105.251:
tcp 0 0 ls3.harmonicwebhosting.:ssh adsl-70-131-105-251.d:61852
ESTABLISHED
tcp 0 220 ls3.harmonicwebhosting.:ssh adsl-70-131-105-251.d:63195
ESTABLISHED

ALERT - Root Shell Access on (ls3.harmonicwebhosting.com-64.254.200.10): Fri Jul 3
11:37:51 CDT 2009

Wednesday, July 01, 2009

DirectAdmin DNS issue same shared Linux server-cannot send email to other domain hosted on same server

So we are running Direct Admin on one of our shared linux web hosting servers and ran into a problem where one domain had switched email services to google apps (another mail server not hosted on the Direct Admin shared mail server).

So all other domains on that server could not send email to that domain since they thought the local server was still serving mail even though they changed the MX records to google servers.

Long story short to fix this go to:
Click on the domain in question, Click on Modify DNS Records, Click on Modify MX records, then uncheck the local mail server box as follows:
Local Mail Server
Use this server to handle my emails.
If not, change the MX record and uncheck this option
*Note: Making modifications to the MX records can potentially disable all of your email accounts from recieving mail.
ONLY make modifications if you know what you are doing.
Make sure to include the period at the end of the domain. (eg: mail.domain.com. )

Tuesday, June 30, 2009

Time Zone setting in .NET webapps

So the time zone was off by 5 hours in one of our .NET webapps. After reading tons of articles on the web they were all quite confusing. The simple fix was:

It was a code chanege in sql. I change getutcdate() to getdate(). I used
getutcdate() for some reason i dont remember why now.

Changing it to getdate() fixed it.

Monday, June 08, 2009

Joomla CSS Submenu location -ja templates

When changing the dropdown or submenu colors or styles, use the css in the ja_menus folder.

Monday, May 18, 2009

Joomla Permissions for installations

If you have SSH, Shell access the following commands should be able to be run from the command line to reset all your files and directories back to the server defaults of 755 and 644.

Change directory in to the top directory (" / ") of your Joomla! installation, then run these;

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

If you only have FTP access, this can be a very time consuming job, however, unless you changed more directories during the installation that was requested, you should only need to reset about 10 directories and the configuration.php file.

Keep in mind that to install any extensions or templates after the actual Joomla! installation you may need to elevate the default permissions again on the appropriate directories just for the installation period, you may then demote them again after the add-on is installed.

If you decide to use "cache" the cache directory will need to be "Writable" to the Web-Server user to allow it to write its temporary files.

Once you have completed the installation, next thing to do is read Ron Liskey's "Joomla! Admins Security Checklist". I am sure you will find much of the security information that you will need in this post and the Security Forum.

Joomla! Admins Security Checklist
http://forum.joomla.org/index.php/topic,81058.0.html

Wednesday, May 13, 2009

How do I embed picasaweb albums on my website?

Here is how to embed picasaweb on your website:

http://googlified.com/embedding-picasa-web-albums-on-your-site/

/*
//requestVars start

/*
* @author Jesse Berman
* @copyright 2008-01-31
* @version 1.0
* @license http://www.gnu.org/copyleft/lesser.html
*/


/*
* Portions by Dieter Raber
* copyright 2004-12-27
*/


/* pwa.js: a drop-in JavaScript utility that displays galleries from picasaweb.google.com in your website */

/* NOTE: This version hides all the link-backs to Picasa */

/* This JavaScript file, when called from a webpage, will load all the thumbnail images of all the galleries
in a user's Picasa Web Albums account into an HTML table that's 4 rows wide. Clicking on any of the
galleries will display thumbnails of all the photos in that gallery, and clicking on any of those thumbnails
will display the photo.

To call this file from your own webpage, use the following syntax:




Make sure you change YourPicasawebUsername to your actual Picasaweb username. For more information about
Picasa, check out picasaweb.google.com. Also, www.yoursite.com should point to your actual site name, and
the location of the pwa.js file. The script looks for the images back.jpg, next.jpg, and home.jpg, in the
same directory as pwa.js, to create the navigation arrows. Please make sure those exist! I'm providing
samples in the SourceForce repository, but feel free to substitute your own.

Note: "Photosize" is the size of the image to be displayed when viewing single images. I like 800. :-)
Note: "columns" is the number of columns of photos to be displayed on your site in the gallery and album views.
You may omit either of these values; if you do, the default settings are 800 for photosize and 4 for columns.

*/



function readGet(){var _GET = new Array();var uriStr = window.location.href.replace(/&/g, '&');var paraArr, paraSplit;if(uriStr.indexOf('?') > -1){var uriArr = uriStr.split('?');var paraStr = uriArr[1];}else{return _GET;}if(paraStr.indexOf('&') > -1){paraArr = paraStr.split('&');}else{paraArr = new Array(paraStr);}for(var i = 0; i < paraArr.length; i++){paraArr[i] = paraArr[i].indexOf('=') > -1 ? paraArr[i] : paraArr[i] + '=';paraSplit = paraArr[i].split('=');_GET[paraSplit[0]] = decodeURI(paraSplit[1].replace(/\+/g, ' '));}return _GET;}var _GET = readGet();
//requestVars end

function resize(which, max) {
// not used anymore! was scaling photos after they were loaded. using browser-native inline scaling instead,
// until google fixes their image size request to work with any imgmax, rather than just 800 :-(
var elem = document.getElementById(which);
if (elem == undefined || elem == null) return false;
if (max == undefined) max = 658;
if (elem.width > elem.height) {
if (elem.width > max) elem.width = max;
} else {
if (elem.height > max) elem.height = max;
}
}

//$Update: May 10, 2007$

function $(a){document.write(a);}
var photosize;
if(!photosize){photosize = 800;}

var columns;
if(!columns || isNaN(columns) || columns < 1) {columns = 4;}


//Global variables
var photolist = new Array(); //this is used globally to store the entire list of photos in a given album, rather than pass the list around in a URL (which was getting rediculously long as a result)
var album_name = ""; //this is used globally to store the album name, so we don't have to pass it around in the URL anymore either.
var my_numpics = ""; //this is used globally to store the number of items in a particular album, so we don't have to pass it around in the URL anymore either.
var prev = ""; //used in the navigation arrows when viewing a single item
var next = "";//used in the navigation arrows when viewing a single item



function picasaweb(j){ //returns the list of all albums for the user
$("
Gallery Home

");
$("");

for(i=0;i
// for each of the albums in the feed, grab its album cover thumbnail and the link to that album,
// then display them in a table with 4 columns (along with the album title)

//This was the old way of grabbing the photos; since Google updated the feed, the media entry is better. :-)
//
//var img_begin = j.feed.entry[i].summary.$t.indexOf('src="')+5;
//var img_end = j.feed.entry[i].summary.$t.indexOf('?imgmax');
//var img_base = j.feed.entry[i].summary.$t.slice(img_begin, img_end);

var img_base = j.feed.entry[i].media$group.media$content[0].url;

var id_begin = j.feed.entry[i].id.$t.indexOf('albumid/')+8;
var id_end = j.feed.entry[i].id.$t.indexOf('?');
var id_base = j.feed.entry[i].id.$t.slice(id_begin, id_end);

$("
");
if (i % columns == columns-1) {
$("");
}
}
$("
");
$("
"+ j.feed.entry[i].title.$t +"

");

}





function getphotolist(j){

// This function is called just before displaying an item; it returns info about the item's current state within its parent
// album, such as the name of the album it's in, the index of the photo in that album, and the IDs of the previous and next
// photos in that album (so we can link to them using navigation arrows). This way we don't have to pass state information
// around in the URL, which was resulting in hellishly long URLs (sometimes causing "URI too long" errors on some servers).

// Get the number of pictures in the album. Added 7/18/2007.
my_numpics = j.feed.openSearch$totalResults.$t;

// Also get the name of the album, so we don't have to pass that around either. Added 7/18/2007.
album_name = j.feed.title.$t;

for(i=0;i // get the list of all photos referenced in the album and display;
// also stored in an array (photoids) for navigation in the photo view (passed via the URL)
var id_begin = j.feed.entry[i].id.$t.indexOf('photoid/')+8;
var id_end = j.feed.entry[i].id.$t.indexOf('?');
var id_base = j.feed.entry[i].id.$t.slice(id_begin, id_end);
photolist[i]=id_base;

// now get previous and next photos relative to the photo we're currently viewing
if (i>0)
{
var prev_begin = j.feed.entry[i-1].id.$t.indexOf('photoid/')+8;
var prev_end = j.feed.entry[i-1].id.$t.indexOf('?');
prev = j.feed.entry[i-1].id.$t.slice(id_begin, id_end);
}
if (i {
var next_begin = j.feed.entry[i+1].id.$t.indexOf('photoid/')+8;
var next_end = j.feed.entry[i+1].id.$t.indexOf('?');
next = j.feed.entry[i+1].id.$t.slice(id_begin, id_end);
}

}
}




function albums(j){ //returns all photos in a specific album

//get the number of photos in the album
var np = j.feed.openSearch$totalResults.$t;
var item_plural = "s";
if (np == "1") { item_plural = ""; }

var album_begin = j.feed.entry[0].summary.$t.indexOf('href="')+6;
var album_end = j.feed.entry[0].summary.$t.indexOf('/photo#');
var album_link = j.feed.entry[0].summary.$t.slice(album_begin, album_end);
var photoids = new Array();

$("
Gallery Home > "+ j.feed.title.$t +"  ["+np+" item"+item_plural+"]

");
$("");

for(i=0;i
//var img_begin = j.feed.entry[i].summary.$t.indexOf('src="')+5;
//var img_end = j.feed.entry[i].summary.$t.indexOf('?imgmax');
//var img_base = j.feed.entry[i].summary.$t.slice(img_begin, img_end);

var img_base = j.feed.entry[i].media$group.media$content[0].url;

var id_begin = j.feed.entry[i].id.$t.indexOf('photoid/')+8;
var id_end = j.feed.entry[i].id.$t.indexOf('?');
var id_base = j.feed.entry[i].id.$t.slice(id_begin, id_end);
photoids[i]=id_base;


// display the thumbnail (in a table) and make the link to the photo page, including the gallery name so it can be displayed.
// (apparently the gallery name isn't in the photo feed from the Picasa API, so we need to pass it as an argument in the URL) - removed the gallery name 7/18/2007
var link_url = "?albumid="+_GET['albumid']+"&photoid="+id_base; //+"&photoids="+photoids;
// disable the navigation entirely for really long URLs so we don't hit against the URL length limit.
// note: this is probably not necessary now that we're no longer passing the photoarray inside the URL. 7/17/2007
// Not a bad idea to leave it in, though, in case something goes seriously wrong and we need to revert to that method.
if (link_url.length > 2048) { link_url = link_url.slice(0, link_url.indexOf('&photoids=')+10)+id_base; }
$("
");

if (i % columns == columns-1) {
$("");
}
}
$("
");
//$("

"+j.feed.entry[i].media$group.media$description.$t+"
");
$("

");

}
function photo(j){//returns exactly one photo


var album_begin = j.entry.summary.$t.indexOf('href="')+6;
var album_end = j.entry.summary.$t.indexOf('/photo#');
var album_link = j.entry.summary.$t.slice(album_begin, album_end);

var img_title = j.entry.title.$t;

//get the dimensions of the photo we're grabbing; if it's smaller than our max width, there's no need to scale it up.
var img_width = j.entry.media$group.media$content[0].width;
var img_height = j.entry.media$group.media$content[0].height;


var img_base = j.entry.media$group.media$content[0].url;


// is this a video? If so, we will display that in the breadcrumbs below.
var is_video = 0;
if (j.entry.media$group.media$content.length > 1)
{
//$('This is a '+j.entry.media$group.media$content[1].medium+'.
');
if (j.entry.media$group.media$content[1].medium == "video")
{
is_video = 1;
}
}


var photo_begin = j.entry.summary.$t.indexOf('href="')+6;
var photo_end = j.entry.summary.$t.indexOf('"> var photo_link = j.entry.summary.$t.slice(photo_begin, photo_end);
var photo_id = _GET['photoid'];

//album name is now taken from the global variable instead. 7/18/2007
//
//var album_name_begin = j.entry.summary.$t.indexOf(username)+username.length+1;
//var album_name_end = j.entry.summary.$t.indexOf('/photo#');
//var album_name = j.entry.summary.$t.slice(album_name_begin, album_name_end);

var album_id = _GET['albumid'];
var my_next = next;
var my_prev = prev;
var photo_array = photolist;
//var my_numpics = _GET['np'];
//instead, we now get this through the global variable my_numpics. 7/18/2007

//$("photo ids: "+_GET['photoids']+".

");
//$("photolist: "+photo_array+".

");

//var my_galleryname = _GET['galleryname'];
//var my_fixed_galleryname = my_galleryname.slice(1, my_galleryname.length-1);
var my_galleryname = album_name;
var my_fixed_galleryname = album_name;
var album_base_path = window.location.protocol + "//" + window.location.hostname+window.location.pathname +"?albumid="+ _GET['albumid'];

// Get the filename for display in the breadcrumbs
var LastSlash = 0;
var img_filename = img_title;
for(i=0;i if (img_base.charAt(i)=="/")
{
LastSlash = i;
}
}
if (LastSlash != 0)
{
img_filename = img_base.slice(LastSlash+1, img_base.length);
}
// replace some commonly-used URL characters like %20
img_filename = img_filename.replace("%20"," ");
img_filename = img_filename.replace("%22","\"");
img_filename = img_filename.replace("%27","\'");


//find preceding two and following two pictures in the array; used for the navigation arrows.
//the arrows are already linked to the previous and next pics, which were passed in with the URL.
//however, we need the ones that are two behind and two ahead so that we can pass that info along when we link to another photo.
//
//NOTE: as of 7/16/2007, the photo array is taken from global photolist (loaded in the getphotolist function) rather than from the URL.
//This has eliminated the need for really long URLs, which were hitting up against the URL length limit in some extreme cases.
for(i=0;i if (photo_array[i]==photo_id)
{
var p1 = photo_array[i-1]; //ID of the picture one behind this one; if null, we're at the beginning of the album
var current_index = i + 1; //this is the count of the current photo
var n1 = photo_array[i+1]; //ID of the picture one ahead of this one; if null, we're at the end of the album
}
}
//these will be passed along if we move to the next or previous photo - removed the gallery name 7/18/2007
//var prev = album_base_path + "&photoid=" + p1 + "&np=" + my_numpics + "&galleryname=" + my_galleryname.replace("'","%27") + "&prev="+p2+ "&next="+photo_id; //+"&photoids="+photo_array;
//var next = album_base_path + "&photoid=" + n1 + "&np=" + my_numpics + "&galleryname=" + my_galleryname.replace("'","%27") + "&prev="+photo_id+ "&next="+n2; //+"&photoids="+photo_array;
var prev = album_base_path + "&photoid=" + p1; //+"&photoids="+photo_array;
var next = album_base_path + "&photoid=" + n1; //+"&photoids="+photo_array;


//Display the breadcrumbs
var my_item_plural = "";
if (my_numpics != 1)
{
my_item_plural = "s";
}
var item_label = "picture";
var item_label_caps = "Picture";
if (is_video == 1) //if it's a video, don't say it's a picture, say it's an "item" instead
{
item_label = "item";
item_label_caps = "Item";
}
//if (photo_array.length == 1) { var current_index_text = "Total of " + my_numpics + " " + item_label + my_item_plural; } else { var current_index_text = item_label_caps + " " + current_index + " of " + my_numpics; }
var current_index_text = item_label_caps + " " + current_index + " of " + my_numpics;
if (is_video == 1) { current_index_text = current_index_text + "  [VIDEO]"; } //show in the breadcrumbs that the item is a video
$("
Gallery Home > " + my_fixed_galleryname + " > " + current_index_text + "

");


if (p1 == null) //we're at the first picture in the album; going back takes us to the album index
{ var prev = album_base_path }

if (n1 == null) //we're at the last picture in the album; going forward takes us to the album index
{ var next = album_base_path }

//the navigation panel: back, home, and next.
$("
");
if (photo_array.length > 1) { $(""); }
$("");
if (photo_array.length > 1) { $(""); }
$("
Previous item Back to album index Next item

");

var max_width = 658; //max width for our photos
var display_width = max_width;
if (img_width < display_width)
{ display_width = img_width; } //don't scale up photos that are narrower than our max width; disable this to set all photos to max width

//at long last, display the image and its description. photos larger than max_width are scaled down; smaller ones are left alone
$("
");
$("
"+j.entry.media$group.media$description.$t+"

");


//now we will trap left and right arrow keys so we can scroll through the photos with a single keypress ;-) JMB 7/5/2007
$('');


// an attempt at resampling the photo, rather than relying on the browser's internal resize function. doesn't work, unfortunately.
//
//$(" //$("$ratio_orig = $width_orig/$height_orig; if ($width/$height > $ratio_orig) { $width = $height*$ratio_orig; } else { $height = $width/$ratio_orig; } ");
//$("$image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); ");
//$("imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); imagejpeg($image_p, null, 100); ?>");

}

if(_GET['photoid']&&_GET['albumid']){
$('');//get the list of photos in the album and put it in the global "photolist" array so we can properly display the navigation arrows; this eliminates the need for really long URLs :-) 7/16/2007
$('');//photo
}else if(_GET['albumid']&&!_GET['photoid']){
$('');//albums
}else{
$('');//picasaweb
}


//$Update: January 31, 2008$

*/

Monday, May 04, 2009

MOSS 2007 Workflow for Visual Studio 2005

To get the MOSS 2007 templates into Visual Studio 2005, you need to:

1. Install Windows for Workflow 3.0 or better (actually: Windows Workflow Foundation version 3.0.4203.2 or better). This is trouble because if you had previously installed the .net 3.0 redistributable package, it is not good enough, you need the full .net 3.0 foundation package here: The Full .Net Framework 3.0 installer package download URL : http://go.microsoft.com/fwlink/?LinkId=70848


2. Install Visual Studio 2005 Extensions for Windows Workflow Foundation (EN).exe

3. See Nick's article here: http://weblog.vb-tech.com/nick/archive/2006/09/04/1753.aspx

Thursday, March 19, 2009

MOSS AD Synch Issues Part 2

So I was having issues with the MOSS AD Synch of the user profile info into MOSS from Active Directory (email address, first and last name etc).

The issue is this, the import process into the Shared Services database from Active Directory was working and scheduled and fine. A full import was done and all users came in. Then, I scheduled hourly incremental import (runs like 10-20seconds max on a 1200 user AD). Fine.

But, the individual Sharepoint sites each have their own Content Database (SQL db) right? What was happening is the UserProfile table (where all this info is stored) was not being updated in the Content DBs but WAS BEING UPDATED IN THE SSP DB. Turns out their is a Timer job called ProfileSynch that was failing. It had no credentials to login to the SSP_DB as the specified user (EGSEG-ROSMOS01\sa_MOSS2007). So, now I am off now to fix that problem (and hope this works)! Why can't MOSS be less complicated? UGH - the NCAA games are starting soon.. GO TIGERS!!! Memphis, Lousiville, UNC, and Syracuse are my Final 4 with Memphis over UNC in the championship!

MOSS AD Synch Issues Part 1

1. MOSS provides user profile from AD sync to user profile list while WSS doesn't.

2. MOSS support Active Directory sync to user profile other than lists, and computer information in AD can not be synced.

3. If you want to get MULTIPLE AD information in AD sync to one list, it is also impossible using MOSS provided user profile sync.

Here is a custom tool from sharepointboost.com (for purchase?) that tries to address the shortcomings:

Friday, March 06, 2009

MOSS 2007 Pages show up for system account but not regular users (i.e. Publishing Pages)!

So I ran into a problem (should have been rather obvious but just learning sharepoint designer on my own here). I made changes to several master pages and page layouts in Sharepoint designer and by hand coding html and they were showing up perfectly for me and the Sharepoint System Account in the web browser when accessing the site. So cool, I thought my job was done.

But NOPE - Because ... somehow for regular MOSS users and guests, they were not showing up. AARRGH MSFT again! Here we go...

I first thought it was a permissions thing. But then I looked closer in Sharepoint Designer, and saw a bunch of little green checkmarks next to each file I had changed plus a bunch I did not change. So I right clicked and said Check In. Well then it asks you are you checking in a minor version or publishing a major version. I say Publish Major Version, put a short comment. Then it says this type of change has to be approved, do you wish to approve/review now? I say yes, then it opens up web browser to the content approval page within Sharepoint for the particular site I am working on. In there, I select the pending files to approve and Click Approve.

VOILA - then all users can see my beautiful new changes and Marketing is happy! Plus is Friday 2:30PM and 60 degrees out after a hard long winter in CHI TOWN so I am happy to be able to leave the office a bit early today!

MOSS 2007 Master Pages - how to use, what are they?

Here is a link to a Microsoft MVP Sharepoint Master Page and Layout specialist's blog. Heather Solomon is very good at this stuff.

This article in particular discusses what master pages are and how to use them in MOSS 2007 at a conceptual level:

http://www.heathersolomon.com/blog/articles/MOSS07DesignComponents.aspx

Enjoy!!

MOSS 2007 Create New Web Application/Database for later move to another MOSS Server

Here is how to create a new web application and database for a new site in MOSS 2007.  This will allow for ease of moving the site and database in the future to a separate physical MOSS server.  This came up yesterday at work.

  1. Go into Central Administration on the existing MOSS instance.  You must sign in as a farm administrator, I do not think a site collection administrator will cut it for this task.  The way to check is if you see the Create or Extend Web application Link in the step below, you are good.  It should be the top most link under Sharepoint Web Application Management on the Application Management page of Central Administration.  It will be just above Remove SharePoint from IIS Web Site.  NOTE: If you can not see this, simply type in http://servername:centraladminport/_admin/extendvs.aspx
  2. Click on Application Management, Create or extend Web Appplication.  Click create a new web application.  This will create a new IIS website and a new content database for the new site.  This aids in moving it to other physical or logical MOSS instances later on.
  3. Fill in the information accordingly for the new Web Application page.
  4. You can use an existing IIS site, but not for this exercise, instead create a new IIS site, give it a port number not already in use (MOSS will default to one for you or you can change it).
  5. Give the site a description describing its purpose - make it a good description that includes sharepoint and the port number and the sites purpose because this is what will show up in IIS for example later and it is easy to move if you have a lot of sites to manage.
  6. Specify the path for the website files - or take the default of c:\inetpub\wwwroot\wss\VirtualDirectories\...
  7. Take the default NTLM Allow Anonymous No and Use SSL No (unless it is externally facing or you have special security requirements.  NOTE: Excel Services sites work better with Kerberos not NTLM.
  8. Choose the load balanced URL for the site or take the default
  9. Application Pool - here is where you can use an exsiting one on the existing MOSS instance or create a new one, it does not matter.  When you move this to another server/MOSS instance later, it will use one on that server/MOSS instance anyway not this one.
  10. Restart IIS Manually (the default) is ok - 99 times out of 100 you will not have to even restart IIS after creating this new site anyway.  I don't knwo why MSFT puts this in here.
  11. Specify Database Server and Name - it is a good idea to name the database WSS_Content_ like you named the website above (minus the port information of course)
  12. Select your database authentication method, Windows authentication is preferred.
  13. Select which server in your MOSS environment is the Search Server for the new site.
  14. Click OK and MOSS will try to create the new IIS website and new SQL Server database for you.  If you look in those apps after it returns (with successfully created) you will see the new website and new database.  Be sure to add those to your backup strategy if it requires you to update which database and site files needs backup.
  15. If you get errors, read the error message and try to troubleshoot it, it may mean there is a security/authority error or something else.  Good luck!
  16. Now create a new site collection in Central Administration -> Application Management then you can begin creating sites on your new MOSS Web Application and start to fill up your new database and IIS Web Application with sites and subsites!

TO RESTORE ONTO NEW SERVER/MOSS INSTANCE

To move the site and database onto a new box or instance is pretty straightforward.  Often you have to do this due to performance, disk, or logical split/upper management decision reasons.

  1. On the new server, create a new web application similar to the above process.
  2. Create a new site collection using the blank site template
  3. use the stsadmin -backup command on the old server.  This makes a .dat file.
  4. use the stsadmin -restore command on the new server on the .dat file
  5. Everything should work fine.




MOSS 2007 Physical and Applicaiton Architecture Tiers

MOSS 2007 follows a 3 Tier structure

1. Web Server Tier (IIS) - can be network load balanced
2. Application Server Tier 
  • Contains Shared Service Provider (SSP) which handles:
  • Search, Index, Audience, User Profiles, My Sites, BDC, Excel Services (Last 2 are Enterprise Edition only).  Typically you woudl put My Sites on its own server, Excel Services/BDC on its own or the same server, and Audience/User Profiles on its own or the same server, and Search+Index on its own or the same server (if you had 4 servers in this tier for example).
  • NOTE: Any service can reside on any mid tier server.  Also, the index server is limited to 1 per SSP, but all the other services have no limit as to how many servers can provide/service/host them 
3. Database Tier - consist of standard SQL Server 2005 or SQL Server 2005 Cluster of servers

Thursday, March 05, 2009

Using the SCP command (Linux)

20.3.2. Using the scp Command

The scp command can be used to transfer files between machines over a secure, encrypted connection. It is similar to rcp.

The general syntax to transfer a local file to a remote system is as follows:

scp username@tohostname: 

The  specifies the source including path to the file, such as /var/log/maillog. The  specifies the destination, which can be a new filename such as /tmp/hostname-maillog. For the remote system, if you do not have a preceding /, the path will be relative to the home directory of username, typically /home/username/.

To transfer the local file shadowman to the home directory of your account on penguin.example.net, type the following at a shell prompt (replace username with your username):

 scp shadowman username@penguin.example.net:shadowman  

This will transfer the local file shadowman to /home/username/shadowman on penguin.example.net. Alternately, you can leave off the final shadowman in the scp command.

The general syntax to transfer a remote file to the local system is as follows:

scp username@tohostname: 

The  specifies the source including path, and  specifies the destination including path.

Multiple files can be specified as the source files. For example, to transfer the contents of the directory downloads/ to an existing directory called uploads/ on the remote machine penguin.example.net, type the following at a shell prompt:

 scp downloads/* username@penguin.example.net:uploads

Photoshop make buttons with text labels

Use the Text Selet tool (It has the letter A in the toolbar) then drag your move over the text or click on the text layer with the mouse point.

--j

Can you sendme the wec buttons and instructions how I can select the text on the button and modify it.

There are 4 wec buttons I think.  Then they also toggle off to different color. So 8 total.

I need to also make 8 but just with different text.  Trying to learn photoshop


MOSS 2007 (Sharepoint) Architecture

Here is a good article explaining MOSS 2007 arch as well.

http://blogs.msdn.com/martinkearn/archive/2006/06/06/MOSS-Architecture-_2600_-Shared-Services.aspx

Microsoft Certification Tips

Travis here is what I did.  To Become a MCP, just take one test(70-271).

To become a MCDST take these two tests 70-271 and 70-272   Go Here

http://www.microsoft.com/learning/mcp/mcdst/requirements.mspx

Then for a MCSA go here

http://www.microsoft.com/learning/mcp/mcsa/windows2003/default.mspx

You are supposed to take 4 exams, one of which is an elective BUT  "As an alternative to choosing an elective exam listed in the preceding table, you can choose the following certifications or certification combinations." and that certification is an MCDST.  Get it?

So if you are a MCDST FIRST then you only have to take 3 more tests Exam 70-270, Exam 70-290, Exam 70-291.  I have the test questions for these 3.

Then if you want to become an MCSE you go here:

http://www.microsoft.com/learning/mcp/mcse/windows2003/default.mspx

And there are even more tests to take...(3 more maybe) BUT if you take the path in order of MCP-MCDST-MCSA-MCSE  then you will have to take less tests because you have already taken some of them to fullfill the other certs.  Then you will have ALL 4 certs...(I only have 3)

And now I am reading that EVERYTHING changes with 2008.. The new Cert is called an Microsoft Certified IT Professional (MCITP) and you can either become an  MCITP: Server Administrator or an MCITP: Enterprise Administrator.

CRAZZZZZZZZZZZZZZZZZZZZZZYYYYYYYYYYYYY

By the way you can get the ANSWERS for the first two tests 70-271 and

70-272 by going to ebay and downloading it for $3.20 LOL http://cgi.ebay.com/MCDST-Exam-Qs-As-Package-70-271-70-292_W0QQitemZ260346792933QQcmdZViewItemQQptZUS_Nonfiction_Book?hash=item260346792933&_trksid=p3286.c0.m14&_trkparms=72%3A1205%7C66%3A2%7C65%3A12%7C39%3A1%7C240%3A1318%7C301%3A1%7C293%3A1%7C294%3A50

Taxonomy and Meteadata Resources

http://hepburndata.blogspot.com/2006/12/metadata-defined.html

The following Metadata repositories exhibit these desired traits:
1. Whitemarsh's Metabase
2. CA's AllFusion Repository for Distributed Systems
3. Data Foundation's OneData Registry
4. Oracle's Enterprise Metadata Manager

 http://en.wikipedia.org/wiki/Dublin_Core

 http://www.taxonomystrategies.com/html/archive.htm

Make an HTML apostrophe show up

In the HMR footer I added this to make the apostrophe show up in all browsers correctly:

Dell Server Build plus RAID and windows server

With NO OS (Windows Install instructions):

High level:

  • First time out of box, accept EULA and Dell service tag
  • Follow Dell steps for server with no os:

1.     Insert the Dell Systems Management Tools and Documentation DVD

2.     Press any key on the keyboard

3.     The boot menu screen displays

4.     Select Dell Systems Build and Update Utility

5.     From the Dell Systems Build and Update Utility Home page, click Server OS Installation to continue your operating system setup.

  • Make RAID 5 if possible
  • Make 20-40GB C partition for OS install
  • Make Swap Partition S twice the physical RAM or 8GB minimum
  • Make Data Partition

 Install Windows Server 2003 Standard Edition 64 bit

Run updates

Install .NET Framework 2.0

Install Apps like - Sharepoint Server Standard Edition 2007 (will prompt for additional .NET Frameworks like 3.0 and maybe 3.5) or other apps

 

Website Banner Ad standards and sizes

This group runs all the standards - here are the sizes:

http://www.iab.net/iab_products_and_industry_services/1421/1443/1452

Good Linux find command and Joomla Footer

Here is the linux command I used and the file location in joomla to edit the footer:

From the public_html folder of the domain:

find ./ -type f -exec grep -H copyright '{}' +

 

The footer file you can edit to change the Joomla 1.5 standard footer is here:

/home/aheumann/domains/theheumannmarketreview.com/public_html/language/en-GB/en-GB.mod_footer.ini

Reset Root Password from console or root single user mode

So we have disabled root ssh to our linux boxes now.  But to reset the root password we need to login as a approved ssh user (/etc/ssh/sshd_conf AllowUsers bacuff for example) then su root
Enter old root password
then passwd change to new root password

or - if you have no valid ssh users (bad but we foudn ourselves in this case today on our important shared web and mail server):
I'd first see if they can get in with the root pw first on the console, if that does not work, you would reboot, and when you get to the grub boot loader, you press e for edit, the second entry, you modify, and you put 'single' at the end of that line, then boot that up, it will drop you into root single user mode, and they can reset the password

Saturday, January 31, 2009

Some Yellowstone Pics!



Here are some pictures from out trip to Yellowstone last summer! Just now posting>!?!
Posted by Picasa