mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Closes #4311 - gSitemap select-all option.
This commit is contained in:
parent
94f772577a
commit
15488f1c7e
@ -84,11 +84,11 @@ class e_plugin
|
||||
"_blank","admin_menu","banner","blogcalendar_menu",
|
||||
"chatbox_menu", "clock_menu","comment_menu",
|
||||
"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",
|
||||
"newsletter","online", "page", "pm","poll",
|
||||
"rss_menu","search_menu","siteinfo", "social", "tagcloud", "tinymce4",
|
||||
"tree_menu","user"
|
||||
"user"
|
||||
);
|
||||
|
||||
|
||||
@ -1366,7 +1366,7 @@ class e107plugin
|
||||
"metaweblog", "newforumposts_main", "news", "newsfeed",
|
||||
"newsletter","online", "page", "pm","poll",
|
||||
"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>
|
||||
<thead>
|
||||
<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_NAME."</th>
|
||||
<th>".LAN_URL."</th>
|
||||
@ -293,6 +293,7 @@ class gsitemap_ui extends e_admin_ui
|
||||
<tbody>
|
||||
";
|
||||
|
||||
|
||||
foreach($importArray as $k=>$ia)
|
||||
{
|
||||
$id = 'gs-'.$k;
|
||||
@ -300,8 +301,8 @@ class gsitemap_ui extends e_admin_ui
|
||||
<tr>
|
||||
<td class='center'><input id='".$id."' type='checkbox' name='importid[]'
|
||||
value='".$ia['name']."^".$ia['url']."^".$ia['type']."^".$ia['plugin']."^".$ia['table']."^".$ia['id']."' /></td>
|
||||
<td><label for='".$id."'>".$ia['type']."</label></td>
|
||||
<td>".$ia['name']."</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><span class='smalltext'>".str_replace(SITEURL,"",$ia['url'])."</span></td>
|
||||
</tr>
|
||||
";
|
||||
@ -541,7 +542,7 @@ $text = "
|
||||
if ($sql->insert("gsitemap", $insert))
|
||||
{
|
||||
e107::getMessage()->addSuccess(LAN_CREATED);
|
||||
$log->add('GSMAP_01', $gsitemap->message);
|
||||
$log->add('GSMAP_01', LAN_CREATED);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -552,7 +553,7 @@ $text = "
|
||||
}
|
||||
|
||||
// $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;
|
||||
}
|
||||
|
||||
if(!$url = $gsmap->url($data['newData']))
|
||||
if(!$url = $gsmap->url($data['table'], $data['newData']))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class news_gsitemap
|
||||
'id' => $row['category_id'],
|
||||
'table' => 'news_category',
|
||||
'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
|
||||
);
|
||||
}
|
||||
@ -56,7 +56,7 @@ class news_gsitemap
|
||||
'id' => $row['news_id'],
|
||||
'table' => 'news',
|
||||
'name' => $row['news_title'],
|
||||
'url' => $this->url($row),
|
||||
'url' => $this->url('news', $row),
|
||||
'type' => ADLAN_0
|
||||
);
|
||||
}
|
||||
@ -69,8 +69,13 @@ class news_gsitemap
|
||||
* @param $row
|
||||
* @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));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user