Phliplip Posted February 11, 2007 Share Posted February 11, 2007 (edited) This is the support thread for Faster Admin Navigation - FAN. Contribution: http://www.oscommerce.com/community/contributions,4875 Abstract: This contribution aims to speed-up the general navigation in specific sections in the osCommerce admin. -- Example: -- -------------- To speed-up the navigation through the categories and products in admin, this contribution add doubleclick functionality to the rows of categories and products. Click on categories or products to se quick-info pane (normal behavior). Double Click on categories to se content of category, same as clicking once to select category and clicking again once page is loaded. Double Click on products to edit the product, note this is not same behavior as clicking once to select product and clicking again once page is loaded. Normal behavior for this action is to view the product information page. -------------- I have tested it to work in both IE 6.0 and FF 1.5/2.0 - In Opera 9.0 it doesn't work at all. Though ondblclick="" in theory shouldn't work at all, due to the onclick="" on the same element! So i have experienced, that the onclick was used instead of the ondblclick! You could possibly fix it by delaying the onclick="", but then again. If the onclick is used, just click again on the selected item. Edited February 11, 2007 by Phliplip Quote Link to comment Share on other sites More sharing options...
azer Posted February 12, 2007 Share Posted February 12, 2007 Although this is a nice mod if you are using Admin Access you will not want to install this code without some custom coding. The onclick feature will bypass the admin rights ... and people double clicking will be able to access or edit information they are not supposed to be able to. You will need to create a second set of queries for non Top Level Admins. can someone explain? i use admin acess , so other admin will only able to see the right files and so use th double click feature only on those files , i m wrong ? Quote MS2 Link to comment Share on other sites More sharing options...
azer Posted February 12, 2007 Share Posted February 12, 2007 also on my osc version i always have $HTTP_GET_VARS not $_GET can someoine give me an explanation , do i have to update all my $HTTP_GET_VARS to $_GET in my shop ? Quote MS2 Link to comment Share on other sites More sharing options...
bkellum Posted February 12, 2007 Share Posted February 12, 2007 also on my osc version i always have $HTTP_GET_VARS not $_GET can someoine give me an explanation , do i have to update all my $HTTP_GET_VARS to $_GET in my shop ? Hey Azer, I don't use this contribution (yet) but your question deals with PHP 4 verses PHP 5 and Register Globals. If you are not changing to a new PHP server that would be running PHP 5, then NO, you do not need to change this code. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
Phliplip Posted February 12, 2007 Author Share Posted February 12, 2007 Hi Azer: Sorry, my mistake! I have done some changes to my osC package, to fully support PHP5 (Actually tried to submit it, but it was considered a fork). I will change FAN to fully support the $HTTP_GET_VARS ASAP. Quote Link to comment Share on other sites More sharing options...
Phliplip Posted February 12, 2007 Author Share Posted February 12, 2007 I have released a corrected version, where $_GET is replaced with $HTTP_GET_VARS. Another notice, from user insomniac2. http://www.oscommerce.com/forums/index.php?showuser=87520 Posted on the contribution page! ----- Although this is a nice mod if you are using Admin Access you will not want to install this code without some custom coding. The onclick feature will bypass the admin rights ... and people double clicking will be able to access or edit information they are not supposed to be able to. You will need to create a second set of queries for non Top Level Admins. ----- For further notice, please post compability issues in the support thread. Thank ;) Quote Link to comment Share on other sites More sharing options...
Phliplip Posted February 12, 2007 Author Share Posted February 12, 2007 Azer: I wasn't able to reply on you PM. So here comes: Hi Azer, Thanks for the words :) I have uploaded a corrected version, please enjoy :-" Regarding your articles page. I don't know that the first piece of code is supposed to do, but the last code looks familiar to the other changes i have done, so please commit the following. ------ Before: onclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles['articles_id']) . '\'" Add: ondblclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles['articles_id'] . '&action=edit) . '\'" -- Before: onclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles['articles_id'] . '&action=article_preview&read=only') . '\'" Add: ondblclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles['articles_id'] . '&action=edit') . '\'" ------------------ I haven't installed this contrib, so this is done from the code in your message. Please check that 'edit' is the correct action for this contrib. If you want' normal behavior just replace 'action=edit' with 'action=article_preview&read=only' and then you don' need to commit the second change. Hope it works, and please let me know where to find the articles contribution you are using. Best regards, Philip Espersen wow amazing ,so much time saved, how did we all do before ? :blush: i dont manage to use the same concept to change the articles page , from the same contrib name if (isset($tInfo) && is_object($tInfo) && ($topics['topics_id'] == $tInfo->topics_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, tep_get_topic_path($topics['topics_id'])) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $topics['topics_id']) . '\'">' . "\n"; } then in another part of the file : if (isset($aInfo) && is_object($aInfo) && ($articles['articles_id'] == $aInfo->articles_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles['articles_id'] . '&action=article_preview&read=only') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles['articles_id']) . '\'">' . "\n"; } any idea ? Quote Link to comment Share on other sites More sharing options...
wheeloftime Posted February 12, 2007 Share Posted February 12, 2007 I have released a corrected version, where $_GET is replaced with $HTTP_GET_VARS. Why ??! $_GET is the way to go, not $HTTP_GET_VARS... Quote Link to comment Share on other sites More sharing options...
Phliplip Posted February 12, 2007 Author Share Posted February 12, 2007 Couldn't agree more ;) BUT $HTTP_GET_VARS is the notation that i currently used in the latest official release (osCommerce 2.2 Milestone 2 Update 060817). And therefore to hold the coding standard and best practise of that release, i've changed it back! Using both $HTTP_GET_VARS and $_GET could possibly mess up osCommerce and other contribs. Example: -- test.php -- <?php echo($HTTP_GET_VARS['foo']."<br>"); echo($_GET['foo']."<br>"); echo("<br>"); $_GET['foo'] = "MIA"; echo($HTTP_GET_VARS['foo']."<br>"); echo($_GET['foo']."<br>"); ?> ---- GET request to test.php?foo=foobar will output following. -- foobar foobar foobar MIA -- This is because $HTTP_GET_VARS and $_GET is 2 different arrays. And therefore $HTTP_GET_VARS don't reflect changes done to $_GET! Why ??! $_GET is the way to go, not $HTTP_GET_VARS... Quote Link to comment Share on other sites More sharing options...
azer Posted February 12, 2007 Share Posted February 12, 2007 there is a typo in onclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles['articles_id']) . '\'" [code] '&action=edit) . '\'" should be '&action=edit') . '\'" , the quote after edit ! but still it doenst work as you see , there are info for Topic like a category and Article , like a productcan i send you my whole file , if yes pm your mail :rolleyes: Quote MS2 Link to comment Share on other sites More sharing options...
Phliplip Posted February 12, 2007 Author Share Posted February 12, 2007 there is a typo in onclick="document.location.href=\'' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles['articles_id']) . '\'" [code] '&action=edit) . '\'" should be '&action=edit') . '\'" , the quote after edit !but still it doenst work as you see , there are info for Topic like a category and Article , like a productcan i send you my whole file , if yes pm your mail :rolleyes: Hi Azer, Please give me a link to the contribution, and i will have a look at it! Quote Link to comment Share on other sites More sharing options...
azer Posted February 12, 2007 Share Posted February 12, 2007 here is the link of article manager http://www.oscommerce.com/community/contributions,1709 Quote MS2 Link to comment Share on other sites More sharing options...
insomniac2 Posted February 14, 2007 Share Posted February 14, 2007 Sorry took so long to reply to your question azer. Yes I guess that does make sense to do the language bolding that way. I never thought of that. As for the onmouseevent effecting Admin Access. Basically some or most of the admin files have a command like 'action=edit' in the mouseevent section. I did a test and noticed that these commands were oeveriding Admin Access Rights .. because Admin Access only explains and has the code for controlling Admin Buttons like the Edit button in categories.php etc. The current contribution code does not prevent the onmouseclick actions .. only the buttons .. unless you custom code like I have been slowly doing and I`ve taken out all the '&action=edit' etc. Now when someone doubleclicks on a line it does nothing for them. They have to use the Buttons. Hope this makes some sense to you. For bold just put the bold tags in the orderlist file or the language file .. around each heading you want in bold. For example in the language file: define('OL_CUSTOMERNAME', 'Customer Name:'); would be for bold: define('OL_CUSTOMERNAME', '<b>Customer Name:'</b>); yes i know that , but would be better to do it on the code page ot in the language , so if 5 language 5 times less work would be maybe next release :-) Quote Link to comment Share on other sites More sharing options...
Phliplip Posted February 14, 2007 Author Share Posted February 14, 2007 Insomniac2 and Azer: I'm installing Administration Access Level Accounts 2.2a (http://www.oscommerce.com/community/contributions,1359) onto the shop i have developed FAN on. Please let me know if this is the contrib you are talking about. I will try to have a look at this issue. Quote Link to comment Share on other sites More sharing options...
data2700 Posted February 17, 2011 Share Posted February 17, 2011 Hi forum readers! I'm trying to install this contribution but my site has been modified so I'm not quite sure how to combine this instruction: Before: onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '\'" Add: ondblclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product') . '\'" Into this bit of modified code: if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n"; I have tried, but I have limited php skills. Can anyone help? Thanks in advance! } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.