I just created a database and had to change some things in my constants.php file as seen below. My question is this. And it is a very simple one. What is sitelink and what do I put there. Thanks for your patience and understanding, and hopefully, your response.
Teli
<?php
$application = "web";
if ($application == "web")
{
define("HOST","localhost");
define("USER","peace_KD34ss7");
define("PASSWD","admin");
define("DBNAME","peacereg_fdsfdsf");
define("SITELINK",");
define("SITEIMAGES","http://www.itsifter.com/images/");
define("SITEBANNERS","http://www.itsifter.com/banners/");
define("USERIMGPATH","user_images/");
Newbie has simple question
Moderator: General Moderators
Re: Newbie has simple question
Since we don't know what it's used for, it would have to be a wild guess. All this file does is define 8 constants, if a variable has been set within the file to the value "web". As you posted it, it's not even a valid, standalone PHP file, since the if clause is not terminated with a closing bracket. If this is "included" in another PHP file, we would have to examine that file to determine how the author intended to use that variable. Even then, we might have to guess.
Re: Newbie has simple question
califdon wrote:Since we don't know what it's used for, it would have to be a wild guess. All this file does is define 8 constants, if a variable has been set within the file to the value "web". As you posted it, it's not even a valid, standalone PHP file, since the if clause is not terminated with a closing bracket. If this is "included" in another PHP file, we would have to examine that file to determine how the author intended to use that variable. Even then, we might have to guess.
Ok, well, a little background. I purchased a script, from tukanas software. Tukanas has NO faq on his site,k no support system whatsoever, and so this problem nis my own doing, obviously. There is almost no installation instructions for a 5 meg script. Here is a copy of instructions. It is a freelance script and the end result can be seen at itsift.com. also below is the complete file as I recieved it from tukanas. It is called constants.php
INSTALLATION
1- Download archive file from below URL
http://www.tukanas.com/softwares/freelancescript.zip
2 - Import the database
You can find sql file under database_script folder.
3 - Change the connectivity path from
- Constants.php -
like :
define("HOST","localhost");
define("USER","username");
define("PASSWD","passwd");
define("DBNAME","dbname");
4 - Change your mail address and website url on:
note: to easily find lines make [Ctrl] + [F] and write yourwebsite on the cell
PAGE LINE
admin/AdminFunctions.php 59
admin/membersmgmt.php 498 - 501
affiliate.php 2645 - 2649
Constants.php 22
Functions.php 239
manageaccunt.php 2769 2733 - 2737
signup.php 133 - 136 - 353 - 356
uploadport.php 2633 - 2637
uploadportnew.php 2676 - 2680
userregister.php 387 - 401 - 402 - 405 - 407 - 410
You change display messages on Constants.php file.
5 - Upload the script on the server
Other
- You can change validation function by editing:
js/signup1.js (for first registration page)
js/register.js (for second registration page)
js/postproject.js(for post project page)
- To auto-activate new users accounts open userregister.php and change user_adminapproval='inactive' by user_adminapproval='active'
Admin Panel: [location where script installed]/admin/
Password: admin
To change the password edit 'index.php' - line 45
**********************************************************************************************************************
Now the file constants.php
******************************************************************************************
<?php
$application = "web";
if ($application == "web")
{
define("HOST","localhost");
define("USER","user");
define("PASSWD","password");
define("DBNAME","databasename");
define("SITELINK","WEBSITE");
define("SITEIMAGES","sitename here/images/");
define("SITEBANNERS","sitename here/banners/");
define("USERIMGPATH","user_images/");
}
else
{
echo"nathing";
}
define("HOST","localhost");
define("SITEURL","http://www.yourwebsite.com/"); //site URL that can be used for display
define("INDEX", ""); //defination of index page title
define("TITLE", ""); //title used in header function
define("DEFAULT_MEMBERSHIP_PRICE","$29.95");
/*
* Following constants are defined for the purpose of throwing error messages
* as and when required. The error messages will be called upon by the
* processing file and the contents will be displayed there. Formatting
* can be also applied.
*/
define("ADMINEMAILADDRESS", "mail@yourdomain.com");
define("PAGESMODIFIED", "Page Contents Modified Successfully.");
define("MODIFYERROR", "Error in Modifying Record.");
define("USERREG", " : New User Registration");
define("LOGINPAGEINTRO","Please write username and password");
define("LOGINFAILED","User not verified");
define("TITLEADMINLOGIN", "Admin Login");
define("INCORRECTFIELDS","<span class=ntxt> Fields mark by <font class=errmsg>(*)</font> are empty or not proper </span>");
define("TITLEADMIN","Admin Area");
define("INCORRECTFILETYPE","<span class=ntxt>File type is not valid</span>");
define("ERRORFILESIZE","<span class=ntxt>File size is too big</span>");
define("INSERTERROR","Failed to save record");
define("MODIFYERROR","Failed to modify in DB");
define("USERLOGIN",": User Login Area");
define("EDITCPASS","Change Password");
define("CPASSMODIFIED","Password has been modified successfully");
//Forums
define("FORUMTITLE", "Forums");
define("FORUMINDEX", "Welcome to Forums");
define("LOGINREQ", "<font class='errmsg'>Its seems you havent logged on, Kindly login to use the Network Mastermind Forums</font>");
define("POSTMSGERROR", "<font class='errmsg'>You have not entered the mandatory fields marked with (*)</fonr>");
//user registration form
define("USERNAMEEXISTS", "<font class='errmsg'>Sorry, the selected username already exists in our database, please select another</font>");
define("EMAILEXISTS", "<font class='errmsg'>Sorry, the selected Email Addresss already exists in our database, please select another</font>");
//Administrator Login Checking Error
define("ADMINLOGINERROR", "<font class='errmsg'>Sorry, password is not match with our database</font>");
?>
Re: Newbie has simple question
Please understand, I sympathize with you, but you're asking us to debug a lengthy script that you bought from somebody else. Perhaps it appears to you that all you need is for someone to tell you what to insert for a value, hence "simple question." But that value is there only to be used by a different script that you haven't shown us and which you tell us is a very large file (please don't try to post a 5 MB file in this forum!). But that's the only place where anyone could be sure what the author expected to be in that constant, and only after reviewing the entire application. I could guess that either (a) it should be the URL of your site; or (b) that it was intended to be left blank, since all the other constants have values in the script, even when they must be customized to your site. The lack of either adequate installation instructions or support from the author is a bad sign and may be a sign of bad code, as well. Unfortunately, it's pretty easy for anyone to write a lousy PHP script, advertise it and sell it to unsuspecting buyers, and take no further responsibility.
Have you tried running it without changing that constant? If so, does it connect to the proper site? Have you tried it, inserting your site URL? If so, what happens?
I took a look at the tukanas site and it appears to be a pretty sizable operation, with many products, and I see that they've been around for several years. Have you tried emailing them and asking for support?
Have you tried running it without changing that constant? If so, does it connect to the proper site? Have you tried it, inserting your site URL? If so, what happens?
I took a look at the tukanas site and it appears to be a pretty sizable operation, with many products, and I see that they've been around for several years. Have you tried emailing them and asking for support?
Re: Newbie has simple question
califdon wrote:Please understand, I sympathize with you, The lack of either adequate installation instructions or support from the author is a bad sign and may be a sign of bad code, as well. Unfortunately, it's pretty easy for anyone to write a lousy PHP script, advertise it and sell it to unsuspecting buyers, and take no further responsibility.
Have you tried running it without changing that constant? If so, does it connect to the proper site? Have you tried it, inserting your site URL? If so, what happens?
I took a look at the tukanas site and it appears to be a pretty sizable operation, with many products, and I see that they've been around for several years. Have you tried emailing them and asking for support?
Yes, 20 emails or so, to no avail. No forums on web, except one I created, and no contact from author.
But, I will try it with out changing that constant. All the others I had to change. But I changed that one to be my url
maybe that is correct, should just leave it to website as it is in capital letters, unlike the other constants that are in small letters.
Thanks I will try that. And yes, the website is impressive, that's why i bought it. But what do you expect for $40 bucks I guess. I would have galdly paid extra for support, but it is not offered as an option
Thanks for your help
Re: Newbie has simple question
Just a technical note: the names of constants are all capitals, by convention, to make them appear distinctive, since you cannot assign values to them, as you can variables, which in PHP always begin with a dollar sign.Teliesin wrote:But, I will try it with out changing that constant. All the others I had to change. But I changed that one to be my url maybe that is correct, should just leave it to website as it is in capital letters, unlike the other constants that are in small letters
What you showed us was:
Code: Select all
define("SITELINK",''); The only place in the script you showed us that assigns a value to a variable is this one:
Code: Select all
$application = "web";Re: Newbie has simple question
Quite incorrect. In my first post I was hiding my website info. In the actual script post (my second post) I showed the entire file with variables and constants. As you can see, - sitelink is define("SITELINK","WEBSITE"); and is in capitals.What you showed us was:which is the way you define the constant SITELINK, which in this definition is a zero-length string.Code: Select all
define("SITELINK",'');
The only place in the script you showed us that assigns a value to a variable is this one:You definitely must not change the capitalization of any constant or variable names. The values you assign to a variable or define as a constant can be anything you want them to be. In the case of a URL, the first part, through the domain name, is case insensitive, but the last part (path, filename, etc.) are case sensitive if the web server is Linux.Code: Select all
$application = "web";
define("HOST","localhost");
define("USER","user");
define("PASSWD","password");
define("DBNAME","databasename");
define("SITELINK","WEBSITE");
define("SITEIMAGES","sitename here/images/");
define("SITEBANNERS","sitename here/banners/");
define("USERIMGPATH","user_images/");
So now I am really confused. I will just forget it. Thanks anyway