To also add to this rather than open a new post i get the following
PHP Notice: Use of undefined constant IN_ADMIN - assumed 'IN_ADMIN' in /var/www/vhosts/mysite.co.uk/httpdocs/includes/functions.php on line 307
Code is as follows
PHP Code:
$file_extension = (IN_ADMIN == 1) ? '../' : '';
should this be
PHP Code:
$file_extension = ("IN_ADMIN" == 1) ? '../' : '';
instead?
again thanks for your help in advance.
Adding the "/s dosent change anything besides making the constant be interpreted as plain text
Id say you either initialized it incorrectly or its not global.
Where did you initialize the constant At?
(i should warn you im no master at Constants :P)
Last edited by Nvenom; 07-25-2012 at 07:13 AM.
Albert Einstein ~ "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Things To help you on this Site
1. Place all php code in [php] Tags 2. Place all html code in [html] Tags 3. Remember to mark all your Threads Resolved using thead tools at the top when your problem is solved
Albert Einstein ~ "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Things To help you on this Site
1. Place all php code in [php] Tags 2. Place all html code in [html] Tags 3. Remember to mark all your Threads Resolved using thead tools at the top when your problem is solved
I have not changed this part of the code so this was a PPB thing.
I seem to have a lot of errors in the log that are very similar to the above, if it is not about ADMIN it is also about AJAX instead. Maybe they are not set globaly but i'm not sure.
I am a novice really at php i can admit that and i am doing my best at learning but i am finding it hard, Maybe i jumped the gun a bit trying to jump straight in.
I have a problem reading books and find i learn being more practicle having an a problem and learning from there. I'm sorry if it seems like i'm being a fool but i really am trying and the site has come a long way from the stock site it was.
As for IS_ADMIN, That pretty much confirms that its a global issue, im not sure how it structured so its up to you to find where it is set at in the midst of all your the code and make it Global, Or pass it into the function when its called (might work :P) Like
PHP Code:
//I added a new first variable that gets read when the function gets called function page_order($ina, $file_path, $order_field, $start, $limit, $other_params, $field_name = null) { (string) $display_output = null;
You would just put that below the <select></select> that your having issues with
Albert Einstein ~ "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Things To help you on this Site
1. Place all php code in [php] Tags 2. Place all html code in [html] Tags 3. Remember to mark all your Threads Resolved using thead tools at the top when your problem is solved
Bookmarks