Loading videos/etc without https

function fixObjectProtocol(){

var getSrc = function(src){
return src.replace(/^(?:(ht|f)tp(s?)\:\/\/)?/i, document.location.protocol+'//');
}

// OBJECT
$('object param[name="movie"]').each(function(){
with($(this)) if(attr('value').length) attr( 'value', getSrc(attr('value')) );
});

// EMBED, HTML5
$('embed, video source, audio source').each(function(){
with($(this)) if(attr('src').length) attr( 'src', getSrc(attr('src')) );
});

}
fixObjectProtocol();

});

Custom Google search

  • Create CSE http://www.google.com/cse/setup/basic?cx=00123237129537399800390:cusdfsdfp1pkwpc
  • Set query parameter  to q_as to avoid conflicts with WordPress and Drupal ?q string
  • Add search box with redirect to another page<!-- BEGIN: Search Form ----- -->
    <div id="search-form">
    <gcse:searchbox-only resultsUrl="/googlesearch" queryParameterName="q_as"></gcse:searchbox-only> </div>
    <!-- END: Search Form ----- -->
  •  Add code on page /googlesearch to display results only
    <gcse:search linktarget="_parent" queryparametername="q_as"></gcse:search>
  • Configure options for colors on the search page and colors of button in search engine
  • Optionally you can link site search to webmaster tools for more complete info

Adding image thumbnails to search results

add code  https://developers.google.com/custom-search/docs/structured_data#addtopage

<!–
    <DataObject type=”action”>
      <Attribute name=”label” value=”Download”/>
      <Attribute name=”class” value=”download”/>
    </DataObject>
    <DataObject type=”action”>
      <Attribute name=”label” value=”Fullscreen View”/>
      <Attribute name=”class” value=”fullscreen”/>
    </DataObject>
  </PageMap>
–>
Replace google  image in search box
<style>
      .gsc-input input {
          background-image: url('/search_files/search_bkgr.png') !important;          
          background-position: right !important;
          background-repeat: no-repeat !important;
} </style>

Database update statement

UPDATE `wp_posts` SET post_title = REPLACE (post_title, “
”, “<p>”)

UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://oldurl/', 'http://newurl/');
UPDATE wp_posts_nodomain SET post_content = REPLACE(post_content, 'http://oldurl/', 'http://newurl/');

test SELECT COUNT(*) post_content FROM wp_posts WHERE post_content LIKE '%http://oldurl%';

hover text

http://meyerweb.com/eric/css/edge/popups/demo.html

<div class=”help_register” >

<a href=”/faq/”> <img src=”http://irina.redroom.com/sites/all/themes/redroom/images/questionmark.png”  /> <span> This is the address where we will send emails and newsletters. We won�t share this address with anyone without your permission. </span> </a>

</div>
</div>
</div>
<style>
.help_register�� {� position:absolute;�� left: 42em; }
div.help_register a span {display: none;}
div.help_register a:hover { display: block; } /*ie workaround for hover to work */
div.help_register� a:hover span {�� �display: block;
position:absolute;
width: 18em;
left: 10px;
text-decoration:none;
border: 1px dotted #900; background-color:#eee; padding: .8em;
z-index: 20;
}
</style>

NextGEN Gallery

http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/

http://nextgen.boelinger.com/

http://nextgen.boelinger.com/custom-fields/

http://dpotter.net/Technical/index.php/2008/05/14/nextgen-gallery-review-displaying-images-album/?album=1&gallery=2