mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Closes #4311 - gSitemap select-all option.
This commit is contained in:
@@ -84,11 +84,11 @@ class e_plugin
|
|||||||
"_blank","admin_menu","banner","blogcalendar_menu",
|
"_blank","admin_menu","banner","blogcalendar_menu",
|
||||||
"chatbox_menu", "clock_menu","comment_menu",
|
"chatbox_menu", "clock_menu","comment_menu",
|
||||||
"contact", "download", "featurebox", "forum","gallery",
|
"contact", "download", "featurebox", "forum","gallery",
|
||||||
"gsitemap","import", "linkwords", "list_new", "log", "login_menu",
|
"gsitemap", "hero", "import", "linkwords", "list_new", "log", "login_menu",
|
||||||
"metaweblog", "newforumposts_main", "news", "newsfeed",
|
"metaweblog", "newforumposts_main", "news", "newsfeed",
|
||||||
"newsletter","online", "page", "pm","poll",
|
"newsletter","online", "page", "pm","poll",
|
||||||
"rss_menu","search_menu","siteinfo", "social", "tagcloud", "tinymce4",
|
"rss_menu","search_menu","siteinfo", "social", "tagcloud", "tinymce4",
|
||||||
"tree_menu","user"
|
"user"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -1366,7 +1366,7 @@ class e107plugin
|
|||||||
"metaweblog", "newforumposts_main", "news", "newsfeed",
|
"metaweblog", "newforumposts_main", "news", "newsfeed",
|
||||||
"newsletter","online", "page", "pm","poll",
|
"newsletter","online", "page", "pm","poll",
|
||||||
"rss_menu","search_menu","siteinfo", "social", "tagcloud", "tinymce4",
|
"rss_menu","search_menu","siteinfo", "social", "tagcloud", "tinymce4",
|
||||||
"trackback","tree_menu","user"
|
"user"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -284,7 +284,7 @@ class gsitemap_ui extends e_admin_ui
|
|||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class='center'>".GSLAN_2."</th>
|
<th class='center'><input type='checkbox' name='e-column-toggle' value='jstarget:importid' id='e-column-toggle-jstarget-e-multiselect' class='checkbox checkbox-inline toggle-all form-check-input ui-state-valid' /></th>
|
||||||
<th>".LAN_TYPE."</th>
|
<th>".LAN_TYPE."</th>
|
||||||
<th>".LAN_NAME."</th>
|
<th>".LAN_NAME."</th>
|
||||||
<th>".LAN_URL."</th>
|
<th>".LAN_URL."</th>
|
||||||
@@ -293,6 +293,7 @@ class gsitemap_ui extends e_admin_ui
|
|||||||
<tbody>
|
<tbody>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
foreach($importArray as $k=>$ia)
|
foreach($importArray as $k=>$ia)
|
||||||
{
|
{
|
||||||
$id = 'gs-'.$k;
|
$id = 'gs-'.$k;
|
||||||
@@ -300,8 +301,8 @@ class gsitemap_ui extends e_admin_ui
|
|||||||
<tr>
|
<tr>
|
||||||
<td class='center'><input id='".$id."' type='checkbox' name='importid[]'
|
<td class='center'><input id='".$id."' type='checkbox' name='importid[]'
|
||||||
value='".$ia['name']."^".$ia['url']."^".$ia['type']."^".$ia['plugin']."^".$ia['table']."^".$ia['id']."' /></td>
|
value='".$ia['name']."^".$ia['url']."^".$ia['type']."^".$ia['plugin']."^".$ia['table']."^".$ia['id']."' /></td>
|
||||||
<td><label for='".$id."'>".$ia['type']."</label></td>
|
<td><label for='".$id."' style='cursor:pointer' >".$ia['type']."</label></td>
|
||||||
<td>".$ia['name']."</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>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
@@ -541,7 +542,7 @@ $text = "
|
|||||||
if ($sql->insert("gsitemap", $insert))
|
if ($sql->insert("gsitemap", $insert))
|
||||||
{
|
{
|
||||||
e107::getMessage()->addSuccess(LAN_CREATED);
|
e107::getMessage()->addSuccess(LAN_CREATED);
|
||||||
$log->add('GSMAP_01', $gsitemap->message);
|
$log->add('GSMAP_01', LAN_CREATED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -552,7 +553,7 @@ $text = "
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $this->message = count($_POST['importid'])." link(s) imported.";
|
// $this->message = count($_POST['importid'])." link(s) imported.";
|
||||||
$log->add('GSMAP_01', $gsitemap->message);
|
// $log->add('GSMAP_01', $gsitemap->message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ class gsitemap_event // plugin-folder + '_event'
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$url = $gsmap->url($data['newData']))
|
if(!$url = $gsmap->url($data['table'], $data['newData']))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@ class news_gsitemap
|
|||||||
'id' => $row['category_id'],
|
'id' => $row['category_id'],
|
||||||
'table' => 'news_category',
|
'table' => 'news_category',
|
||||||
'name' => $row['category_name'],
|
'name' => $row['category_name'],
|
||||||
'url' => 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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ class news_gsitemap
|
|||||||
'id' => $row['news_id'],
|
'id' => $row['news_id'],
|
||||||
'table' => 'news',
|
'table' => 'news',
|
||||||
'name' => $row['news_title'],
|
'name' => $row['news_title'],
|
||||||
'url' => $this->url($row),
|
'url' => $this->url('news', $row),
|
||||||
'type' => ADLAN_0
|
'type' => ADLAN_0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -69,8 +69,13 @@ class news_gsitemap
|
|||||||
* @param $row
|
* @param $row
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function url($row)
|
function url($table, $row)
|
||||||
{
|
{
|
||||||
|
if($table === 'news_category')
|
||||||
|
{
|
||||||
|
return e107::getUrl()->create('news/list/category', $row, array('full' => 1));
|
||||||
|
}
|
||||||
|
|
||||||
return e107::getUrl()->create('news/view/item', $row, array('full' => 1));
|
return e107::getUrl()->create('news/view/item', $row, array('full' => 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user