TonyBunney Posted March 1, 2011 Share Posted March 1, 2011 I have just successfully upgraded my site to SEO URL PRO. The only problem I had with the implementation was me not reading the instructions properly. I do apologies for the PM. Now that it is all working, I would like to know the easiest way to use the new "tep_href_link" function from the admin area. I run various overnight extracts from the admin area where I would like to include correctly formatted URLS. The client would also like to see what the correct URL is for an article he has written and I wanted to use new "tep_href_link" to display the link in the admin area. Quote Link to comment Share on other sites More sharing options...
easyq Posted March 1, 2011 Share Posted March 1, 2011 After some testing it now works as it should, thanks !! Just needed that little help to figure it out. Quote Everything is conditional, you just can't always anticipate the conditions. Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 1, 2011 Author Share Posted March 1, 2011 (edited) I run various overnight extracts from the admin area where I would like to include correctly formatted URLS. The client would also like to see what the correct URL is for an article he has written and I wanted to use new "tep_href_link" to display the link in the admin area. Seo urls cannot be created via admin as none of the requirements are in place using the admin application_top.php bootstrapper. Probably the best way would be to run an AJAX/JSON function in admin posting to a PHP file which includes the catalog side bootstrapper passing the filename and parameters.. this could look something like: - <?php include 'includes/application_top.php'; if ( array_key_exists( 'admin_filename', $_POST ) && array_key_exists( 'admin_params', $_POST ) ) { if ( is_readable( $_POST['admin_filename'] ) ) { echo json_encode( array( 'seo_url' => tep_href_link( $_POST['admin_filename'], ( tep_not_null( $_POST['admin_params'] ) ? $_POST['admin_params'] : '' ), 'NONSSL', false ) ) ); include DIR_WS_INCLUDES . 'application_bottom.php'; exit; } } echo json_encode( array( 'seo_url' => 'error' ) ); include DIR_WS_INCLUDES . 'application_bottom.php'; An example may be a file name of index.php with parameters of products_id=22 Edited March 1, 2011 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
TonyBunney Posted March 1, 2011 Share Posted March 1, 2011 That is what I thought. Thanks for the heads up on the Ajax solution. Tony Quote Link to comment Share on other sites More sharing options...
psychoder Posted March 1, 2011 Share Posted March 1, 2011 I just installed USU5 PRO on our website... The initial installation went on successfully, and the store is running correctly with the default settings. The reason I installed this addon was the caching system. What is the caching system is supposed to cache, and what will not be cached with this system? Our website has many nested categories (close to 1000) and a couple addons cause a huge amount of queries and this causes a very slow loading website. (I figured this out after trying KissER Query Output - 3000+ queries in the homepage?). These two addons are category box enhancement - which adds a dropdown for all categories (I doubt it is any use now, but still) and DynaMenu for Oscommerce - which basically has this flyout menu system for the category system. Both of these addons use a lot of queries to get the category information. After the installation of USU5 Pro and enabling the caching system, I would think the number of queries would decrease drastically as well as the loading time. However this does not seem to be the case, the Query Output addon still shows the same number of queries and the website loads slowly. I can see the cache being created in the folders (tried both file and sqlite options). What am I missing? or do I need to do additional modifications for the other addons to benefit from the caching system? Thanks for the great addon by the way, the URL parts are working properly. I noticed there is a discussion about GoDaddy hosting regarding path based URIs. Those seem to work on our hosting account. We are using unlimited linux hosting option, and using the 4GH hosting - which they seem to have rolled out recently. (They even have implemented Google mod_speed in that one). Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 1, 2011 Author Share Posted March 1, 2011 (edited) What am I missing? or do I need to do additional modifications for the other addons to benefit from the caching system? I see what you are saying but it seems you are misreading the contribution. The reason USU5 has a cache is that if it didn't it would add significantly to the number of queries taking place, I'll explain: - For every seo URI produced the database has to be queried .. e.g. to produce a product URI the database has to be queried for the product name. The same goes categories, manufacturers and if you had some addons installed the same for information pages, links manager, article manager, newsdesk etc etc. The USU5 cache is there to ensure that USU5 does not add to your existing query problems .. you cannot however use the cache system elsewhere in osCommerce to reduce queries. Edited March 1, 2011 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
psychoder Posted March 1, 2011 Share Posted March 1, 2011 I see what you are saying but it seems you are misreading the contribution. The reason USU5 has a cache is that if it didn't it would add significantly to the number of queries taking place, I'll explain: - For every seo URI produced the database has to be queried .. e.g. to produce a product URI the database has to be queried for the product name. The same goes categories, manufacturers and if you had some addons installed the same for information pages, links manager, article manager, newsdesk etc etc. The USU5 cache is there to ensure that USU5 does not add to your existing query problems .. you cannot however use the cache system elsewhere in osCommerce to reduce queries. OHHHH.... I See... You are totally right in my misunderstanding. Figures... I still have to add other caching for the other query problems then. I have been reading a lot of different discussions and contributions regarding this, and USU5 Pro came up and someone also mentioned he is using USU5 for caching... That one was the misleading part I guess. It never occurred to me that the URL functionality itself would require caching... :) Thanks for the quick response... Back to square one regarding loading speed :) Quote Link to comment Share on other sites More sharing options...
logo Posted March 2, 2011 Share Posted March 2, 2011 Hello. I tried to install this contribution , but admin side was not created. The urls are correct , but I have no way to control it. As well the usu_cache table was not created. Do you have an idea why it happened ? thank you Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 2, 2011 Author Share Posted March 2, 2011 (edited) Hello. I tried to install this contribution , but admin side was not created. The urls are correct , but I have no way to control it. As well the usu_cache table was not created. Do you have an idea why it happened ? thank you Never encountered this before so find it hard to comment. The only time I can see this happening is if someone had been playing with the settings and $uninstall_db_settings is set to true and the DB settings are not present either so the install script can do nothing. Edited March 2, 2011 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
logo Posted March 3, 2011 Share Posted March 3, 2011 Thanks , Robert. Another question ... I try to use USU5 sitemaps.. The problem is with the products sitemap. I created the map today 3.3.11 , but the dates which were there were: <lastmod>2011-02-19</lastmod> and for some products <lastmod>2069-12-31</lastmod> For some products I got empty loc node: <loc></loc> Do you have an idea why it happens ? Thank you Quote Link to comment Share on other sites More sharing options...
exca Posted March 4, 2011 Share Posted March 4, 2011 (edited) hellooo i need help it is normal? my product name is "botol asi" i just notice that my url show : http://warung.exalumni.com/product_info.php/botol-p-36 is it normal with "botol-p-36" or can it should show botol-asi-p-36 because same day latter , my web being hack and this day my visitor drop very droppp :( and i need to know if my seo urls 5 include being hack, form url show above Edited March 4, 2011 by exca Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 4, 2011 Author Share Posted March 4, 2011 hellooo i need help it is normal? my product name is "botol asi" i just notice that my url show : http://warung.exalum...oduct_info.php/botol-p-36 is it normal with "botol-p-36" or can it should show botol-asi-p-36 because same day latter , my web being hack and this day my visitor drop very droppp :( and i need to know if my seo urls 5 include being hack, form url show above Please read the operation instructions, specifically "Filter Short Words". After making the change remember to reset the cache. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2011 Share Posted March 4, 2011 Updated to the PRO version a few hours ago and it is working really well! I am running a multi-language store. I think it's really cool that now I can create URLs like http://www.mystore.com/en/category/product-p-13.html Is there a possibility to display the /en/ part at the beginning of the URL as well for pages like contact_us.php etc...? TO make it look like http://www.mystore.com/en/contact_us.php instead of http://www.mystore.com/contact_us.php/en? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 5, 2011 Author Share Posted March 5, 2011 Updated to the PRO version a few hours ago and it is working really well! I am running a multi-language store. I think it's really cool that now I can create URLs like http://www.mystore.c...oduct-p-13.html Is there a possibility to display the /en/ part at the beginning of the URL as well for pages like contact_us.php etc...? TO make it look like http://www.mystore.c.../contact_us.php instead of http://www.mystore.c...tact_us.php/en? No the filename needs to be first, this is in keeping with the standard URLs like www.mysite.com/index.php/en/my-great-category-c-32 Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2011 Share Posted March 5, 2011 okay, I understand :) How about the redirection to index.php when I switch the language. Is it likely to get fixed in a way so there will be no redirect? (customer stays on the same page after language change) Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 5, 2011 Author Share Posted March 5, 2011 okay, I understand :) How about the redirection to index.php when I switch the language. Is it likely to get fixed in a way so there will be no redirect? (customer stays on the same page after language change) Possibly .. I have no immediate plans to do this though. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥Biancoblu Posted March 5, 2011 Share Posted March 5, 2011 Hi Robert sorry for posting in the wrong topic before. I have a 4 language site and have installed the sitemap.xml extra, but it only builds links in english. Is there a way to make it build links in all my languages? Thanks in advance. Quote ~ Don't mistake my kindness for weakness ~ Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 5, 2011 Author Share Posted March 5, 2011 Hi Robert sorry for posting in the wrong topic before. I have a 4 language site and have installed the sitemap.xml extra, but it only builds links in english. Is there a way to make it build links in all my languages? Thanks in advance. Not currently. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
logo Posted March 5, 2011 Share Posted March 5, 2011 Hello , Robert. usu5_sitemaps create products site map with wrong dates - like year 2069 etc. Do you why the wrong date is printed? Thank you Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 5, 2011 Author Share Posted March 5, 2011 Hello , Robert. usu5_sitemaps create products site map with wrong dates - like year 2069 etc. Do you why the wrong date is printed? Thank you I haven't a clue .. works fine my end. It uses either the products_last_modified or the products_date_added fields. Perhaps these are corrupt in your DB? Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
smartwork Posted March 5, 2011 Share Posted March 5, 2011 Installed USU5 into our shop with version: define('PROJECT_VERSION', 'osCommerce Online Merchant v2.2 RC2a'); Install instructions and presentation was awesome and GREATLY appreciated. When finished, here's what I've got when I load the home page of the shop as instructed: Warning: strpos() [function.strpos]: Empty delimiter in /usr/www/users/..../includes/modules/ultimate_seo_urls5/main/bootstrap.php on line 122 which is: if (DIR_WS_CATALOG != '/' && ( false !== strpos( $rawpath, DIR_WS_CATALOG ) ) ) { // Remove the DIR_WS_CATALOG path $rawpath = str_replace( DIR_WS_CATALOG, '/', $rawpath ); } In my includes/configure.php, our DIR definitions are the following (and completely functional for the shop in the home directory): define('DIR_WS_HTTP_CATALOG', ''); define('DIR_WS_HTTPS_CATALOG', ''); so, I did add the line below for simplicity sake to make the DIR definition and reference match for USU5 - not knowing how many changes would have to be made to the USU5 code if I wanted it to reflect the original DIR config for catalog in configuration.php: define('DIR_WS_CATALOG', ''); Is it the ' ' (no space between quotes) value for DIR that is causing the problem? I tried troubleshooting it putting some conditions in to work around if the DIR value is '', but nothing resulting in a solution. I'm able to resolve the error, but then links only result in an attempted page-load that never is successful or 404s... it just fails to do anything. Can you point me in a direction of a solution? Many thanks... Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 5, 2011 Author Share Posted March 5, 2011 (edited) Can you point me in a direction of a solution? Many thanks... Yes Your code is incorrect ( or at least your code is modified so that DIR_WS_CATALOG is set further down than than is normal ), in osCommerce DIR_WS_CATALOG is set in the bootstrap ( includes/application_top.php ) as follows: - if ($request_type == 'NONSSL') { define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG); } else { define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG); } Edited March 5, 2011 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
smartwork Posted March 5, 2011 Share Posted March 5, 2011 Thanks for the quick reply. I should have included more info. The same error results with or without the additional line in configure.php If I remove the definition line that I added (which I have), the result is the same. Earlier, I stumbled upon a post on php forum where older versions of php produced this error when a value of ' ' (no space) was being used in certain functions that used "search haystack for needle". We're running php 5.2.11, so I assumed that was not the problem, but I wondered if our DIR_WS_HTTP_CATALOG which then feeds DIR_WS_CATALOG is producing my error because it virtually has an empty value. Quote Link to comment Share on other sites More sharing options...
smartwork Posted March 6, 2011 Share Posted March 6, 2011 ... continued from my post above: Separate from our production shop, I just did two box-stock OSC 2.2 installations and then added USU5 following the instructions. Install 1: I used the "modified shop" instructions Install 2: I used the "drop-on" instructions Both resulted in the same error that we got when installing into our production shop: Warning: strpos() [function.strpos]: Empty delimiter in /usr/www/users/....../includes/modules/ultimate_seo_urls5/main/bootstrap.php on line 121 (the line number was different by one line as the file was drop on) Is there a server or PHP config that's not enabled that would be causing this? Quote Link to comment Share on other sites More sharing options...
psychoder Posted March 6, 2011 Share Posted March 6, 2011 Hello, I searched the post but I did not see it was mentioned... I noticed an error when I was trying to update my sitemaps in google webmaster tools. The sitemapIndex file created by the sitemap tool in the extras does not seem to be conforming to the specifications described in http://sitemaps.org/protocol.php as in: <?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>http://www.example.com/sitemap1.xml.gz</loc> <lastmod>2004-10-01T18:23:17+00:00</lastmod> </sitemap> <sitemap> <loc>http://www.example.com/sitemap2.xml.gz</loc> <lastmod>2005-01-01</lastmod> </sitemap> </sitemapindex> The one created by the tool is structured just like a regular sitemap with url tags, and google webmaster tools thinks that you are submitting a few links to it... 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.