Posted on

How to fix the Node error “Cannot find module”

Sometimes you can get this error when installing a new module in your application.

module.js:471
throw err;
^

Error: Cannot find module ‘@sendgrid/mail’
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/var/www/html/msg.js:2:14)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

In most cases the fix is to just check if you installed the module in the right folder of the application you need.
So, being in your current application folder, type again npm install your_module.

If that does not work, you have to delete the node_modules folder in your local app folder then type

npm install

or if that does not work either you have to delete package.json and package_locked.json files then npm install again.

 

Posted on

How to Easily Add Videos in Blog Posts

Videos add a new dimension to your blog posts. There are many things you will much better understand in a short video instead of thousand words.
This video will show you how to easily embed third-party videos in your wordpress blog posts.

First of all, you upload your video on YouTube or another video hosting providers.

Then, all you need to do is paste the video URL (web address) into the content area. All you need to make sure that the URL is on it’s own line and not clickable (hyperlinked).

What are the White-Listed Providers?

  • YouTube
  • Vimeo
  • DailyMotion
  • blip.tv
  • Flickr (both videos and images)
  • Viddler
  • Hulu
  • Qik
  • Revision3
  • Scribd
  • Photobucket
  • PollDaddy
  • Google Video
  • WordPress.tv (only VideoPress-type videos for the time being)
  • SmugMug (WordPress 3.0+)
  • FunnyOrDie.com (WordPress 3.0+)

If you upload your videos or other media on one of these sites, then WordPress will automatically embed. Otherwise, you would have to post the embed code manually.

Why can’t I upload the videos to my WordPress?

Well you can, but we do not recommend you to do so. On our shared-hosting accounts videos take a lot of server resource and if your video got tons of traffic, your site is more likely to crash. Secondly, you are missing out the traffic from YouTube users. We highly recommend that you pick a third party site such as Youtube, Vimeo etc to upload your videos.

We hope this post is of help to you.

Posted on

Video sync 1

[flv flashvars=”image=http://www.artitmedia.eu/wp-content/uploads/vpsync/modelok.jpg&logo.file=http://www.artitmedia.eu/wp-content/uploads/vpsync/videotrain-logo-small.png&logo.hide=false&logo.position=top-left&plugins=captions-2,slidesync-1,slidescroller-1&slidesync.xmlPath=http://www.artitmedia.eu/wp-content/uploads/vpsync/vpsync.xml&slidesync.position=right&slidesync.size=450&slidesync.bgcolor=FFFFFF&slidescroller.xmlPath=http://www.artitmedia.eu/wp-content/uploads/vpsync/vpsync.xml&slidescroller.position=bottom&slidescroller.size=150&captions.labels=english,française&captions.files=/wp-content/uploads/vpsync/eng.xml,/wp-content/uploads/vpsync/fra.xml&skin=/wp-content/plugins/vipers-video-quicktags/resources/jw-flv-player/skins/modieusgr.zip” width=”800″ height=”500″]http://www.artitmedia.eu/wp-content/uploads/vpsync/vpsync.flv[/flv]

Posted on

Enable ASP detailed error messages in Plesk 11.5 on Win server 2000 with IIS 7

1. Disable “Custom error documents” by going to “Website Scripting and Security”.

2. Create a new text file with the name “web.config” that you save in the root of the site and put this content into it:

<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
</configuration>

3. Refresh the page and you should have the details about the asp error.

Posted on

Update Custom field in WP

1 Jan – 7 Jan 2014, 1 week, single (£350)
<a href=”?p=450&amp;aimarrivaldate=01/01/2014&amp;aimprice=350#simple-wp-booking-enquiry-form”>Book Now</a>

 

<?php
if($_GET[‘aimprice’]){
  echo ‘<span style=”font-weight:bold; color:red;”>Price: £’ . $_GET[‘aimprice’] . ‘</span>’ ;
  update_post_meta(450, ‘price’, $_GET[‘aimprice’]);
  echo ‘<script type=”text/javascript”> document.getElementById(“arrivaldate”).value=”‘.$_GET[‘aimarrivaldate’].'”; </script>’;
}
?>

Posted on

WordPress Comment/Review form with posts dropdown menu

This is used to for when you need a single form to submit a comment/review by choosing a post from a dropdown menu with all/several posts titles.

1st version shows ALL the posts in the menu and 2nd one allows you to ignore posts from a certain category.

1st version:

<form name=”commentform” action=”wp-comments-post.php” method=”post” id=”commentform”>
<select name=”archive-dropdown” onchange=”var str=this.options[this.selectedIndex].value; document.commentform.comment_post_ID.value = str.substring(str.search(‘p=’)+2);”>
<option value=\”\”><?php echo attribute_escape(__(‘Select Tour’)); ?></option>

<?php wp_get_archives(‘type=postbypost&format=option&show_post_count=0’); ?>

</select>

—————————————

2nd version:

<form name=”commentform” action=”wp-comments-post.php” method=”post” id=”commentform”>
<select name=”archive-dropdown” onchange=”var str=this.options[this.selectedIndex].value; document.commentform.comment_post_ID.value = str.substring(str.search(‘p=’)+2);”>
<option value=\”\”><?php echo attribute_escape(__(‘Select Tour’)); ?></option>

<?php
    $args=array(
      ‘cat’ => -69,
      ‘post_type’ => ‘post’,
      ‘post_status’ => ‘publish’,
      ‘posts_per_page’ => 10,
      ‘caller_get_posts’=> 1
      );
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
      while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <option value=”<?php the_permalink() ?>”><?php the_title(); ?></option>
       <?php
      endwhile;
    }
  wp_reset_query();  // Restore global post data stomped by the_post().
?>

</select>

&nbsp;<p>Your email address will not be published. Required fields are marked <span>*</span></p>
<p><label for=”author”>Name</label> <span>*</span><input id=”author” name=”author” type=”text” value=”” size=”30″ aria-required=”true” /></p>
<p><label for=”email”>Email</label> <span>*</span>
<input id=”email” name=”email” type=”text” value=”” size=”30″ aria-required=”true” /></p>
<p><label for=”url”>Website</label><input id=”url” name=”url” type=”text” value=”” size=”30″ /></p>
<p><label for=”comment”>Review</label><textarea id=”comment” name=”comment” cols=”45″ rows=”8″ aria-required=”true”></textarea></p>
<p>You may use these <abbr title=”HyperText Markup Language”>HTML</abbr> tags and attributes:  <code>&lt;a href=&quot;&quot; title=&quot;&quot;&gt; &lt;abbr title=&quot;&quot;&gt; &lt;acronym title=&quot;&quot;&gt; &lt;b&gt; &lt;blockquote cite=&quot;&quot;&gt; &lt;cite&gt; &lt;code&gt; &lt;del datetime=&quot;&quot;&gt; &lt;em&gt; &lt;i&gt; &lt;q cite=&quot;&quot;&gt; &lt;strike&gt; &lt;strong&gt; </code></p>
<p>
<input name=”submit” type=”submit” id=”submit” value=”Post Review” />
<input type=”hidden” name=”comment_post_ID” value=”” id=”comment_post_ID” />
<input type=”hidden” name=”comment_parent” id=”comment_parent” value=”0” /></p>
<input type=”hidden” id=”_wp_unfiltered_html_comment” name=”_wp_unfiltered_html_comment” value=”8b42defd9a” />
<p style=”display: none;”>
<input type=”hidden” id=”akismet_comment_nonce” name=”akismet_comment_nonce” value=”b3ef566a7d” />
</p>
</form>

—————————-

To just display a list of these posts instead of options in a form, use this code:

<?php
    $args=array(
      'cat' => -3,
      'post_type' => 'post',
      'post_status' => 'publish',
      'posts_per_page' => 5,
      'caller_get_posts'=> 1
      );
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
      echo 'List of 5 Posts but excluding category id 3';
      while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
       <?php
      endwhile;
    }
  wp_reset_query();  // Restore global post data stomped by the_post().
?>
Posted on

Loop through form ids with different names in Javascript

<select name=”EiPromoPenny0″ id=”EiPromoPenny0″>
<option value=0>00</option>
<option value=99>99</option>
<option value=1 selected=”selected”>01</option>
<option value=2>02</option>
<option value=3>03</option>
</select>
<select name=”EiPromoPenny1″ id=”EiPromoPenny1″>
<option value=”red”>red</option>
<option value=”green” selected=”selected”>green</option>
<option value=”blue”>blue</option>
</select>
<select name=”EiPromoPenny2″ id=”EiPromoPenny2″>
<option value=”a”>a</option>
<option value=”b” selected=”selected”>b</option>
<option value=”c”>c</option>
</select>

<script language=”javascript” type=”text/javascript”>
for( var i = 0; i<=2; i++){
alert(document.getElementById(“EiPromoPenny” + i).value);
}
</script>

Posted on

IIS7: HOW TO enable detailed error messages for a website on browsers?

In IIS 7, you can control the detailed error messages being sent to the clients. By default, the detailed error messages can be viewed only by browsing the site from the server itself.

But, this is dangerous because Detailed errors may contain about the inner workings of your web-site. We should allow only trusted persons to see the detailed error messages, that’s why it is configured default to be viewable only from the server.

Example : For a 404.0 error, if the detailed error message is not enabled for the website, then the users will see the following on their browsers:

Server Error

————————————————————————-

HTTP Error 404 – File or directory not found.

If the web browser is installed on the same physical machine as IIS is installed on, the error message may resemble the following:

Server Error in Application “”

————————————————————————–

HTTP Error 404.0 – Not Found

This will be followed by HRESULT, possible cause and resolutions sections.

If you want to enable this detailed error message to be shown on the clients as well, then you need to change the setting in the IIS7 manager.

Follow the below steps for the same:

1. Open the IIS7 manager

2. Select the Website and on its features view, double click on “Error Pages”.

3. Right click and select the “Edit Feature Settings…” or select the same from the Actions pane (in the right hand side)

4. Select the “Detailed errors” radio button and click on OK

5. Now, even your client browsers will be able to see the detailed error messages.

This article gives more information on this detailed error messages with IIS7.

Hope this helps!

Posted on

Best PTC Sites

Top 10 PTC sites in July 2012

1.

  • Ads: ~10 per day, click rate $0.001-$0.02.
  • Payout: Minimum $8 for standard members, to PayPal or AlertPay.
  • Online and paying since 2007.
  • Chance to win $5 every day.
  • Referrals: $0.0002-$0.008 per click. Unlimited number of referrals.

Join ClixSense Now | Site Details

2. PTCBox

  • Ads: $0.005 per click. Offers about 5 ads per day.
  • Payout: Instant to AlertPay/PayPal. Minimum $2 for free members.
  • Paid to sign up offers worth up to $100.
  • Ability to customize your own membership type.
  • Referrals: 10% for free members and up to 100% for upgraded.

Join PTC Box Now | Site Details

3. Clicksia

  • Ads: Usually around 10 per day, with a click rate of $0.003-$0.001.
  • Payout: Minimum $1 to AlertPay or PayPal.
  • Lots of easy sign up offers that pays $0.10 and up.
  • Get paid $0.0001 per hit to promote your referral URL.
  • Referrals: Earn 10% on clicks and sign up offers. Unlimited referrals.

Join Clicksia Now | Site Details

4

Incentria

  • Ads: ~10 ads per day with a click rate of $0.003-$0.001.
  • Payout: AlertPay or PayPal. Low $1 minimum for standard members.
  • Get paid $0.10-$0.50 to complete sign up offers.
  • Promote your referral URL and earn $0.0001 per valid hit.
  • Referrals. Unlimited number of referrals. Earn 10% of all earnings.

Join Incentria Now | Site Details

5

NeoBux

  • Ads: ~20 ads per day that pays $0.001-$0.015 per click.
  • Payout: Payments are instant to AlertPay or PayPal. Minimum $2.
  • Bonus points for every click – exchange for upgrades or money.
  • One of the most trusted PTC sites since 2008.
  • Referrals: $0.0005-$0.005 per referral click and 1% on purchases.

Join NeoBux Now | Site Details

6

DonkeyMails

  • Ads: Varying amount of PTC and PTR ads worth $0.001-$0.0025.
  • Payout: No minimum. AlertPay, PayPal and several other options.
  • Earn up to $25 for sign up offers. New ones added daily.
  • Get paid to promote and earn up to $0.50 per 1000 hits.
  • Referrals: 5 level referral program (earn 10%/5%/3%/2%/1%)

Join DonkeyMails Now | Site Details

7

PaidToClick.in

  • Ads: Low $0.0003 (7 seconds) per click but lots of ads available.
  • Payout: Minimum $2 for standard members to AlertPay and PayPal.
  • Over 100 sign up offers that pays $0.03.
  • Earn $0.05 per 1000 unique views when promoting your referral URL.
  • Referrals: Earn 20% on all referral earnings. Unlimited referrals.

Join PaidToClick.in Now | Site Details

8

BuxP

  • Ads: ~30 ads per day that pays $0.001-$0.005 per click.
  • Payout: Minimum is $8 to AlertPay and $18 if cashing out to PayPal.
  • Online since 2008 and has made over $105,000 in payments.
  • Get paid to watch videos, sign up for offers and complete surveys.
  • Referrals: Earn 50% on all earnings – up to $0.0025 for referral clicks.

Join BuxP Now | Site Details

9

Jill's Click Corner

  • Ads: Pays $0.001-$0.0001 per click. Lots of ads daily.
  • Payout: $0.10, to AlertPay, PayPal, LibertyReserve and others.
  • Signup offers worth $1500 with new ones added daily.
  • Referrals: Earn 10%, no activity needed. Unlimited referrals.
  • Monthly referral contest with a chance to win $100.

Join Jill’s Click Corner Now | Site Details

10

Logi PTC

  • Ads: Pays up to $0.01 per click. Amount of ads varies.
  • Payout: To PayPal. Minimum to cash out is $5.
  • No investing, upgrades or renting referrals. Just click ads and get paid.
  • Toolbar to get notifications when new ads are available.
  • Referrals: 10% on all earning. Unlimited number of referrals.

Join Logi PTC Now | Site Details

All click rates and referral percentages listed above are for standard (free) members. Upgraded members usually receive more money per click, more ads and a higher share on referral clicks.