Cell Tutorials Micro Tutorials
Shortest Tutorials

IE issue when using Wordpress 2.7 (IE 6, 7, 8) troubleshooting

March 9th, 2010
IE issue when using Wordpress 2.7 (IE 6, 7, 8)

I was running this live blog with thousands of visitors for a gaming site, the issue I noticed was that none of IE version was loading sidebar and footer when tried to visit this blog. I had rolled back all my svn changes. When I run that blog on local with empty db on local it doesn’t produce issue. When I tried using live db downloading on local I could produce the issue. Now I tried removing contents of elements as well as indented elements and made sure every tag has closing tag but did not work. I also tried Tidy an Add-on for Firefox that currently only supports Windows platform. My frustration was increasing finally I decided to go out and take an hour walk despite it was very windy and cold that my eyes were tearing and then I got back. I thought may be it’s number of posts which are so many if I reduce them and test how it reacts and finally it worked. I logged in to blog admin, clicked to Settings, Reading and changed 10 to 5 posts by the label “Blog pages show at most”. Thought people out there should not face 2 days on this type of issue and use this post to save time.

Post to Twitter Tweet This Post

  • Share/Bookmark

Wordpress Highlight comments by multiple Authors.

March 8th, 2010

<![CDATA

IN Comments.php ADD FOLLOWING RIGHT BEFORE FIRST <ol element that contains comment_author_link():

<?php

$users = get_users_of_blog();

foreach( $users as $user ) {

$role = array_pop( array_keys( unserialize($user->meta_value) ) ); // yeah, I know, looks awkward :)

$user_id = $user->user_id;

if ( $role != 'subscriber' ) // collect id of anyone whose role is greater than 'subscriber'

$roles[ $user_id ] = $role;

}

?>

<style>

#commentlist li { border:2px solid white; } /* not logged or subscriber */

#commentlist li.administrator { border:2px solid red } /* blog admin */

#commentlist li.author { border:2px solid blue } /* author */

#commentlist li.editor { border:2px solid yellow } /* editor */

</style>

NOW EDIT THE FIRST <ol ELEMENT WHICH SHOULD LOOK SIMILAR TO:

<ol id=”commentlist”>

<?php foreach ($comments as $comment) : ?>

<li>

<p>By <?php comment_author_link() ?> – <?php comment_date() ?></p>

<?php comment_text() ?>

</li>

<?php endforeach; ?>

</ol>

AFTER ADDING FOLLOWING:

<?php // The extra stuff to get commenter’s role

$user_id = $comment->user_id;

$role = ( isset( $roles[$user_id] ) ? $roles[$user_id] : ” );

?>

class=”<?php echo $role; ?>”

SHOULD LOOK LIKE THIS:

<ol id=”commentlist”>

<?php foreach ($comments as $comment) : ?>

<?php // The extra stuff to get commenter’s role

$user_id = $comment->user_id;

$role = ( isset( $roles[$user_id] ) ? $roles[$user_id] : ” );

?>

<li>

<p>By <?php comment_author_link() ?> – <?php comment_date() ?></p>

<?php comment_text() ?>

</li>

<?php endforeach; ?>

</ol>

CREATE AUTHOR AND SUSBCRIBER USERS IN WORDPRESS ADMIN, WRITE DUMMY COMMENTS AND TEST THAT.

]]>

Post to Twitter Tweet This Post

  • Share/Bookmark

Unix or Mac OS X Leopard Terminal commands and definitions

February 9th, 2010

1)

To point PEAR to any directory which has correct db2.prop (or info etc):

a.)

First cd folder_that_has_PEAR

b.)

ln -s /Applications/XAMPP/xamppfiles/lib/php/pear PEAR

2.

To see full path of current folder in Terminal:

pwd

3.

To search:

find . -name “db.php”

find . -name “DB.php”

find . -name “*.php”

Create Directory:

sudo mkdir php

Post to Twitter Tweet This Post

  • Share/Bookmark

to submit your web site for SEO to all search engine

January 19th, 2010

to submit your web site for SEO to all search engine

http://www.submitexpress.com/submit.html

The main engines we submit to:

Google
Whatuseek
Wisenut
ExactSeek
Scrubtheweb
Jayde





In addition your site will be listed in the below Search Engines
:

AOL Search
HotBot
Search.com
Metacrawler
Dogpile
Mamma
C4
Canada.com
ixquick
Infogrid
WebInfoSearch
Fast Search (AllTheWeb.com)
Query Server
800go
Debriefing
Highway 61
37.com
OneSeek
MetaSpider
Vivisimo
PlanetSearch
surfwax
qbSearch
ProFusion
Proteus
Go 2 Net
MegaGo.com
WebFile
myGO
Megacrawler
Search Climbers

Post to Twitter Tweet This Post

  • Share/Bookmark

Wrapper/outer div to keep inner div top right regardless of resolution:

January 13th, 2010

Wrapper/outer div to keep inner div top right regardless of resolution:

<html><head>
<style type=”text/css”>
#divnamewrap{
height:140px;
width:100%;
position:absolute;
left:0px;
top:0px;
}
#divname{
height:140px;
width:185px;
position:relative;
z-index:0;
float:right;
}
</style>
</head>

<body>
<div id=”divnamewrap”>
<div id=”divname”>div content here </div> <!– top right this div will appear that’s why we used wrapper so that change of resolution should keep it on right –>
</div>
</body>
</html>

Post to Twitter Tweet This Post

  • Share/Bookmark

Vanishing a div using JavaScript timer and CSS display none

January 11th, 2010

Vanishing a div using JavaScript timer and CSS display none

<html>
<head>
<script type=”text/javascript”>
function timedMsg() {
var t=setTimeout(“document.getElementById(‘vanish’).style.display=’none’”, 5000);
}
window.onload=timedMsg;
</script>
</head>
<body>
<div id=”vanish” style=”position:absolute;left:420px;top:750px;”>Game loads after trailer</div>
</body>
</html>

<html> <head> <script type=”text/javascript”> function timedMsg() { var t=setTimeout(“document.getElementById(‘vanish’).style.display=’none’”, 5000); } window.onload=timedMsg; </script> </head> <body> <div id=”vanish” style=”position:absolute;left:420px;top:750px;”>Game loads after trailer</div> </body></html>

Post to Twitter Tweet This Post

  • Share/Bookmark

Converting youtube video into mp3 – how to do it

January 1st, 2010

1. Download and install youtube to mp3 software free:

http://avs4you.com/AVS-Video-Converter.aspx?type=GoogleAdWordsSearch&gclid=CPXn6s-BhJ8CFQoiagodSh8mmQ

2. Go to your favorite youtube video and copy URL from address bar

3. Run AVS software and paste in the area where it says paste here and remember the path where it’ll output mp3

OPTIONAL THINGS TO DO:

4. Now you can either copy from that folder to your mp3 player or open those files into itune to transfer to your iphone or ipod

5. if you want to rename right click (in pc, mac user ctrl+click) in itune onto a file and select get info to edit file related info i.e. album, artist, url, etc

6. to add another file to this album (group of mp3s) simply open any file in itune by right clicking and open in itune from folder (and rename to same album and artist) or in itune go to file menu and add file to library option.

Post to Twitter Tweet This Post

  • Share/Bookmark

Mozilla Firefox Mobile Application Development

December 22nd, 2009

Mozilla Firefox Mobile Application Development

https://wiki.mozilla.org/Mobile/FennecVision

Code name is Fennec for Mozilla Mobile and programming language to be used is XUL, applications will be created same as for Mozilla Desktop Firefox extensions but you’ll have to manage or handle some errors for mobile version.

Post to Twitter Tweet This Post

  • Share/Bookmark

Highlight Multiple Author Comments on Wordpress Blog Tutorial in Short

November 12th, 2009

Highlight Multiple Author Comments on Wordpress Blog

1.
Download this plugin:

http://wordpress.org/extend/plugins/comment-highlighter/

or

http://code.google.com/p/comment-highlighter/downloads/list

Unzip and copy to plugin sub-folder in your wordpress folder
or directly install if your admin panel allows it to install.

2.
Login to admin of your wordpress
paste this url:
www.YourBlogDomain.com/wp-admin/options-general.php?page=comment-highlighter/comment_highlighter.php
- check email check box
- enter email of the author you want to add
- in the class text box write
commentsclass
- check the global check box
- Click the green button, “Add this comment highlight”

3.

a. Add following after first line of comments.php:

<!– following is for comment highlight plugin –>
<?php if(function_exists(‘CommentHighlight’)) CommentHighlight(‘link’); ?>
<!– above line is for comment highlight plugin –>

b. Edit comment.php (C:\xampp\htdocs\wp-content\themes\theme_name\comments.php)
Search following lines:
<ol>
<?php foreach ($comments as $comment) : ?>

c. And replace first <li…> tag with:
<li id=”comment-<?php comment_ID() ?>”

4. at the end of style.css (C:\xampp\htdocs\wp-content\theme_name\themesw\style.css)
add following lines (class):
.commentsclass {
background-color: red !important;
}

5.
For FAQ:

http://code.google.com/p/comment-highlighter/wiki/Installation

OR

http://code.google.com/p/comment-highlighter/wiki/FAQ

http://code.google.com/p/comment-highlighter/

Post to Twitter Tweet This Post

  • Share/Bookmark

Checkout for shopping cart Ecommerce website

October 12th, 2009

Checkout for shopping cart can be done using several ways, for example:

1. Amazon Checkout:

https://payments.amazon.com/sdui/sdui/business;jsessionid=7D5D5D0E4326C0C8DE885FB9E1D91927?sn=cba/osCommerce

2. Google Checkout with spreadsheet form (Checkout Store Gadget)

http://code.google.com/apis/checkout/developer/Google_Checkout_Store_Gadget_How_To.html

3. Paypal Checkout integration:

https://www.paypal.com/cgi-bin/webscr?cmd=p/pdn/howto_checkout-outside

4. Marchant Account for credit cards:

http://www.clickandbuy.com/US/en/merchantportal/home.html

https://www.beanstream.com/public/index.asp

http://www.charge.com/

http://www.authorize.net/

http://www.2checkout.com/community/

http://merchantwarehouse.com/credit_card_software/authorize_net

Post to Twitter Tweet This Post

  • Share/Bookmark