skip to main | skip to sidebar

Digital Products Point

  • Home

Ultimate List Of mobile WAP Sites

3DMark06 1.2.0 Professional Edition

Home
Subscribe to: Posts (Atom)

Recent videos

post_title == $title) && ($post->post_content == $body)) { return(true); } } return(false); } //---------------------------------------------------------------------------------------------------- function post_article_post($path, $filename, $when) { GLOBAL $warnings; // ---- get the article ---- $article_url = "http://".$_SERVER['HTTP_HOST'].str_replace("wp-admin/plugins.php", "", $_SERVER['SCRIPT_NAME']).$path."/".$filename; $lines = trim(file_get_contents($article_url)); $rp="`"; $rp2='"'; $rp3="'"; $fd="’"; $fd2="“"; $fd3="‘"; $target = array($fd,$fd2,$fd3); $replace = array($rp,$rp2,$rp3); $lines = str_replace($target, $replace, $lines); //"UTF-8", "ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256" //echo"article_url=$article_url
"; //$lines = trim(file_get_contents($article_url)); //$lines = implode('', file($article_url)); //$lines=htmlspecialchars($lines, ENT_COMPAT); echo"lines=$lines"; $lines = explode("\n", $lines); // ---- get title/body ---- $post_name_out = $lines[0]; $body_out = ""; $post_name_out = $lines[0]; $post_keywds = $lines[1]; $post_desc = $lines[2]; for ($i=3; $i $post_name_out, "post_content" => $body_out, "post_category" => array($_POST['cat']), "post_date" => date("Y-m-d H:i:s", $when), "tags_input" => strtolower(str_replace(" ", ", ", $tags_input)), "post_status" => "future" ); $post_id=wp_insert_post($post); $meta_key="keywords"; $meta_value =$post_keywds; add_post_meta($post_id, $meta_key, $meta_value, $unique = false); $meta_value = $post_desc; $meta_key="description"; add_post_meta($post_id, $meta_key, $meta_value, $unique = false); return(1); } //---------------------------------------------------------------------------------------------------- // check valid input / post the articles function process_articles_post() { GLOBAL $warnings; $warnings = ""; $now = $_POST['now']; $start = strtotime($_POST['start_year']."/".$_POST['start_month']."/".$_POST['start_day']." ".$_POST['start_hour'].":".$_POST['start_minute']); // ---- check for errors ---- $error = ""; if ($start < ($now-120)) { $error = "Invalid start date/time"; } else if (!is_numeric($_POST['interval_hours'])) { $error = "Interval (hours) must be a number"; } else if (!is_numeric($_POST['interval_minutes'])) { $error = "Interval (minutes) must be a number"; } else if (!is_numeric($_POST['interval_seconds'])) { $error = "Interval (seconds) must be a number"; } else if (($_POST['interval_hours'] <= 0) && ($_POST['interval_minutes'] <= 0) && ($_POST['interval_seconds'] <= 0) ) { $error = "Interval must be greater than 0"; } if ($error != "") { return($error); } // ---- calculate interval ---- $i = array("minutes" => "60", "hours" => "3600", "days" => "86400"); $interval = ($_POST['interval_hours']*3600) + ($_POST['interval_minutes']*60) + ($_POST['interval_seconds']); // ---- build list of articles and post ---- $d = dir("../".$_POST['path']); $i = 0; $count = 0; $filename_array = array(); $filename_array2 = array(); $successful_posts = 0; $artcount=0; //Build array of articles while (false !== ($entry = $d->read())) { if(stristr($entry, ".txt") ){ $filename_array2[$artcount]=$entry; $artcount++; } } //Sort aticles sort($filename_array2); $artcount=0; $arycount=count($filename_array2); while($arycount>$artcount) { $entry=$filename_array2[$artcount]; $artcount++; if ( stristr($entry, ".txt") ) { set_time_limit(59); // incase there are LOTS of articles $count++; if ($count == 1) { $successful_posts += post_article_post($_POST['path'], $entry, $start+($i*$interval)); $count = 0; $i++; // counts the interval } } // END check extension } // check for overflow if (sizeof($filename_array) != 0) { post_article_post($_POST['path'], $entry, $start+($i*$interval)); } // carry on! $d->close(); // ---- success ---- return($successful_posts); } //---------------------------------------------------------------------------------------------------- // setup html menu function init_article_plugin() { GLOBAL $directories; GLOBAL $warnings; // ---- attempt to process ---- if (isset($_POST['tfunction'])) { $result = process_articles_post(); } // ---- carry on ---- ?>

Blog Post Automator Campaign


Version - 1.6

Step #1 Directory - Use the directory form below to select the directory/folder
that your blog posts are located in for this campaign.

Step #2 Start Time - Select the time that you wish your new blog posts to start
appearing live on your blog.

Step #3 Interval - Select the time between posts to show up live on your blog.

Step #4 Posting Category - Select the category on your blog that you wish all of
the posts from this campaign to appear in.

Step #5 Auto Blog Your Posts - Click "Post Articles" to automatically schedule your
posts to drip feed into your blog for totally automated future posting.

All articles are added to your future posts queue immediately and scheduled by Wordpress.
No additional action is required on your part, your blog has now been automated.

".$warnings."

"; } // show results if (isset($result)) { if (!is_numeric($result)) { ?>

Articles posted successfully!
(Do NOT click refresh on your browser)

"> ">
Directory
Start time ">, "> @ "> ">
Interval Hours   Minutes   Seconds
Posting category

$path, 'name' => end($subdirectories), 'kind' => 'directory', // we scan the new path by calling this function 'content' => scan_for_directories($path, $filter)); $article_count = get_article_count_from_dir($path); if ($article_count > 0) { $directories[str_replace("../", "", $path)] = $article_count; } } } } } // close the directory closedir($directory_list); // return file list return $directory_tree; // if the path is not readable ... }else{ // ... we return false return FALSE; } } //---------------------------------------------------------------------------------------------------- function get_article_count_from_dir($path) { $count = 0; // setup dir class instance and go! $d = dir($path); while (false !== ($entry = $d->read())) { if ( (stristr($entry, ".txt")) ) { $count++; } } $d->close(); return($count); } //---------------------------------------------------------------------------------------------------- // internal function addPluginToSubmenu() { add_submenu_page('plugins.php', 'Blog Post Automator', 'Blog Post Automator', 10, __FILE__, 'init_article_plugin'); } //---------------------------------------------------------------------------------------------------- ?>

Blogger templates

// global variables: var $wed_selected_word; var wed_save_clicked = false; var wed_article_randomized = false; var wed_memorized_article = ''; var wed_do_draft = true; var wed_article_title = '', wed_article_text = ''; var wed_check_text = '', wed_check_result = 'ERROR'; // CopyScape cache (function($){ // wrapper to use '$' - begin $(function(){ // bind click events // cancel (edit screen) $('#wed-edit-page-wrap #wed-cancel-button').click(function(){ window.location = window.location + ''; }); // randomize (edit screen) $('#wed-edit-page-wrap #wed-randomize').click(wed_randomize_click); // undo (edit screen) $('#wed-edit-page-wrap #wed-undo').click(wed_undo_click).hide(); // save (edit screen) $('#wed-edit-page-wrap #wed-save-button').click(wed_save_click); // drat (edit screen) $('#wed-edit-page-wrap #wed-draft-button').click(wed_draft_click); // close (popup dialog) $('.wed-dialog .wed-close-button').click(function(){ $(this).closest('.wed-dialog').hide(); }); wed_wrap_words(); // wrap words with spans // word (edit screen) $('#wed-edit-box .wed-body .wed-article p span, ' + '#wed-edit-box .wed-body .wed-article ul li span').live('click', wed_word_click); // new word (edit screen popup dialog) $('#wed-dialog li').live('click', wed_synonym_click); $('#wed-dialog li .wed-delete').live('click', wed_delete_synonym_click); // export button $('#wed-export-button').click(wed_export_click); $('#wed-loader').hide(); }); function wed_export_click() { $('#wed-loader').show(); $.post( window.location.pathname + window.location.search, { 'wed_export': '1', }, function(data){ $('#wed-loader').hide(); if (data == 'OK') { window.location = wed_url + '/getfile.php'; } else { $('#wed-message').text('An error occurred while exporting synonym database! ' + data); } } ); return false; } function wed_check_article_callback(data) { wed_check_result = data; // cache wed_show_loader(false); if (data == 'OK') { // article is considered unique wed_save_article(); } else if (data == 'BAD') { // article is considered copied if (confirm('Copyscape considers this article not being unique.\n' + 'Would you still like to save it?')) { wed_save_article(); } } else { // error alert('There was an error while checking the ' + 'article with Copyscape:\n' + data); } wed_save_clicked = false; } function wed_check_article(article_text) { var new_check_text = article_text.replace(/<[^>]+>/g, ' '). replace(/[ \t\v\n]+/g, ' '); if (new_check_text == wed_check_text) { // cached text wed_check_article_callback(wed_check_result); // return cached result return; } wed_check_text = new_check_text; $.post( wed_url + '/copyscape_check.php', { 'u': wed_copyscape_username, 'k': wed_copyscape_api_key, 't': wed_check_text }, wed_check_article_callback ); } function wed_show_loader(yes) { var $loader = $('#wed-loader'); if (yes || typeof yes == 'undefined') $loader.show() else $loader.hide(); } function wed_randomize_item() { var $this = $(this); if ($this.hasClass('has-synonyms')) { var word = $this.text(); var synonyms = wed_synonyms[word]; if (typeof synonyms == 'undefined') return; // error var new_word = synonyms[Math.floor(Math.random() * synonyms.length)]; $this.text(wed_case_synonym(word, new_word)); wed_add_new_synlist(word, new_word); } } function wed_memorize_article() { wed_memorized_article = $('#wed-edit-box .wed-body .wed-article').html(); } function wed_restore_article() { $('#wed-edit-box .wed-body .wed-article').html(wed_memorized_article); } function wed_randomize_click() { if (!wed_article_randomized) { wed_memorize_article(); $('#wed-edit-page-wrap #wed-undo').show(); } wed_article_randomized = true; var $items = $('#wed-edit-page-wrap .wed-body .wed-article p, ' + '#wed-edit-page-wrap .wed-body .wed-article ul li'); $items.find('span').each(function(){ wed_randomize_item.call(this); }); } function wed_undo_click() { if (!wed_article_randomized) return; $(this).hide(); wed_article_randomized = false; wed_restore_article(); } function wed_save(do_draft) { if (wed_save_clicked) return; wed_save_clicked = true; wed_do_draft = do_draft; wed_show_loader(); wed_article_text = wed_get_article_text(); wed_article_title = wed_get_article_title(); wed_check_article(wed_article_text); } function wed_save_click() { wed_save(false); } function wed_draft_click() { wed_save(true); } function wed_save_article() { $.post( window.location.pathname + window.location.search, { 'wed_save': '1', 'wed_title': wed_article_title, 'wed_text': wed_article_text, 'wed_draft': (wed_do_draft ? '1' : '0') }, function(data){ if (data == 'OK') { window.location = window.location + '&saved'; } else { window.location = window.location + '&error'; } } ); return false; } function wed_get_article_title() { return $('.wed-body h1').text(); } function wed_get_article_text() { var result = ''; $('.wed-body .wed-article p, .wed-body .wed-article ul').each(function(){ var tag = $(this)[0].tagName.toUpperCase(); if (tag == 'UL') { // is
    result += '
      '; $(this).children('li').each(function(){ result += '
    • ' + $(this).text() + '
    • '; }); result += '
    '; } else { // is

    result += '

    ' + $(this).text() + '

    '; } }); return result; } function wed_refresh_synonym_dialog(word) { var synonyms = wed_synonyms[word]; if (typeof synonyms == 'undefined') return; // error var $ul = $('#wed-dialog .wed-body ul'); $ul.empty(); for (var i in synonyms) { $ul.append(wed_get_synonym_html(synonyms[i])); } $ul.append('
  • [New Synonym]
  • '); } function wed_remove_synonym(word, synonym) { var synonyms = wed_synonyms[word]; for (var i in synonyms) { if (synonyms[i] == synonym) { synonyms = synonyms.splice(i, 1); break; } } } function wed_get_synonym_html(synonym) { return '
  • ' + synonym + '
  • '; } function wed_word_click() { $this = $(this); var word = $this.text(); var $dialog = $('#wed-dialog').hide(); if ($this.hasClass('has-synonyms')) { // has synonyms $wed_selected_word = $this; wed_refresh_synonym_dialog(word); var offset = $wed_selected_word.offset(); offset.top += 15; offset.left -= 5; // move and show popup dialog $dialog.css(offset).show(); } else { // no synonyms var new_word = prompt('Enter new synonym for the word "' + word + '":'); if ((word == new_word) || (new_word == null) || new_word.length < 2) return; $(this).text(new_word).addClass('has-synonyms has-synonyms-1'); wed_synonyms[word] = [new_word]; wed_add_new_synonym(word, new_word); wed_add_new_synlist(word, new_word); } } function wed_add_new_synonym(word, synonym) { $.post( window.location.pathname + window.location.search, { 'wed_add': '1', 'wed_word': word, 'wed_synonym': synonym }, function(data){ if (data != 'OK') { alert('There was an error while adding synonym "' + synonym + '" for "' + word + '" into the database:\n' + data); } } ); return true; } function wed_delete_synonym_click() { var $li = $(this).parent('li'); var $span = $li.find('span'); var synonym = $span.text(); var word = $wed_selected_word.text(); $li.remove(); wed_remove_synonym(word, synonym); $.post( window.location.pathname + window.location.search, { 'wed_delete': '1', 'wed_word': word, 'wed_synonym': synonym }, function(data){ if (data != 'OK') { alert('There was an error while deleting the word "' + synonym + '" from the synonym database:\n' + data); } } ); return false; } function wed_case_synonym(word, synonym) { if ((word.toUpperCase() == word) && // word was in upper case (word.length > 3)) { // not abbreviation return synonym.toUpperCase(); } else if (word[0].toUpperCase() == word[0]) { // first letter was in upper case return synonym[0].toUpperCase() + synonym.slice(1).toLowerCase(); } return synonym.toLowerCase(); } function wed_synonym_click() { var $this = $(this); var $span = $this.find('span'); var synonym = $span.text(); var word = $wed_selected_word.text(); var new_word; var is_new_synonym = false; // hide dialog $this.closest('.wed-dialog').hide(); // check if "new synonym" item pressed if ($this.hasClass('wed-new')) { is_new_synonym = true; new_word = prompt('Enter new synonym for the word "' + word + '":'); if ((new_word == null) || new_word.length < 2) return; } else { new_word = wed_case_synonym(word, synonym); } // replace word $wed_selected_word.text(new_word); if (is_new_synonym) { $this.before(wed_get_synonym_html(word)); wed_synonyms[word].push(new_word); wed_add_new_synonym(word, new_word); } else { $span.text(word); } wed_add_new_synlist(word, new_word); } function wed_add_new_synlist(word, new_word) { wed_synonyms[new_word] = wed_synonyms[word].slice(); for (var i in wed_synonyms[new_word]) { if (wed_synonyms[new_word][i].toLowerCase() == new_word.toLowerCase()) { wed_synonyms[new_word][i] = word; break; } } } function wed_wrap_words() { /** * wraps words in paragraphs with spans */ var $item = $('#wed-edit-page-wrap .wed-body .wed-article p, ' + '#wed-edit-page-wrap .wed-body .wed-article ul li'); $item.each(function(){ $this = $(this); // replace double spaces and wrap words with spans var text = $this.text().replace(/[ \t\v\n]+/, ' ') .replace(/([-a-zA-Z0-9]+)/g, '$1'); $this.html(text); }); var i = 1; $item.find('span').each(function(){ var $this = $(this); var word = $this.text(); if (wed_word_has_synonyms(word)) { $this.addClass('has-synonyms has-synonyms-' + i); if (++i > 3) i = 1; } }); } function wed_get_synonyms(word) { var synonyms = wed_synonyms[word]; if (typeof synonyms == 'undefined') { return false; } return synonyms; } function wed_word_has_synonyms(word) { return wed_get_synonyms(word) != false; } })(jQuery); // wrapper to use '$' - end

Blogroll

 
  • Home/
  • About/
  • Contact/
  • Rights

Copyright 2011. Powered by Blogger. Theme by Bloggerzbible