akbiro
asked on
PHP Beginner
We have a PHP support site, Kayako, that we have on our own servers. I am a little better than a beginner with .asp and know nothing about PHP.
I want to make some minor changes to a couple of pages and I am at a loss on how to proceed.
When I view the source from the browser, what I want to change is easy...it is simple HTML, but when I look for that same code on my server, I can not recognize it.
What do I need to learn how to make some changes to my webpages.
I want to make some minor changes to a couple of pages and I am at a loss on how to proceed.
When I view the source from the browser, what I want to change is easy...it is simple HTML, but when I look for that same code on my server, I can not recognize it.
What do I need to learn how to make some changes to my webpages.
how does it appear on the server ? could you send a couple of lines you do not understand ?
ASKER
I want to access this page on my server and change some of the Icons. Here is the link to the page on the server and attached is a snap shot of what I want to change.
http://65.111.176.231/index.php
THANKS
ServiceDesk.jpg
http://65.111.176.231/index.php
THANKS
ServiceDesk.jpg
what i asked for was the code for index.php ..
you could upload the parts here of the code that you do not understand.
you could upload the parts here of the code that you do not understand.
you can't see the PHP code from the browser (only HTML)
you will have to log into the server that hosts the code and open the index.php file
you will have to log into the server that hosts the code and open the index.php file
ASKER
Oh.,..I am sorry. This is how dumb I am with PHP, I can not find the page on the server. I know the path to the file, but I do not see an html file...sorry for my ignorance.
ASKER
This is the index.php file
<?php
//=======================================
//###################################
// Kayako Infotech Ltd. - SWIFT Framework
//
// Source Copyright 2001-2008 Kayako Infotech Ltd.
// Unauthorized reproduction is not allowed
// License Number: $%LICENSE%$
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// www.kayako.com
//###################################
//=======================================
define("SWIFT_AREA", 40);
// KACT 5/pages/297
require_once ("./swift.php");
/**
* ###############################################
* CSS OUTPUT
* ###############################################
*/
// KACT 5/pages/296
if ($_REQUEST["_ca"] == "css") {
$template->cache(array('clientcss'));
header("Content-Type: text/css");
headerCache();
// KACT 5/pages/303
echo $template->displayTemplate("clientcss");
exit;
/**
* ###############################################
* Other Action
* ###############################################
*/
} else {
if (!$session->start(SESSION_CLIENT)) {
// Failed to load session, Create a fresh session over here.
$session->insertSession(SESSION_CLIENT, 0);
}
// KACT 5/pages/294
if (defined("ISMODERNBILL") && (empty($_SWIFT["session"]["typeid"])))
{
$loginresult = $loginshare->authorize($_SESSION["client_email"], $_SESSION["client_password"]);
if (!$loginresult)
{
echo "MB Core Error: Unable to continue, Login Failed";
exit; // TRFC KACT 5/pages/247
} // KACT 5/pages/298
// KACT 5/pages/294
} else if (defined("ISMODERNBILLV5") && (!empty($CONF["user"]["username"]))) {
$loginresult = $loginshare->authorize($CONF["user"]["username"], $CONF["user"]["password"]);
if (!$loginresult)
{
echo "MB v5 Core Error: Unable to continue, Login Failed";
exit; // TRFC KACT 5/pages/247
} // KACT 5/pages/298
} else if (defined("ISWHMCS") && (!empty($whmcsuser["userid"]))) {
$loginresult = $loginshare->authorize($whmcsuser["email"], $whmcsuser["password"]);
if (!$loginresult)
{
echo "WHMCS Core Error: Unable to continue, Login Failed";
exit; // TRFC KACT 5/pages/247
} // KACT 5/pages/298
}
// ======= LOAD THE USER CREDENTIALS FROM ACTIVE LOGINSHARE MODULE =======
loginShareLoadUser(); // Loads up user data from active loginshare module
// Bug #646, escape user full name
$userDisplayName = htmlspecialchars($_SWIFT["user"]["fullname"]);
$template->assign("userdisplayname", $userDisplayName);
//
$loginshare->processUserGroup(); // Checks to see of empty user groups and loads default ones
$loginshare->loadPermissions(); // Loads up the permissions for active user group
// ======= MISC ACTIONS =======
$loginemailcookie = $cookie->getSCookie("loginemail");
// KACT 5/pages/294
// KACT 5/pages/297
if (!empty($loginemailcookie) && $_SWIFT["user"]["loggedin"] == false)
{
$loginpasscookie = $cookie->getSCookie("loginpassword");
$template->assign("cookieloginemail", $loginemailcookie);
$template->assign("cookieloginpassword", decryptCookiePassword($loginpasscookie));
$template->assign("cookierememberme", "1");
}
// ======= PROCESS THE WIDGETS =======
require_once ("./includes/Widgets/widgets.php");
$template->assign("widgets", processWidgets($_widgets));
// KACT 5/pages/294
if (empty($_SWIFT["user"]["userid"]) && !empty($_SERVER["QUERY_STRING"]))
{
// KACT 5/pages/295
$template->assign("querystring", iif(!stristr(htmlspecialchars($_SERVER["QUERY_STRING"]), "logout"), htmlspecialchars($_SERVER["QUERY_STRING"])));
}
// ======= TRY TO EXECUTE ANY ASSOCIATED EVENTS =======
if (!$events->triggerEvent(EVENT_CLIENT))
{
// Load main page
require_once ("./modules/core/client_index.php");
}
}
?>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When you only need to change icons,
open the web page,
view its source,
find the icon you want to change,
go to the server,
find the image,
copy the image to another filename,
edit the original image file,
reload the webpage.
As you can see, no fuss or difficulty.
open the web page,
view its source,
find the icon you want to change,
go to the server,
find the image,
copy the image to another filename,
edit the original image file,
reload the webpage.
As you can see, no fuss or difficulty.
ASKER
Ok...I found that. Now, how do I view it to work on it. Do I need a special editor. How did you know where to find this new file
ASKER
CVD, that is good, but I need to change the link, the menu bar at the bottom and the verbiage that goes along with it...so it is easy, but a bit more than just changing icons...thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ok, I always use a text editor, that is able to search in directories (UltraEdit).
In the browser view the source and find the link you want to change.
Open your texteditor and let it find that link in the servers root directory.
Open the textfile (if found) and change the link.
If you can't find it in any text file, have a look in the database. The link might be in there. If so, the change should be made in the database.
In the browser view the source and find the link you want to change.
Open your texteditor and let it find that link in the servers root directory.
Open the textfile (if found) and change the link.
If you can't find it in any text file, have a look in the database. The link might be in there. If so, the change should be made in the database.
ASKER
Let me give it a whirl
ASKER
Ok...I am starting to get it...
This is the code from the browser view and I want to find this widget, or page on the server.
Where would I go:
This is the code from the browser view and I want to find this widget, or page on the server.
Where would I go:
<!-- BEGIN WIDGET: Troubleshooter -->
<td width="50%"><table cellspacing="3" cellpadding="1" width="100%" border="0">
<tbody>
<tr>
<td valign="top" width="15" nowrap><a href="index.php?_m=troubleshooter&_a=view"><img src="http://65.111.176.231/themes/client_default/troubleshooter.gif" border="0"></a></td>
<td width="98%" align="left" valign="top"><strong><a href="index.php?_m=troubleshooter&_a=view" id="moduletitle">Troubleshooter</a></strong><br />
<span class="smalltext">Use troubleshooter wizards to diagnose and resolve common problems.</span></td>
</tr>
</tbody>
</table></td>
<!-- END WIDGET: Troubleshooter -->
First you must find in which php program the link you are looking for is mentioned (I suspect you are looking to change the reference to troubleshooter.gif).
Next, open the php file in a text editor and change the link in there to the one you want it to be.
Next save the php file.
Lastly reload the page in your browser.
Next, open the php file in a text editor and change the link in there to the one you want it to be.
Next save the php file.
Lastly reload the page in your browser.
ASKER
Ok...so in the case above, the location link I want to change is:
index.php?_m=troubleshoote r&_a=view
and the image link is
http://65.111.176.231/themes/client_default/troubleshooter.gif
I got it MON
index.php?_m=troubleshoote
and the image link is
http://65.111.176.231/themes/client_default/troubleshooter.gif
I got it MON
ASKER
Ok...I see what to change in the code to redirect the link and to replace the image.
I traced the path from the index.php to the code below, the widget. Is the link here and if it is, can you show it to me.
I traced the path from the index.php to the code below, the widget. Is the link here and if it is, can you show it to me.
// ======= TROUBLESHOOTER =======
if ($module->isRegistered(MODULE_TROUBLESHOOTER) && $_SWIFT["settings"]["tr_enableclient"] == 1 && $_SWIFT["user"]["permissions"]["perm_canviewtroubleshooter"] != "0")
{
$_widgets[$index]["icon"] = $_SWIFT["themepath"]."troubleshooter.gif";
$_widgets[$index]["title"] = $_SWIFT["language"]["troubleshooter"];
$_widgets[$index]["description"] = $_SWIFT["language"]["desc_troubleshooter"];
$_widgets[$index]["link"] = "index.php?_m=troubleshooter&_a=view";
$template->assign("cansearch", true);
$template->assign("trcansearch", true);
$index++;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it's finished...what's up
no problem here