Zen Cart Logo
Forums / All Other Contributions/Addons / Admin Profiles (for v1.3.x only!) Support Thread

Admin Profiles (for v1.3.x only!) Support Thread

Views: 334,216

Results 321 to 340 of 1,242
12 Sep 2007, 4:52 AM
#321
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Admin Profiles (for v1.3.x only!) Support Thread

kuroi:

Not currently, but it's on the To Do list and not that far from the top now.

Thanks I will look forward to it.

19 Sep 2007, 4:30 PM
#322
jamie_prismart_com avatar

jamie_prismart_com

New Zenner

Join Date:
Oct 2004
Posts:
34
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Missing 'P' please....

My 'P' wasn't showing up so i backed up my admin.php file and replaced it with the one in 'extras - patched files for ZC1.3.6' and it showed up instantly - I'm a happy chappy once again.

Jamie

24 Sep 2007, 8:56 AM
#323
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Hello

First off this is a great module and you offer fantastic support for it. I have installed it twice will no issues what so ever. However I justmoved pcs so I had to download the version form the zencart site and now after installing on a new site I am just getting errors.

Downloaded, read instructions, ran sql - everything was processed fine.

Ftp'd up the files in to the correct folders - now I am getting

Parse error: syntax error, unexpected T_STRING in /home/QH684H3P/htdocs/upstream/admin/includes/functions/admin_profiles.php on line 209

I have opened the file up and the code is not "coloured" as it normally is but I don't know enough about php to see where there might be a wee syntax etc out of place.

but from line 190 down it doesn't look right and then it looks fine from line 235 onwards

Code as below

<?php /** * @package admin profiles * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2004 Jonathan Kontuk * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: admin_profiles.php - last updated 2006-05-01 by kuroi */ function strip_suffix($filename,$suffix){ // This function is used in preference to the php basename function as one of the // config entries currently includes a slash which basename unfortunately interprets // as part of a filepath and discards everything in front of it. $slen = strlen($suffix); if (substr($filename,-$slen,$slen) == $suffix){ $result = substr($filename,0,strlen($filename)-$slen); }else{ $result = $filename; } return $result; } function menu_header_visible($header){ // This function tests whether the header passed as a parameter in $header is available // to the currently logged in admin user. If so it returns 'true', otherwise 'false' global $db; $query = "select id from ".TABLE_ADMIN_MENU_HEADERS." where header = '".$header."'"; $included = $db->Execute($query); if ($included->fields['id'] != ''){ $who_allow = $db->Execute("select admin_id from ".TABLE_ADMIN_VISIBLE_HEADERS." where header_id = '".$included->fields['id']."'"); while (!$who_allow->EOF){ if ($who_allow->fields['admin_id']==$_SESSION['admin_id']){return 'true';} $who_allow->MoveNext(); } } return 'false'; } function page_allowed($page, $param=''){ // This function determines whether the page passed as parameter $page should be // displayed in the admin menu for the currently logged on user. After stripping // any .php suffix, it looks up the page ID and if it doesn't find one, assumes // that this is a new function (e.g. a 3rd party mod) and inserts the page into // the admin_files table. Otherwise it checks whether the page is allowed for the // currently logged on user. If so, it returns 'true'. If not (including for a new // insertion) it returns 'false'. global $db; $page = strip_suffix($page,".php"); if ($page=='configuration') return check_page($page, $param); $query = "select id from ".TABLE_ADMIN_FILES." where page = '".$page."'"; $included = $db->Execute($query); if ($included->fields['id'] == ''){ $sql = "insert into ". TABLE_ADMIN_FILES." set page = '".$page."'"; $db->Execute($sql); }else{ $who_allow = $db->Execute("select admin_id from ".TABLE_ADMIN_ALLOWED." where page_id = '".$included->fields['id']."'"); while (!$who_allow->EOF){ if ($who_allow->fields['admin_id']==$_SESSION['admin_id']){return 'true';} $who_allow->MoveNext(); } } return 'false'; } function check_page($page, $param=''){ // This function checks whether the currently logged on user has permission to access // the page passed as parameter $page. The function returns 'true' if the user is // allowed access to the page, and 'false' otherwise (including when the page is auto // inserted - see below for more details). global $db; // Most entries (normal case) have their own pages. However, everything on the Config // and Modules menus are handled by the single pages config.php and modules.php which // must be broken down into subpages for display on the Admin Profiles permissions page. // If the page name is passed with a .php suffix, it is stripped. if ($page == 'modules'){ $page = 'modulesset='.$_GET['set']; }elseif ($page == 'configuration'){ $cid = str_replace('gID=', '', $param) . $_GET['gID']; $config = $db->Execute("select configuration_group_title from ".TABLE_CONFIGURATION_GROUP." where configuration_group_id = '".$cid."'"); $page = $config->fields['configuration_group_title']; }else{ $page = strip_suffix($page,".php"); } // Look up the the ID for the page name passed as parameter $page. If no ID is found // assume that this is a new function (e.g. a 3rd party mod) and insert the page into // the admin_files table. Otherwise compile a list of users allowed access to the page. // If the currently logged in user is on the list return 'true'. If not (including for // a new insertion) return 'false'. $query = "select id from ".TABLE_ADMIN_FILES." where page = '".$page."'"; $included = $db->Execute($query); if ($included->fields['id'] == ''){ $sql = "insert into ". TABLE_ADMIN_FILES." set page = '".$page."'"; $db->Execute($sql); }else{ $query = "select admin_id from ".TABLE_ADMIN_ALLOWED." where page_id = '".$included->fields['id']."'"; $who_allow = $db->Execute($query); while (!$who_allow->EOF){ if ($who_allow->fields['admin_id']==$_SESSION['admin_id']){return 'true';} $who_allow->MoveNext(); } } return 'false'; } function display_profiles($headers, $adminID){ // This function is used to display headers and associated pages when the Edit Permissions option is // selected from Admin Settings. It displays the information for the headings and associated pages // listed in the array passed to the function as the parameter $headings, and indicates which are // currently available to the user with the ID passed as $adminID. global $db; while (!$headers->EOF){ // for each valid menu header // From the list of headers in the array passed as a parameter, compile a subset of those visible // for the user with parameter adminID. Display all header titles with checkbox, checked if header // is visible for this user, unchecked otherwise. Except for the third party mods header which // does not have a checkbox and instead has extra explanatory text. Display buttons allowing all // boxes under each heading to be checked or unchecked with a single click. $query = "select * from ".TABLE_ADMIN_VISIBLE_HEADERS." where header_id = '".$headers->fields['id']."' and admin_id = '".$adminID."'"; $visible = $db->Execute($query); if ($headers->fields['id'] == 0){ echo '<div class="menuHeaderOff"><span class="menuTitle">'; echo $headers->fields['header'].' (when enabled these 3rd party contributions will appear in the Admin menus determined by their authors)'; }else{ if ($visible->fields['admin_id']==$adminID){ echo '<div class="menuHeaderOn">'."\n"; echo "\t".'<span class="menuTitle">'; echo '<label><input name="'.$headers->fields['header'].'" type="checkbox" checked="on" value="on">'; }else{ echo '<div class="menuHeaderOff">'."\n"; echo "\t".'<span class="menuTitle">'; echo '<label><input name="'.$headers->fields['header'].'" type="checkbox" value="off">'; } echo $headers->fields['header'].' Menu</label>'; } echo "</span>\n"; echo "\t".'<span class="headerCheckButtons">'."\n"; echo "\t\t".'<input type="button" value="check All" onclick="checkAll(this.form,\''.$headers->fields['header'].'\',true);">'."\n"; echo "\t\t".'<input type="button" value="Uncheck All" onclick="checkAll(this.form,\''.$headers->fields['header'].'\',false);">'."\n"; echo "\t</span>\n"; echo "</div>\n\n"; // Read in list of all pages under this header from dB thsn for each page. Then for each page // read dB to see if the user with parameter adminID is allowed access to this page. Output // check box (ticked if page is allowed) and page name. Page name is constructed by stripping // out the 10 characters if page is called from the modules menu and replacing underlines // space otherwise. Add an asterisk to pages that do not appear directly in the admin menus. echo '<div class="checkboxBlock">'."\n"; $query = "select * from ".TABLE_ADMIN_FILES." where header = '".$headers->fields['id']."'"; $pages = $db->Execute($query); while (!$pages->EOF){ echo "\t".'<label class="permissionBox"><input name="'.$pages->fields['page'].'" class="'.$headers->fields['header'].'" type="checkbox" '; $query = "select * from ".TABLE_ADMIN_ALLOWED." where page_id = '".$pages->fields['id']."' and admin_id = '".$adminID."'"; $allow = $db->Execute($query); if ($allow->fields['admin_id']==$adminID) {echo 'checked="on" value="on">';} else {echo 'value="off">';} if (substr($pages->fields['page'],0,11)=='modul<?php /** * @package admin profiles * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2004 Jonathan Kontuk * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: admin_profiles.php - last updated 2006-05-01 by kuroi */ function strip_suffix($filename,$suffix){ // This function is used in preference to the php basename function as one of the // config entries currently includes a slash which basename unfortunately interprets // as part of a filepath and discards everything in front of it. $slen = strlen($suffix); if (substr($filename,-$slen,$slen) == $suffix){ $result = substr($filename,0,strlen($filename)-$slen); }else{ $result = $filename; } return $result; } function menu_header_visible($header){ // This function tests whether the header passed as a parameter in $header is available // to the currently logged in admin user. If so it returns 'true', otherwise 'false' global $db; $query = "select id from ".TABLE_ADMIN_MENU_HEADERS." where header = '".$header."'"; $included = $db->Execute($query); if ($included->fields['id'] != ''){ $who_allow = $db->Execute("select admin_id from ".TABLE_ADMIN_VISIBLE_HEADERS." where header_id = '".$included->fields['id']."'"); while (!$who_allow->EOF){ if ($who_allow->fields['admin_id']==$_SESSION['admin_id']){return 'true';} $who_allow->MoveNext(); } } return 'false'; } function page_allowed($page, $param=''){ // This function determines whether the page passed as parameter $page should be // displayed in the admin menu for the currently logged on user. After stripping // any .php suffix, it looks up the page ID and if it doesn't find one, assumes // that this is a new function (e.g. a 3rd party mod) and inserts the page into // the admin_files table. Otherwise it checks whether the page is allowed for the // currently logged on user. If so, it returns 'true'. If not (including for a new // insertion) it returns 'false'. global $db; $page = strip_suffix($page,".php"); if ($page=='configuration') return check_page($page, $param); $query = "select id from ".TABLE_ADMIN_FILES." where page = '".$page."'"; $included = $db->Execute($query); if ($included->fields['id'] == ''){ $sql = "insert into ". TABLE_ADMIN_FILES." set page = '".$page."'"; $db->Execute($sql); }else{ $who_allow = $db->Execute("select admin_id from ".TABLE_ADMIN_ALLOWED." where page_id = '".$included->fields['id']."'"); while (!$who_allow->EOF){ if ($who_allow->fields['admin_id']==$_SESSION['admin_id']){return 'true';} $who_allow->MoveNext(); } } return 'false'; } function check_page($page, $param=''){ // This function checks whether the currently logged on user has permission to access // the page passed as parameter $page. The function returns 'true' if the user is // allowed access to the page, and 'false' otherwise (including when the page is auto // inserted - see below for more details). global $db; // Most entries (normal case) have their own pages. However, everything on the Config // and Modules menus are handled by the single pages config.php and modules.php which // must be broken down into subpages for display on the Admin Profiles permissions page. // If the page name is passed with a .php suffix, it is stripped. if ($page == 'modules'){ $page = 'modulesset='.$_GET['set']; }elseif ($page == 'configuration'){ $cid = str_replace('gID=', '', $param) . $_GET['gID']; $config = $db->Execute("select configuration_group_title from ".TABLE_CONFIGURATION_GROUP." where configuration_group_id = '".$cid."'"); $page = $config->fields['configuration_group_title']; }else{ $page = strip_suffix($page,".php"); } // Look up the the ID for the page name passed as parameter $page. If no ID is found // assume that this is a new function (e.g. a 3rd party mod) and insert the page into // the admin_files table. Otherwise compile a list of users allowed access to the page. // If the currently logged in user is on the list return 'true'. If not (including for // a new insertion) return 'false'. $query = "select id from ".TABLE_ADMIN_FILES." where page = '".$page."'"; $included = $db->Execute($query); if ($included->fields['id'] == ''){ $sql = "insert into ". TABLE_ADMIN_FILES." set page = '".$page."'"; $db->Execute($sql); }else{ $query = "select admin_id from ".TABLE_ADMIN_ALLOWED." where page_id = '".$included->fields['id']."'"; $who_allow = $db->Execute($query); while (!$who_allow->EOF){ if ($who_allow->fields['admin_id']==$_SESSION['admin_id']){return 'true';} $who_allow->MoveNext(); } } return 'false'; } function display_profiles($headers, $adminID){ // This function is used to display headers and associated pages when the Edit Permissions option is // selected from Admin Settings. It displays the information for the headings and associated pages // listed in the array passed to the function as the parameter $headings, and indicates which are // currently available to the user with the ID passed as $adminID. global $db; while (!$headers->EOF){ // for each valid menu header // From the list of headers in the array passed as a parameter, compile a subset of those visible // for the user with parameter adminID. Display all header titles with checkbox, checked if header // is visible for this user, unchecked otherwise. Except for the third party mods header which // does not have a checkbox and instead has extra explanatory text. Display buttons allowing all // boxes under each heading to be checked or unchecked with a single click. $query = "select * from ".TABLE_ADMIN_VISIBLE_HEADERS." where header_id = '".$headers->fields['id']."' and admin_id = '".$adminID."'"; $visible = $db->Execute($query); if ($headers->fields['id'] == 0){ echo '<div class="menuHeaderOff"><span class="menuTitle">'; echo $headers->fields['header'].' (when enabled these 3rd party contributions will appear in the Admin menus determined by their authors)'; }else{ if ($visible->fields['admin_id']==$adminID){ echo '<div class="menuHeaderOn">'."\n"; echo "\t".'<span class="menuTitle">'; echo '<label><input name="'.$headers->fields['header'].'" type="checkbox" checked="on" value="on">'; }else{ echo '<div class="menuHeaderOff">'."\n"; echo "\t".'<span class="menuTitle">'; echo '<label><input name="'.$headers->fields['header'].'" type="checkbox" value="off">'; } echo $headers->fields['header'].' Menu</label>'; } echo "</span>\n"; echo "\t".'<span class="headerCheckButtons">'."\n"; echo "\t\t".'<input type="button" value="check All" onclick="checkAll(this.form,\''.$headers->fields['header'].'\',true);">'."\n"; echo "\t\t".'<input type="button" value="Uncheck All" onclick="checkAll(this.form,\''.$headers->fields['header'].'\',false);">'."\n"; echo "\t</span>\n"; echo "</div>\n\n"; // Read in list of all pages under this header from dB thsn for each page. Then for each page // read dB to see if the user with parameter adminID is allowed access to this page. Output // check box (ticked if page is allowed) and page name. Page name is constructed by stripping // out the 10 characters if page is called from the modules menu and replacing underlines // space otherwise. Add an asterisk to pages that do not appear directly in the admin menus. echo '<div class="checkboxBlock">'."\n"; $query = "select * from ".TABLE_ADMIN_FILES." where header = '".$headers->fields['id']."'"; $pages = $db->Execute($query); while (!$pages->EOF){ echo "\t".'<label class="permissionBox"><input name="'.$pages->fields['page'].'" class="'.$headers->fields['header'].'" type="checkbox" '; $query = "select * from ".TABLE_ADMIN_ALLOWED." where page_id = '".$pages->fields['id']."' and admin_id = '".$adminID."'"; $allow = $db->Execute($query); if ($allow->fields['admin_id']==$adminID) {echo 'checked="on" value="on">';} else {echo 'value="off">';} if (substr($pages->fields['page'],0,11)=='modulesset=') {echo substr($pages->fields['page'],11);} else{echo str_replace('_', ' ', $pages->fields['page']);} if ($pages->fields['submenu']==1) {echo '*';} echo "</label>\n"; $pages->MoveNext(); } echo "</div>\n\n"; $headers->MoveNext(); } } ?>

Any help would be most appreciated.

24 Sep 2007, 9:01 AM
#324
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

I think as well there was a wee ! missing on line 24 in admin/includes/overrides/int_admin_auth.php as that error also popped up but after adding this in it fixed it (as before I really don't know much about php but the rest of the code had ! in a similar place)

24 Sep 2007, 9:06 AM
#325
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

@peanut77

The big chunk of code that you posted was corrupted. The file is fine until line 181 and then it restarts again from the beginning. I recommend downloading a fresh copy, keeping a close look on any error logs, then FTPing the new files over the top of the ones that you have on your server (and again watching the error logs closely).

You shouldn't need to re-install the database patch, or repatch the admin file (unless you used one of the pre-patched files, in which case I would replace it with the new download as a precaution).

24 Sep 2007, 9:08 AM
#326
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Hello Thank you so much for your super fast reply - I downloaded this copy this morning from the download area - where do I get a new uncorrupted version?

Thanks.

24 Sep 2007, 9:11 AM
#327
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

peanut77:

Hello Thank you so much for your super fast reply - I downloaded this copy this morning from the download area - where do I get a new uncorrupted version?Same place. This mod hasn't changed for almost 11 months. Your copy got corrupted somewhere in your download from Zen Cart, or your upload to your server.

24 Sep 2007, 9:14 AM
#328
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

(I thought it hadn't changed as the date is still showing as last year on the download page) Just downloaded it again - same code corrupted.

Sorry to be a pest - but should I just remove the code from where it starts repeating?

Thanks

24 Sep 2007, 9:19 AM
#329
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Sorry - I just downloaded that file from another site (should have thought of that before bothering you!) which has fixed that problem but I am now getting parse errors

Parse error: syntax error, unexpected $end in /home/kiaranv/QH684H3P/htdocs/upstream/admin/admin_control.php on line 200

Would every file have been corrupted? And I should just recreate my copy by downloading from the site where it does work?

24 Sep 2007, 9:26 AM
#330
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

I've just downloaded the mod from the Zen Cart site and there's no problem with the files there, so the problem is definitely in the way in which you are moving files about. Something is wrong there and trying to work out which files are getting corrupted and eliminating those corruptions will be a arduous and tedious task. Better to try to find the root of the problem and stamp it out.

How are you downloading the files? Is your server local or remote? If remote, how do you upload files? Are the files already corrupt before you try to send them to your server? How do you unzip them?

24 Sep 2007, 9:32 AM
#331
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Totally bizarre. Download via the download section, unziped using winzip 10, ftp'd using ipswitch professional.

I'll just regather my files from the version that is working. Thank you again for your time - I thought I had some how managed to do something stupidly wrong and couldn't figure out what as it is a fab module and really easy to install!

Cheers.

24 Sep 2007, 9:35 AM
#332
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

Starting with a set of files that you know to be clean is the right way to go. Then if you have a problem again, check them out at each step to see which one is introducing the corruption. Good luck.

24 Sep 2007, 1:06 PM
#333
kutnkudly avatar

kutnkudly

New Zenner

Join Date:
Jan 2007
Posts:
7
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Ok, since 4:30 this morning, I have been reading through the pages of this forum, and following the steps included in your latest download of admin profiles. I use zen 1.3.7.1 and everything has been working fine. The only mod I have done to my cart was to add a template (PC01-passion cove).

I was able to add an admin to the cart and enter username/pw/email. I can log in as that person. I realized after setting this up that I had forgotten patch 3 in your instructions, so after editing the english.php file as directed, I tried to get my admin page to show the icon as you mention (the orange one with the P). I log in under my main login (not as the second user that I added) and everything looks fine. However, when I click on Tools/Admin Settings, all that comes up is a blank, white, page. I have noticed that whenever I open a .php file (particularly the english.php) and edit it, and then save it, it totally takes the formatting out of it. Does this have an effect on how the .php file performs? I've got a mediocre understanding of all this, and right now my head is ready to explode from all this reading.

thanks in advance!

25 Sep 2007, 1:19 PM
#334
johnny43 avatar

johnny43

Zen Follower

Join Date:
Feb 2006
Posts:
231
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Hello,

Great Mod Kuroi...

I had to re install the mod...now when i go to the admin settings I no longer see the orange icon. I have tried several re installs with no luck.

Any suggestions ?

29 Sep 2007, 3:32 PM
#335
thomasw98 avatar

thomasw98

Zen Follower

Join Date:
Aug 2007
Location:
Eugene, OR
Posts:
166
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Installed the mod but had one small problem with one of my extra modules, Customer Loyalty Rewards. This mod does not appear as a choice under one of the existing admin pulldown menus but instead has its own pulldown menu in admin. After I followed Kuroi's instructions for updating the box file, the menu for Customer Loyalty Rewards was still not appearing. So I had to modify the box file to the following:

if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}

  $za_contents = array();
  $za_heading = array();
  $za_heading = array('text' => BOX_HEADING_CUSTOMER_REWARDS_ADMIN, 'link' => zen_href_link(FILENAME_ALT_NAV, '', 'NONSSL'));


$options = array( array('box' => BOX_CUSTOMER_REWARDS_SET_POINTS_MAINT_ADMIN, 'page' => FILENAME_CUSTOMER_REWARDS_POINTS_MAINT_ADMIN),
					array('box' => BOX_CUSTOMER_REWARDS_SET_EXCLUDED_ITEMS_ADMIN, 'page' => FILENAME_CUSTOMER_REWARDS_POINTS_RESTRICT),
					array('box' => BOX_CUSTOMER_REWARDS_CUSTOMER_ADMIN, 'page' => FILENAME_CUSTOMER_REWARDS_CUSOMER_MAINT),
					array('box' => BOX_CUSTOMER_REWARDS_REPORT_ADMIN, 'page' => FILENAME_CUSTOMER_REWARDS_REPORT)
				);

foreach ($options as $key => $value)
	if (page_allowed($value['page'])=='true') $za_contents[] = array('text' => $value['box'], 'link' => zen_href_link($value['page'], '', 'NONSSL'));
?>
<!-- customer_rewards_admin //-->
<?php
echo zen_draw_admin_box($za_heading, $za_contents);
?>
<!-- customer_rewards_admin_eof //-->

I didn't write this out myself, but instead just hacked together the missing parts from the original box file into the new box file version. Then it worked perfectly, or at least I have not found any problems yet.

Thanks, Kuroi, for the nice mod!:clap:

1 Oct 2007, 2:58 PM
#336
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

kutnkudly:

Ok, since 4:30 this morning, I have been reading through the pages of this forum, and following the steps included in your latest download of admin profiles. I use zen 1.3.7.1 and everything has been working fine. The only mod I have done to my cart was to add a template (PC01-passion cove).

I was able to add an admin to the cart and enter username/pw/email. I can log in as that person. I realized after setting this up that I had forgotten patch 3 in your instructions, so after editing the english.php file as directed, I tried to get my admin page to show the icon as you mention (the orange one with the P). I log in under my main login (not as the second user that I added) and everything looks fine. However, when I click on Tools/Admin Settings, all that comes up is a blank, white, page. I have noticed that whenever I open a .php file (particularly the english.php) and edit it, and then save it, it totally takes the formatting out of it. Does this have an effect on how the .php file performs? I've got a mediocre understanding of all this, and right now my head is ready to explode from all this reading.This doesn't sound like anything to do with Admin Profiles and everything to do with a text editor that's corrupting your files. Care to tell us which one you're using?

1 Oct 2007, 2:59 PM
#337
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

johnny43:

Hello,

Great Mod Kuroi...

I had to re install the mod...now when i go to the admin settings I no longer see the orange icon. I have tried several re installs with no luck.

Any suggestions ?DId you re-apply the patch to admin.php to put the orange icon back in?

1 Oct 2007, 3:21 PM
#338
kutnkudly avatar

kutnkudly

New Zenner

Join Date:
Jan 2007
Posts:
7
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

Notepad. That's what opens the .php files by default. Do you have suggestions on something that would work better?

1 Oct 2007, 3:25 PM
#339
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Admin Profiles (for v1.3.x only!) Support Thread

kutnkudly:

Notepad. That's what opens the .php files by default. Do you have suggestions on something that would work better?For quick edits I use Notepad++, a free download completely unrelated to the similarly named, but very poor, Windows program.

1 Oct 2007, 3:28 PM
#340
thomasw98 avatar

thomasw98

Zen Follower

Join Date:
Aug 2007
Location:
Eugene, OR
Posts:
166
Plugin Contributions:
0

Re: Admin Profiles (for v1.3.x only!) Support Thread

kutnkudly:

Notepad. That's what opens the .php files by default. Do you have suggestions on something that would work better?

I use HTML-Kit, also a free program you can download from the internet. But I doubt that notepad would corrupt a php file. Maybe it is the program you are using to upload it to your server?