Hi David.
How can I add a new button in Admin Home (feed Management) of edit job (if feed exists) next to register?
Also, in automation_tool_edit.php, I want to be able to see Last OK Run and Status.
Thank you!
Hi,
To add the button edit admin/index.php and look for the following code at line 8:
require("admin_header.php");
...and REPLACE with:
require("admin_header.php"); $sql = "SELECT * FROM `".$config_databaseTablePrefix."jobs`"; database_querySelect($sql,$rows); $jobIds = array(); foreach($rows as $row) { $jobIds[$row["filename"]] = $row["id"]; }
Then look for the following code at (now) line 161:
admin_tool("Register","feeds_register_step1.php?filename=".urlencode($filename),TRUE,FALSE);
admin_tool("Register","feeds_register_step1.php?filename=".urlencode($filename),TRUE,FALSE); if (isset($jobIds[$filename])) { admin_tool("Edit Job","automation_tool_edit.php?id=".$jobIds[$filename],TRUE,FALSE); }
For the job info; edit admin/automation_tool_edit.php and look for the following code at line 128:
widget_formBegin();
print "<table>"; print "<tr>"; print "<th>".translate("Last OK Run")."</th>"; print "<th>".translate("Status")."</th>"; print "</tr>"; print "<tr>"; print "<td class='pta_mid'>".($jobs[0]["lastrun"]?date("Y-m-d H:i:s",$jobs[0]["lastrun"]):"-")."</td>"; print "<td class='pta_mid' style='font-size:x-small; color:".($jobs[0]["status"]=="OK"?"darkgreen":"red").";'>".($jobs[0]["status"]?$jobs[0]["status"]:"-")."</td>"; print "</tr>"; print "</table>"; widget_formBegin();
Cheers, David. -- PriceTapestry.com
Thank you David. It is working as expected :)
©2006-2024 IAAI Software | Contact Us | Privacy Policy
Hi,
To add the button edit admin/index.php and look for the following code at line 8:
require("admin_header.php");
...and REPLACE with:
require("admin_header.php");
$sql = "SELECT * FROM `".$config_databaseTablePrefix."jobs`";
database_querySelect($sql,$rows);
$jobIds = array();
foreach($rows as $row)
{
$jobIds[$row["filename"]] = $row["id"];
}
Then look for the following code at (now) line 161:
admin_tool("Register","feeds_register_step1.php?filename=".urlencode($filename),TRUE,FALSE);
...and REPLACE with:
admin_tool("Register","feeds_register_step1.php?filename=".urlencode($filename),TRUE,FALSE);
if (isset($jobIds[$filename]))
{
admin_tool("Edit Job","automation_tool_edit.php?id=".$jobIds[$filename],TRUE,FALSE);
}
For the job info; edit admin/automation_tool_edit.php and look for the following code at line 128:
widget_formBegin();
...and REPLACE with:
print "<table>";
print "<tr>";
print "<th>".translate("Last OK Run")."</th>";
print "<th>".translate("Status")."</th>";
print "</tr>";
print "<tr>";
print "<td class='pta_mid'>".($jobs[0]["lastrun"]?date("Y-m-d H:i:s",$jobs[0]["lastrun"]):"-")."</td>";
print "<td class='pta_mid' style='font-size:x-small; color:".($jobs[0]["status"]=="OK"?"darkgreen":"red").";'>".($jobs[0]["status"]?$jobs[0]["status"]:"-")."</td>";
print "</tr>";
print "</table>";
widget_formBegin();
Cheers,
David.
--
PriceTapestry.com