Jump to content

Nicedit


bigjoe11a

Recommended Posts

the error console is the console I told you about in Chrome (and is available in all modern browsers); i tend to use the terms interchangeably. and if the footer contains the required ending tags for a valid and correct webpage, then you should use it on every page, or make sure to include those tags in some way. i already gave you suggestions for the drop downs. I said to validate and fix your page. if you have unclosed tags, the browser is going to think anything in them might be part of the tag, and not something new. This is the whole point of debugging, and what we've been trying to get you to do in all your threads. Find errors and fix them. resolve as many potential issues with your code so there are fewer possibilities for it not working. I'm not sure why you only follow our advice on this matter as a last resort. but you'd be doing yourself a huge favor if you always looked for the errors first.

Link to comment
Share on other sites

well I did all that. I fix the crap on the main page and added the footer to some of the other pages. How ever the minedit still doesn't show any thing in the drop down boxes. and I still get that null = null or not an object error. So now what do I do.

Link to comment
Share on other sites

Can you repost the link to the page in question so that everyone in the thread can be sure they're on the same page? As for the javascript error, you have an error, and the console should tell you the line. What is it telling you?

Link to comment
Share on other sites

Can you repost the link to the page in question so that everyone in the thread can be sure they're on the same page?
http://toppersbbs.dtdns.net/mapnet/blog/addentry.php?bid=20 remember every one that your not log in or registered. So there will be errors, Undefined insexs and so on.
As for the javascript error, you have an error, and the console should tell you the line. What is it telling you?
well it says Webpage error detailsUser Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)Timestamp: Tue, 25 Oct 2011 18:06:04 UTCMessage: 'null' is null or not an objectLine: 37Char: 873Code: 0URI: http://toppersbbs.dtdns.net/mapnet/jscripts/nicEdit.js
Link to comment
Share on other sites

The line and character that it's referring to is setting up the elements that are supposed to be on the page, so it sounds like there's still a missing element. It looks like you fixed it while I was looking at it, there was a missing image file that it was trying to use for the icons. There is still a missing CSS file.

Link to comment
Share on other sites

another developer tip is that when you are having trouble integrating a piece of functionality into a page/app/etc, it's often best to create an absolute stripped down version and slowly add everything in one file/function/etc at a time. this would make it easier for others to help you, without all the complication of PHP errors and the such, and would thus put you in a better position to understand what would be making it break once you put it into the context of a page. Although this all seems tedious, it's the way it goes. Start small and work your way up.

Link to comment
Share on other sites

In Google Chroms, click on the menu (a wrench icon) and go to Tools > Developer Tools.The Network tab will tell you which resources haven't loaded, the console tab will indicate specific Javascript errors. Other tabs provide other useful information about your page.

Link to comment
Share on other sites

In Google Chroms, click on the menu (a wrench icon) and go to Tools > Developer Tools.The Network tab will tell you which resources haven't loaded, the console tab will indicate specific Javascript errors. Other tabs provide other useful information about your page.
thanks, How every I never used this before and so I don't know what to do. look for or any thing like that. The problem I'm having is the paths and so on. I think I just started some thing I shouldn't have. This is way too high tech for me. maybe I just won't rebuild Mapnet, That means changing my software too. That sucks.
Link to comment
Share on other sites

thanks, How every I never used this before and so I don't know what to do. look for or any thing like that. The problem I'm having is the paths and so on. I think I just started some thing I shouldn't have. This is way too high tech for me. maybe I just won't rebuild Mapnet, That means changing my software too. That sucks.
no offense, but in almost all of your threads you seem ready to give up before you even really try, on things that just require a little bit of time and patience. Why don't you keep trying to learn the things you don't understand? For instance:http://code.google.c...s/overview.html or for something more up your alleyhttp://www.google.co...iw=1439&bih=779 I don't think you realize that for almost everything you can do in the world, everyone hasn't done it at least once. But you try it and learn from the experience. That's pretty much the life of a developer. Either you learn or not.
Link to comment
Share on other sites

well if I under stand this. The prblem is in my path's. Ok, I don't know what to do, So look below. I added my code for the config.php. This is in the mapnet folder. This is a sub folder from the webroot folder. That's the main folder. webroot/mapnet << all mapnet files are in here

 <?phpsession_start(); include 'sources/functions.inc.php'; //date_default_timezone_set('America/New York'); error_reporting(E_ALL); defined('DS') ? null : define('DS', '/');defined('SITE_ROOT') ? null : define('SITE_ROOT', ''); defined('BLOG_PATH') ? null : define('BLOG_PATH', SITE_ROOT.'blog'.DS);defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.'sources'.DS);defined('MAP_PATH') ? null : define('MAP_PATH', SITE_ROOT.'maps'.DS);  //Used for the link in the validation email sent to users,//full url to validation.phpdefine('VAL_LINK','http://toppersbbs.dtdns.net/mapnet/validation.php'); define('DOC_ROOT', $_SERVER['DOCUMENT_ROOT'] . '//');define('SITE_TITLE', 'MapNET');define('SITE_NAME', 'Novalogic Gaming');define('PHP_VER', 'MapNET Version 2.1.10');define('', ''); // Category array() $category = array(    'dfx'     => 'Delta Force Extreme',    'dfx2'    => 'Delta Force Extreme 2',    'c4'      => 'Comanche 4',    'df1'     => 'Delta Force 1',    'df2'     => 'Delta Force 2',    'jo'      => 'Joint Ops TR',    'bhd'     => 'Delta Force BHD',    'bhdts'   => 'Delta Force BHD TS',        ); $maptypes = array(    'mp'      => 'MuiltiPlayer',    'sp'      => 'Single Player',    'tdm'     => 'Team Death Match',    'coop'    => 'Coop',    ); //Admin Infodefine('AD_PW', 'password'); //Blog setupdefine('BLOG_TOTAL', 2); //Total blogs a one user can havedefine('BLOG_PER_PAGE', 3); //total pages to show on each page //Mysql Infodefine('db_host','localhost');define('db_user','root');define('db_name','mapnet');define('db_pass','rootwdp');define('db_prefix','cms_'); //Date and Time $settings['php_date'] = date("m/d/y");$settings['php_time'] = date("h:i a"); // Users Sessionsdefine('SESS_USER', 'name');define('SESS_EMAIL', 'email');define('SESS_MEMBER', 'member');define('SESS_USERID', 'userid');define('SESS_USERGROUP', 'usergroup');define('SESS_AVATAR', 'useravatar');define('SESS_AGE','age');define('SESS_UTOKEN','utoken');define('SESS_BIRTH','usersbirth'); //SMTP settingsdefine('SMTP_HOST','toppersbbs.dtdns.net');define('SMTP_USERNAME','topper');define('SMTP_USERPASS','5656'); if(isset($_SESSION[SESS_USERGROUP]) && $_SESSION[SESS_USERGROUP] == 'Admin') {define('X_ADMIN', true);} else {define('X_ADMIN', false);} if(isset($_SESSION[SESS_USER])) {define('LOG_IN', true);    }  //web masters name and email addressdefine('MASTER_EMAIL_ADDR', 'topper@toppersbbs.dtdns.net');define('MASTER_NAME', 'Topper'); //allow new usersdefine('ENABLE_USER', true); define('MAX_MAP_SIZE', 2500 * 1024); // Max file size for mapsdefine('MAX_IMAGE_SIZE', 5000 * 1024); // max image size for images // Some arrays() needed$config = array();$linksmain = array(); ?>

This is what I been trying to configure so that no matter what folder the page is in, that it will and can fine the sources folder and so on. defined('SITE_ROOT') ? null : define('SITE_ROOT', '');As long as I leave this line like it is. All the pages in the mapnet folder load in and they are ok. Just when I try and load a page from a sub folder is where I'm having the problems at. I think this is why nicedit can't find what it needs. Some of the folders that are setup in nicedit don't exist. I'm not sure. I never done this before.

Link to comment
Share on other sites

I tried that all ready and it doesn't work, Look. I made the change to it, see for your self http://toppersbbs.dtdns.net/mapnet/ This is what it should look like. defined('DS') ? null : define('DS', '/');defined('SITE_ROOT') ? null : define('SITE_ROOT', 'http://toppersbbs.dtdns.net/mapnet'.DS);I have done this like 12 times with the same results. If I take the line out and just leave it blank.. The pages load fine, when I add the full url. I get all errors.

Link to comment
Share on other sites

There are 2 root paths you need, one for HTTP files and one for local files. The path for HTTP files is what you use to point to images, CSS files, etc. The one for local files is what you use to include other PHP files. You can set the local root path dynamically like this: $root = dirname(__FILE__); That will set the root to be the folder of the current file, so if that line is in your config file then the root is set to the folder the config file is in. If you want to set it to the folder above that you can add another dirname: $root = dirname(dirname(__FILE__)); The __FILE__ constant holds the full local path to the file where you use the constant. It's a "special" constant, because the value changes depending on which file you use it in. Anyway, that's the path you want to use when you include files in PHP. Use the HTTP path when you're pointing to images, CSS files, Javascript files, other web pages, etc.

Link to comment
Share on other sites

well that's new too. I seen that __FILE__ used and being use. I never could under stand the reason for it. Can you show me just how to set that up using this constant defined('SITE_ROOT') ? null : define('SITE_ROOT', 'http://toppersbbs.dtdns.net/mapnet/');or is there more to it then that. I never used it before so I don't know. While I'm waiting on a reply. I do some google on it.

Link to comment
Share on other sites

That's fine for the HTTP root, that's the value it should be. You can use the code I showed to define the file root. define('FILE_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR); The DIRECTORY_SEPARATOR constant is set to whatever the server's operating system uses to separate directory names. http://www.php.net/manual/en/language.constants.predefined.phphttp://www.php.net/manual/en/reserved.constants.php Note that you can use the __DIR__ constant instead of dirname(__FILE__) if your version of PHP is high enough.

Link to comment
Share on other sites

Ok, then can you tell me how to set these up using that. I'm sorry I never used these before.

defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);defined('SITE_ROOT') ? null : define('SITE_ROOT', 'http://toppersbbs.dtdns.net/mapnet/');//defined('SITE_ROOT') ? null : define('SITE_ROOT', '');defined('FILE_ROOT') ? null : define('FILE_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR);defined('BLOG_PATH') ? null : define('BLOG_PATH', SITE_ROOT.'blog/');defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.'sources/');defined('MAP_PATH') ? null : define('MAP_PATH', SITE_ROOT.'maps/');

The idea is to make a fixed folder to point to area in the files. for files, php script. css, javascript files. this holds files for donwloadingdefined('MAP_PATH') ? null : define('MAP_PATH', SITE_ROOT.'maps/'); this holder php files for classesdefined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.'sources/');and so on. Moore will be added when needed. I just need some one to show me how to use them,

Link to comment
Share on other sites

It may be better to switch FILE_ROOT to SITE_ROOT (so that SITE_ROOT holds the local path), and define a new HTTP_ROOT for the HTTP path. I'm not sure which path those constants expect. I'm not sure if the BLOG_PATH, for example, is supposed to be the path that PHP includes files from (SITE_ROOT), or the path to link the user to (HTTP_ROOT). The general rule is that files that get included by PHP, using functions like include, include_once, require, etc, use the SITE_ROOT, and things like CSS, Javascript, etc use the HTTP_ROOT.

Link to comment
Share on other sites

No wonder I'm having a hard time trying to figure out the paths and crap like that. Thank You very Much. I didn't under stand what you were talking about. I had to go and do a search on it. As you said, They are not the same. You can to use different paths for different things and I never knew that. THANK YOUJoe Now all I need to do get the nicedit drop down boxes to show on the page

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...