WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 04.10.2019 01:20:34

losttrip
Member

Sitemap not showing nwi posts

I know with the old News module and WB, posts were listed when using the google_sitemap module.
I installed v1.8.8 is installed and it only shows my main, visible pages, no nwi_ "posts" are shown.

Is there a setting I am missing, or is it something else?

Offline

#2 04.10.2019 06:24:19

florian
Administrator

Re: Sitemap not showing nwi posts

You need version 1.8.9, which is included in the WBCE 1.4.0 package. Or just add before the line

// Bakery

the following code:

// News with images (NWI)
if (in_array('news_img', $modules)) {
	$sql = "SELECT `section_id`, `link`, `posted_when`, `published_when`
			FROM `".TABLE_PREFIX."mod_news_img_posts`
			WHERE `active` = '1'
				AND (`published_when` = '0' OR `published_when` <= $ts)
				AND (`published_until` = '0' OR `published_until` >= $ts)";
	$rs_nwi = $database->query($sql);
	if ($rs_nwi->numRows() > 0) {
		while ($nwi = $rs_nwi->fetchRow()) {
			if (!in_array($nwi['section_id'], $public)) continue;
			$checked = check_link($nwi['link'], $exclude);
			if ($checked === true) {
				$link     = htmlspecialchars($wb->page_link($nwi['link']));
				$lastweek = time() - (4 * 7 * 24 * 60 * 60);
				if ($nwi['posted_when'] < $lastweek) {
					$nwi_priority = $nwi_old_priority;
				}
				if ((version_compare(WB_VERSION, '2.7.0') <= 0) && $nwi['published_when'] > 0){
					$lastmod = gmdate("Y-m-d", $nwi['published_when']+TIMEZONE);
				} else {
					$lastmod = gmdate("Y-m-d", $nwi['posted_when']+TIMEZONE);
				}
				output_xml($link, $lastmod, $nwi_frequency, $nwi_priority);
				$counter++;
			}
			else {
				$debug_info[] = $checked;
			}
		}
	}
}

Offline

#3 04.10.2019 23:04:24

losttrip
Member

Re: Sitemap not showing nwi posts

Thank you.  I was confused by the version numbers.  The WBCE 1.4.0 I downloaded includes google_sitemap ver 1.8.7

I see now that there has been some separate simultaneous development of the module between the WBCE package and the one on Ruud's website, which is ver 1.8.8  which does not include the nwi implementation.

I want to keep Ruud's implementation to show/hide hidden pages:
Version 1.8.8 20181204 (Ruud)
- fixed multiple sections not seen after pages scan

Version 1.8.7 20180529 (Ruud)
- added the $show_hidden variable. When set true hidden pages will be included.

So, I'll just combine the two for my needs.

Thanks!

Offline

#4 05.10.2019 06:42:14

florian
Administrator

Re: Sitemap not showing nwi posts

I see, we missed that showhidden changes in the version which is in 1.4.0, they will be included in the google_sitemap of the next release of WBCE.

Offline

Board footer

Powered by FluxBB

up