mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Gsitemap: Display link visibility status while importing.
This commit is contained in:
@@ -35,7 +35,8 @@ class download_gsitemap
|
|||||||
'table' => 'download_category',
|
'table' => 'download_category',
|
||||||
'name' => $row['download_category_name'],
|
'name' => $row['download_category_name'],
|
||||||
'url' => e107::url('download', 'category', $row, array('mode' => 'full' )),
|
'url' => e107::url('download', 'category', $row, array('mode' => 'full' )),
|
||||||
'type' => LAN_PLUGIN_DOWNLOAD_NAME
|
'type' => LAN_PLUGIN_DOWNLOAD_NAME,
|
||||||
|
'class' => 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +48,8 @@ class download_gsitemap
|
|||||||
'table' => 'download',
|
'table' => 'download',
|
||||||
'name' => $row['download_name'],
|
'name' => $row['download_name'],
|
||||||
'url' => e107::url('download', 'item', $row, array('mode' => 'full' )),
|
'url' => e107::url('download', 'item', $row, array('mode' => 'full' )),
|
||||||
'type' => LAN_PLUGIN_DOWNLOAD_NAME
|
'type' => LAN_PLUGIN_DOWNLOAD_NAME,
|
||||||
|
'class' => 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,7 +30,8 @@ class forum_gsitemap // plugin-folder + '_rss'
|
|||||||
'table' => 'forum',
|
'table' => 'forum',
|
||||||
'name' => $row['forum_name'],
|
'name' => $row['forum_name'],
|
||||||
'url' => e107::url('forum','forum',$row, array('mode'=>'full')), // ('forum/forum/view', $row['forum_id']),
|
'url' => e107::url('forum','forum',$row, array('mode'=>'full')), // ('forum/forum/view', $row['forum_id']),
|
||||||
'type' => LAN_PLUGIN_FORUM_NAME
|
'type' => LAN_PLUGIN_FORUM_NAME,
|
||||||
|
'class' => (int) $row['forum_class']
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -224,12 +224,13 @@ class gsitemap_ui extends e_admin_ui
|
|||||||
'id' => $row['link_id'],
|
'id' => $row['link_id'],
|
||||||
'name' => $row['link_name'],
|
'name' => $row['link_name'],
|
||||||
'url' => !empty($row['link_owner']) && !empty($row['link_sefurl']) ? e107::url($row['link_owner'], $row['link_sefurl']) : $row['link_url'],
|
'url' => !empty($row['link_owner']) && !empty($row['link_sefurl']) ? e107::url($row['link_owner'], $row['link_sefurl']) : $row['link_url'],
|
||||||
'type' => GSLAN_1);
|
'type' => GSLAN_1,
|
||||||
|
'class' => (int) $row['link_class']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* custom pages ... */
|
/* custom pages ... */
|
||||||
$query = "SELECT p.page_id, p.page_title, p.page_sef, p.page_chapter, ch.chapter_sef as chapter_sef, b.chapter_sef as book_sef FROM #page as p
|
$query = "SELECT p.page_id, p.page_title, p.page_sef, p.page_class, p.page_chapter, ch.chapter_sef as chapter_sef, b.chapter_sef as book_sef FROM #page as p
|
||||||
LEFT JOIN #page_chapters as ch ON p.page_chapter = ch.chapter_id
|
LEFT JOIN #page_chapters as ch ON p.page_chapter = ch.chapter_id
|
||||||
LEFT JOIN #page_chapters as b ON ch.chapter_parent = b.chapter_id
|
LEFT JOIN #page_chapters as b ON ch.chapter_parent = b.chapter_id
|
||||||
WHERE page_title !='' ORDER BY page_datestamp ASC";
|
WHERE page_title !='' ORDER BY page_datestamp ASC";
|
||||||
@@ -247,7 +248,8 @@ class gsitemap_ui extends e_admin_ui
|
|||||||
'id' => $row['page_id'],
|
'id' => $row['page_id'],
|
||||||
'name' => $row['page_title'],
|
'name' => $row['page_title'],
|
||||||
'url' => e107::getUrl()->create($route, $row, array('full'=>1, 'allow' => 'page_sef,page_title,page_id, chapter_sef, book_sef')),
|
'url' => e107::getUrl()->create($route, $row, array('full'=>1, 'allow' => 'page_sef,page_title,page_id, chapter_sef, book_sef')),
|
||||||
'type' => "Page"
|
'type' => "Page",
|
||||||
|
'class' => $row['page_class']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,8 +281,9 @@ class gsitemap_ui extends e_admin_ui
|
|||||||
<colgroup>
|
<colgroup>
|
||||||
<col class='center' style='width:5%;' />
|
<col class='center' style='width:5%;' />
|
||||||
<col style='width:15%' />
|
<col style='width:15%' />
|
||||||
<col style='width:40%' />
|
<col style='width:30%' />
|
||||||
<col style='width:40%' />
|
<col style='width:auto' />
|
||||||
|
<col style='width:115px' />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -288,15 +291,29 @@ class gsitemap_ui extends e_admin_ui
|
|||||||
<th>".LAN_TYPE."</th>
|
<th>".LAN_TYPE."</th>
|
||||||
<th>".LAN_NAME."</th>
|
<th>".LAN_NAME."</th>
|
||||||
<th>".LAN_URL."</th>
|
<th>".LAN_URL."</th>
|
||||||
|
<th class='center'>".defset('GSLAN_50', 'Publicly visible')."</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
|
$uc = e107::getUserClass();
|
||||||
|
|
||||||
foreach($importArray as $k=>$ia)
|
foreach($importArray as $k=>$ia)
|
||||||
{
|
{
|
||||||
$id = 'gs-'.$k;
|
$id = 'gs-'.$k;
|
||||||
|
|
||||||
|
$class = '';
|
||||||
|
$classLabel = ADMIN_FALSE_ICON;
|
||||||
|
|
||||||
|
if(isset($ia['class']) && ((int) $ia['class'] === e_UC_PUBLIC))
|
||||||
|
{
|
||||||
|
$class = 'label-success';
|
||||||
|
$classLabel = ADMIN_TRUE_ICON;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td class='center'><input id='".$id."' type='checkbox' name='importid[]'
|
<td class='center'><input id='".$id."' type='checkbox' name='importid[]'
|
||||||
@@ -304,6 +321,7 @@ class gsitemap_ui extends e_admin_ui
|
|||||||
<td><label for='".$id."' style='cursor:pointer' >".$ia['type']."</label></td>
|
<td><label for='".$id."' style='cursor:pointer' >".$ia['type']."</label></td>
|
||||||
<td><label for='".$id."' style='cursor:pointer'>".defset($ia['name'],$ia['name'])."</label></td>
|
<td><label for='".$id."' style='cursor:pointer'>".defset($ia['name'],$ia['name'])."</label></td>
|
||||||
<td><span class='smalltext'>".str_replace(SITEURL,"",$ia['url'])."</span></td>
|
<td><span class='smalltext'>".str_replace(SITEURL,"",$ia['url'])."</span></td>
|
||||||
|
<td class='center'>". $classLabel."</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
@@ -62,4 +62,6 @@ define("GSLAN_39", "No links in sitemap - import sitelinks?");
|
|||||||
// define('GSLAN_41', "Google Sitemap. For more information on the Sitemap protocol, go to <a href='http://www.sitemaps.org/'>http://www.sitemaps.org/</a> or <a href='http://www.google.com/support/webmasters/bin/answer.py?answer=156184'>Google's page About Sitemaps</a>");
|
// define('GSLAN_41', "Google Sitemap. For more information on the Sitemap protocol, go to <a href='http://www.sitemaps.org/'>http://www.sitemaps.org/</a> or <a href='http://www.google.com/support/webmasters/bin/answer.py?answer=156184'>Google's page About Sitemaps</a>");
|
||||||
//define('GSLAN_42', 'Installation Successful..');
|
//define('GSLAN_42', 'Installation Successful..');
|
||||||
|
|
||||||
|
define("GSLAN_50", "Publicly visible");
|
||||||
|
|
||||||
|
|
||||||
|
@@ -36,7 +36,8 @@ class news_gsitemap
|
|||||||
'table' => 'news_category',
|
'table' => 'news_category',
|
||||||
'name' => $row['category_name'],
|
'name' => $row['category_name'],
|
||||||
'url' => $this->url('news_category', $row), // e107::getUrl()->create('news/list/category', $row, array('full' => 1)) ,
|
'url' => $this->url('news_category', $row), // e107::getUrl()->create('news/list/category', $row, array('full' => 1)) ,
|
||||||
'type' => LAN_NEWS_23
|
'type' => LAN_NEWS_23,
|
||||||
|
'class'=> 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +58,8 @@ class news_gsitemap
|
|||||||
'table' => 'news',
|
'table' => 'news',
|
||||||
'name' => $row['news_title'],
|
'name' => $row['news_title'],
|
||||||
'url' => $this->url('news', $row),
|
'url' => $this->url('news', $row),
|
||||||
'type' => ADLAN_0
|
'type' => ADLAN_0,
|
||||||
|
'class' => (int) $row['news_class'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user