name && 'Madara' != $theme->parent_theme ) { echo '

This plugin requires the "Madara" theme to be installed and active on this site before it can function! Please install it from here: Madara - WordPress Theme for Manga

'; return; } if( ! class_exists('WP_MANGA_STORAGE') ) { echo '

This plugin requires the "Madara Core" plugin to be installed and active on this site before it can function! Please install it from here: Madara - WordPress Theme for Manga

'; return; } $ums_Main_Settings = get_option('ums_Main_Settings', false); $GLOBALS['wp_object_cache']->delete('ums_text_list', 'options'); $all_rules = get_option('ums_text_list', array()); if($all_rules === false) { $all_rules = array(); } $rules_count = count($all_rules); $rules_per_page = get_option('ums_posts_per_page', 10); $max_pages = ceil($rules_count/$rules_per_page); if($max_pages == 0) { $max_pages = 1; } ?>

">

  CodeCanyon.




- name="ums_text_list[max][]" placeholder="Select the max # of generated chapters" value="" class="cr_width_60"/>
×

value="" placeholder="Maximum number of web novels to scrape" class="cr_width_full">
new feature


X
Running

$max_pages) { $next_page = $max_pages; } if($next_page <= 0) { $next_page = 1; } $next_url = str_replace('ums_page=' . $curent_page, 'ums_page=' . $next_page, $next_url); } else { if(stristr($next_url, '?') === false) { if($max_pages == 1) { $next_url .= '?ums_page=1'; } else { $next_url .= '?ums_page=2'; } } else { if($max_pages == 1) { $next_url .= '&ums_page=1'; } else { $next_url .= '&ums_page=2'; } } } } $prev_url = (ums_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; if(stristr($prev_url, 'ums_page=') === false) { if(stristr($prev_url, '?') === false) { $prev_url .= '?ums_page=1'; } else { $prev_url .= '&ums_page=1'; } } else { if(isset($_GET['ums_page'])) { $curent_page = $_GET["ums_page"]; } else { $curent_page = ''; } if(is_numeric($curent_page)) { $go_to = $curent_page - 1; if($go_to <= 0) { $go_to = 1; } if($go_to > $max_pages) { $go_to = $max_pages; } $prev_url = str_replace('ums_page=' . $curent_page, 'ums_page=' . $go_to, $prev_url); } else { if(stristr($prev_url, '?') === false) { $prev_url .= '?ums_page=1'; } else { $prev_url .= '&ums_page=1'; } } } $first_url = (ums_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; if(stristr($first_url, 'ums_page=') === false) { if(stristr($first_url, '?') === false) { $first_url .= '?ums_page=1'; } else { $first_url .= '&ums_page=1'; } } else { if(isset($_GET['ums_page'])) { $curent_page = $_GET["ums_page"]; } else { $curent_page = ''; } if(is_numeric($curent_page)) { $first_url = str_replace('ums_page=' . $curent_page, 'ums_page=1', $first_url); } else { if(stristr($first_url, '?') === false) { $first_url .= '?ums_page=1'; } else { $first_url .= '&ums_page=1'; } } } $last_url = (ums_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; if(stristr($last_url, 'ums_page=') === false) { if(stristr($last_url, '?') === false) { $last_url .= '?ums_page=' . $max_pages; } else { $last_url .= '&ums_page=' . $max_pages; } } else { if(isset($_GET['ums_page'])) { $curent_page = $_GET["ums_page"]; } else { $curent_page = ''; } if(is_numeric($curent_page)) { $last_url = str_replace('ums_page=' . $curent_page, 'ums_page=' . $max_pages, $last_url); } else { if(stristr($last_url, '?') === false) { $last_url .= '?ums_page=' . $max_pages; } else { $last_url .= '&ums_page=' . $max_pages; } } } if(isset($_GET['ums_page']) && is_numeric($_GET['ums_page'])) { $this_page = $_GET["ums_page"]; } else { $this_page = '1'; } echo '
' . esc_html__('First Page', 'ultimate-manga-scraper') . '   ' . esc_html__('Previous Page', 'ultimate-manga-scraper') . '  ' . esc_html__('Page', 'ultimate-manga-scraper') . ' ' . esc_html($this_page) . ' ' . esc_html__('of', 'ultimate-manga-scraper') . ' ' . esc_html($max_pages) . ' - ' . esc_html__("Rules Per Page:", 'ultimate-manga-scraper') . '     ' . esc_html__('Next Page', 'ultimate-manga-scraper') . '   ' . esc_html__('Last Page', 'ultimate-manga-scraper') . '
Info: You can add new rules only on the last page.
'; ?>

"/>


Running -
OK -
Faield -
NoChange -
  • ()
$initial_count) { $add = true; } elseif($final_count < $initial_count) { $scad = true; } if(count($rules) % $rules_per_page === 1 && $add === true) { $rules_count = count($rules); $max_pages = ceil($rules_count/$rules_per_page); if($max_pages == 0) { $max_pages = 1; } $last_url = (ums_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; if(stristr($last_url, 'ums_page=') === false) { if(stristr($last_url, '?') === false) { $last_url .= '?ums_page=' . $max_pages; } else { $last_url .= '&ums_page=' . $max_pages; } } else { if(isset($_GET['ums_page'])) { $curent_page = $_GET["ums_page"]; } else { $curent_page = ''; } if(is_numeric($curent_page)) { $last_url = str_replace('ums_page=' . $curent_page, 'ums_page=' . $max_pages, $last_url); } else { if(stristr($last_url, '?') === false) { $last_url .= '?ums_page=' . $max_pages; } else { $last_url .= '&ums_page=' . $max_pages; } } } ums_redirect($last_url); } elseif(count($rules) != 0 && count($rules) % $rules_per_page === 0 && $scad === true) { $rules_count = count($rules); $max_pages = ceil($rules_count/$rules_per_page); if($max_pages == 0) { $max_pages = 1; } $last_url = (ums_isSecure() ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; if(stristr($last_url, 'ums_page=') === false) { if(stristr($last_url, '?') === false) { $last_url .= '?ums_page=' . $max_pages; } else { $last_url .= '&ums_page=' . $max_pages; } } else { if(isset($_GET['ums_page'])) { $curent_page = $_GET["ums_page"]; } else { $curent_page = ''; } if(is_numeric($curent_page)) { $last_url = str_replace('ums_page=' . $curent_page, 'ums_page=' . $max_pages, $last_url); } else { if(stristr($last_url, '?') === false) { $last_url .= '?ums_page=' . $max_pages; } else { $last_url .= '&ums_page=' . $max_pages; } } } ums_redirect($last_url); } } function ums_expand_rules_text($hu) { $ums_Main_Settings = get_option('ums_Main_Settings', false); $categories = get_terms( 'wp-manga-genre', array( 'hide_empty' => false ) ); if (!get_option('ums_running_list')) { $running = array(); } else { $running = get_option('ums_running_list'); } $GLOBALS['wp_object_cache']->delete('ums_text_list', 'options'); $rules = get_option('ums_text_list'); if(!is_array($rules)) { $rules = array(); } $output = ''; $cont = 0; if (!empty($rules)) { if(isset($_GET["ums_page"]) && is_numeric($_GET["ums_page"])) { $curent_page = $_GET["ums_page"]; } else { $curent_page = 1; } $unlocker = get_option('ums_minute_running_unlocked', false); $posted_items = array(); $post_list = array(); $postsPerPage = 50000; $paged = 0; do { $postOffset = $paged * $postsPerPage; $query = array( 'post_status' => array( 'publish', 'draft', 'pending', 'trash', 'private', 'future' ), 'post_type' => array( 'any' ), 'numberposts' => $postsPerPage, 'meta_key' => 'ums_parent_rule', 'fields' => 'ids', 'offset' => $postOffset ); $got_me = get_posts($query); $post_list = array_merge($post_list, $got_me); $paged++; }while(!empty($got_me)); wp_suspend_cache_addition(true); foreach ($post_list as $post) { $rule_id = get_post_meta($post, 'ums_parent_rule', true); if ($rule_id != '') { $exp = explode('-', $rule_id); if(isset($exp[0]) && isset($exp[1]) && $exp[0] == '1') { $posted_items[] = $exp[1]; } } } $phantom = false; wp_suspend_cache_addition(false); $counted_vals = array_count_values($posted_items); $unlocker = get_option('ums_minute_running_unlocked', false); $rules_per_page = get_option('ums_posts_per_page', 10); foreach ($rules as $request => $bundle[]) { if(($cont < ($curent_page - 1) * $rules_per_page) || ($cont >= $curent_page * $rules_per_page)) { $cont++; continue; } if (isset($counted_vals[$cont])) { $generated_posts = $counted_vals[$cont]; } else { $generated_posts = 0; } $bundle_values = array_values($bundle); $myValues = $bundle_values[$cont]; $array_my_values = array_values($myValues);for($iji=0;$iji
×

' . esc_html__('Rule', 'ultimate-manga-scraper') . ' ID ' . esc_html($cont) . ' ' . esc_html__('Advanced Settings', 'ultimate-manga-scraper') . '

'; $cont = $cont + 1; } } return $output; } ?>
' . esc_html__("Do you want to reverse scraping of chapters and start with oldest?", 'ultimate-manga-scraper') . '
' . esc_html__("Reverse Scraping (Start With Oldest Chapters)", 'ultimate-manga-scraper') . ':
' . esc_html__("Maximum Number Of Novel to Scrape", 'ultimate-manga-scraper') . ':

' . esc_html__("Miscellaneous Options:", 'ultimate-manga-scraper') . '

' . esc_html__("Select the web novel genre that you want for the automatically generated web novel to have.", 'ultimate-manga-scraper') . '
' . esc_html__("Additional Novel Genre", 'ultimate-manga-scraper') . ':
' . esc_html__("Do you want to automatically add web novel genres from the feed items?", 'ultimate-manga-scraper') . '
' . esc_html__("Auto Add Genres", 'ultimate-manga-scraper') . ':
' . esc_html__("Do you want to automatically add web novel tags from the feed items?", 'ultimate-manga-scraper') . '
' . esc_html__("Auto Add Novel Tags", 'ultimate-manga-scraper') . ':
' . esc_html__("Select the web novel tags that you want for the automatically generated web novel to have.", 'ultimate-manga-scraper') . '
' . esc_html__("Additional Novel Tags", 'ultimate-manga-scraper') . ':
' . esc_html__("Do you want to try to use PhantomJS to try to parse JavaScript from crawled pages (for pages that create dynamic content, on page load, using JavaScript)? Please note that for this to work, you must have PhantomJs installed on your server. You can configure the path to PhantomJS from your server, from plugin\'s \'Main Settings\'.", 'ultimate-manga-scraper') . '
' . esc_html__("Content Scraping Method To Use", 'ultimate-manga-scraper') . ':
new feature
' . esc_html__("New feature added to this plugin: it is able to use HeadlessBrowserAPI to scrape with JavaScript rendered content any website from the internet. Also, the Tor node of the API will be able to scrape .onion sites from the Dark Net!", 'ultimate-manga-scraper') . '
'; if($use_phantom == '1') { if($phantom === false) { $phantom = ums_testPhantom(); } if($phantom === 0) { $output .= '
' . esc_html__('INFO: PhantomJS not found - please install it on your server or configure the path to it in plugin\'s \'Main Settings\'!', 'ultimate-manga-scraper') . ' ' . esc_html__('How to install PhantomJs?', 'ultimate-manga-scraper') . ''; } elseif($phantom === -1) { $output .= '
' . esc_html__('INFO: PhantomJS cannot run - shell exec is not enabled on your server. Please enable it and retry using this feature of the plugin.', 'ultimate-manga-scraper') . ''; } elseif($phantom === -2) { $output .= '
' . esc_html__('INFO: PhantomJS cannot run - shell exec is not allowed to run on your server (in disable_functions list in php.ini). Please enable it and retry using this feature of the plugin.', 'ultimate-manga-scraper') . ''; } elseif($phantom === 1) { $output .= '
' . esc_html__('INFO: PhantomJS OK', 'ultimate-manga-scraper') . ''; } } $output .= '
' . esc_html__("Set the number of milliseconds that phantomjs should wait before rendering pages (1000 ms = 1 sec).", 'ultimate-manga-scraper') . '
' . esc_html__("Headless Browser Wait Before Rendering Pages (ms)", 'ultimate-manga-scraper') . ':
' . esc_html__("Do you want to enable comments for the generated web novel?", 'ultimate-manga-scraper') . '
' . esc_html__("Enable Comments For Novel", 'ultimate-manga-scraper') . ':
' . esc_html__("Enable Pingback/Trackback", 'ultimate-manga-scraper') . ': ' . esc_html__("Get Publish Date From Novel", 'ultimate-manga-scraper') . ': ' . esc_html__("Global Chapter Warning Message", 'ultimate-manga-scraper') . ':
' . esc_html__("Set the first chapter slug for the scraped web novel. This needs to be set only if the first chapter URL is different than chapter-1", 'ultimate-manga-scraper') . '
' . esc_html__("First Chapter Slug", 'ultimate-manga-scraper') . ':
' . esc_html__("Do you want to strip images, videos and scripts from newly published chapters?", 'ultimate-manga-scraper') . '
' . esc_html__("Strip Images, Videos And Scripts From Chapters", 'ultimate-manga-scraper') . ':
' . esc_html__("Do you want to automatically translate generated content using Google Translate? If set, this will overwrite the \'Automatically Translate Content To\' option from plugin\'s \'Main Settings\'.", 'ultimate-manga-scraper') . '
' . esc_html__("Automatically Translate Content To", 'ultimate-manga-scraper') . ':
' . esc_html__("Info:", 'ultimate-manga-scraper') . ' ' . esc_html__("for translation, the plugin also supports WPML.", 'ultimate-manga-scraper') . ' ' . esc_html__("Get WPML now!", 'ultimate-manga-scraper') . '
' . esc_html__("Do you want to not translate web novel titles?", 'ultimate-manga-scraper') . '
' . esc_html__("Do Not Translate Title", 'ultimate-manga-scraper') . ':
OK 

X
' . esc_html__('Novels Generated:', 'ultimate-manga-scraper') . ' ' . esc_html($generated_posts) . '
'; if ($generated_posts != 0) { $output .= '' . esc_html__('View Generated Novels', 'ultimate-manga-scraper') . '
'; } $output .= esc_html__('Last Run: ', 'ultimate-manga-scraper'); if ($last_run == '1988-01-27 00:00:00') { $output .= 'Never'; } else { $output .= $last_run; } $output .= '
' . esc_html__('Next Run: ', 'ultimate-manga-scraper'); if($unlocker == '1') { $nextrun = ums_add_minute($last_run, $schedule); } else { $nextrun = ums_add_hour($last_run, $schedule); } $now = ums_get_date_now(); if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) { $output .= esc_html__('WP-CRON Disabled. Rules will not automatically run!', 'ultimate-manga-scraper'); } else { if (isset($active) && $active === '1') { if($unlocker == '1') { $ums_hour_diff = (int)ums_minute_diff($now, $nextrun); } else { $ums_hour_diff = (int)ums_hour_diff($now, $nextrun); } if ($ums_hour_diff >= 0) { $append = 'Now.'; $cron = _get_cron_array(); if ($cron != FALSE) { $date_format = _x('Y-m-d H:i:s', 'Date Time Format1', 'ultimate-manga-scraper'); foreach ($cron as $timestamp => $cronhooks) { foreach ((array) $cronhooks as $hook => $events) { if ($hook == 'umsaction') { foreach ((array) $events as $key => $event) { $append = date_i18n($date_format, $timestamp); } } } } } $output .= $append; } else { $output .= $nextrun; } } else { $output .= esc_html__('Rule Disabled', 'ultimate-manga-scraper'); } } $output .= '
' . esc_html__('Local Time: ', 'ultimate-manga-scraper') . $now; $output .= '
Running