-
Content count
150 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Stephan Gebbers
-
28d 2019, let's move the Project forward...
Stephan Gebbers replied to burt's topic in Club osC's Announcements
Ideas for child modules: - Audio Language (DVDs / BluRays) - Region / Region Locked (Software, US, EU, ASIA or Countries etc pp) - min. Requirements (Software, requirements for OS and Hardware) -
i got fooled by the way Oscommerce handles admin sessions again. when you use the build in htaccess protection it never logs you out (or automaticly logs you in with htaccess user/pass). i guess i gonna deactivate that and just use standard htaccess with differenc user/pass. confusing as F when you forget how it is supposed to work.
-
I realy like your error handler vor mysql error messages! Good Job!
you think it would work without problems with an older oscommerce version as well?
-
Glad it was helpful. The changes are to parts of the code that are in all oscommerce shops so there shouldn't be any problems.
-
Stephan Gebbers reacted to this
-
btw: i'm not sure if it is a good idea to send the error_log to the root folder of the shop. i changed that, so it will save it as error_log.txt into folder includes and forbid web access to *.txt in the htaccess of includes folder
also, the email is send but after the query nothing can be added to $msg. it will not show after the error query. not shure why.. i moved the URI line in front of the line with the error query and that shows up in email now.
-
-
-
Bootstrap 4 in 2.3.4.1
Stephan Gebbers replied to burt's topic in osCommerce Online Merchant Community Bootstrap Edition
Thank you @burt! How about compatibility of Modules that work with 2.3.4.1 BS Frozen (Bootstrap 3) ? -
i have this in my create_account.php for 5minute emails and bad spam domains. maybe this could be done as a module also? i think the original contribution was from oscbooks.com back then.. // BANNED EMAILS $emails = file(DIR_WS_INCLUDES . 'emails-banned.txt'); for ($i=0, $n=sizeof($emails); $i<$n; $i++) { if (tep_not_null($emails[$i])) { $emaildomain = '@' . trim($emails[$i]); if (is_integer(strpos(strtolower($email_address), $emaildomain))) { $good_email = "no"; break; } } } // Email Whitelist $emails = file(DIR_WS_INCLUDES . 'emails-whitelisted.txt'); for ($i=0, $n=sizeof($emails); $i<$n; $i++) { if (tep_not_null($emails[$i])) { if (is_integer(strpos(strtolower($email_address), trim($emails[$i])))) { $good_email = "yes"; break; } } } if ($good_email == "no") { $error = true; $messageStack->add('create_account', ENTRY_EMAIL_NOT_ALLOWED_ERROR); } // BANNED EMAIL EOF
-
What about the Email Domains they are using? Would that be a way to block certain Domains on account creation?
-
Category on Index
Stephan Gebbers replied to radhavallabh's topic in Upgrading from Earlier Versions (v2.x to v2.x)
i am already using notepad++ to edit the shop files, saving as UT8 (without BOM). So in theory such problems should not appear. very strange! -
Category on Index
Stephan Gebbers replied to radhavallabh's topic in Upgrading from Earlier Versions (v2.x to v2.x)
i gave up on adding the changes. something seems wrong with copy and pasting it from the forum. stuff like PHP Fatal error: Uncaught Error: Call to undefined function tep_db_q\xef\xbb\xbfuery() -
Category on Index
Stephan Gebbers replied to radhavallabh's topic in Upgrading from Earlier Versions (v2.x to v2.x)
I was looking for something like that on the main page. Just installed it now! Excellent! -
Favicon Module for Frozen Edge
Stephan Gebbers replied to radhavallabh's topic in Upgrading from Earlier Versions (v2.x to v2.x)
check if the attached module works for you. just place all your generated faviconit files (images, xml etc) into the shops root. i took the standard code from faviconit.com and placed it into the header_tags module. so if you have no advanced faviconit.com options it should work. ht_favicon-module.zip -
adding //test to my htaccess = instant error 500
-
try changing //Block bad bots to #Block bad bots
-
example, as found here (second best answer) https://stackoverflow.com/questions/28650327/responsive-images-srcset-not-working this one switches with the viewport / window size. don't know if that is ideal. what do you think? echo '<a href="' . tep_href_link('index.php') . '"><picture> <source srcset="' . $store_logo_big . '" media="(min-width: 1200px)" /> <source srcset="' . $store_logo_medium . '" media="(min-width: 800px)" /> <img src="' . $store_logo_small . '" title="' . STORE_NAME . '" alt="' . STORE_NAME . '" class="img-responsive no-watermark"/></picture></a>';[code]
- 9 replies
-
- srcset
- responsive store logo
-
(and 1 more)
Tagged with:
-
so, resizing the browser window will not bring up the other logos i guess.
- 9 replies
-
- srcset
- responsive store logo
-
(and 1 more)
Tagged with:
-
ok, i changed the tep_image in tpl_cm_header_logo_multi.php to tep_image_legacy still getting the 1280 version always. also deleted images from mobile chrome cache. still the 1280 only its no retina. its a oneplus 3 mobile phone.
- 9 replies
-
- srcset
- responsive store logo
-
(and 1 more)
Tagged with:
-
Does this work together with KissIT ImageThumbnailer Pro? Regardless of using pc or phone, i get 1280 logo always. Regards, Stephan
- 9 replies
-
- srcset
- responsive store logo
-
(and 1 more)
Tagged with:
-
updating password functions in 2.3.4.1CE / 2.3.4BS?
Stephan Gebbers replied to Stephan Gebbers's topic in osCommerce Online Merchant Community Bootstrap Edition
i did not understand a word you said ;) i did a "beyond compare" on the phpass update and it seems the update is not that revolutionary. it should basicly work as the 0.3 or 0.4 version i think. the most significant change is my change of true to false in the passwordhash function call, as it will use the php crypt function and blowfish hash function $hasher = new PasswordHash(10, false); 10x iterations and $portable_hashes = false that will allow blowfish (from php crypt) and that is what i also asked. if that is a stronger/better encryption. i think so. function HashPassword($password) { $random = ''; if (CRYPT_BLOWFISH === 1 && !$this->portable_hashes) { $random = $this->get_random_bytes(16); $hash = crypt($password, $this->gensalt_blowfish($random)); if (strlen($hash) === 60) return $hash; } if (strlen($random) < 6) $random = $this->get_random_bytes(6); $hash = $this->crypt_private($password, $this->gensalt_private($random)); if (strlen($hash) === 34) return $hash; # Returning '*' on error is safe here, but would _not_ be safe # in a crypt(3)-like function used _both_ for generating new # hashes and for validating passwords against existing hashes. return '*'; } -
updating password functions in 2.3.4.1CE / 2.3.4BS?
Stephan Gebbers posted a topic in osCommerce Online Merchant Community Bootstrap Edition
i just updated Phpass from 0.3 to 0.5 in /includes/classes/passwordhash.php http://www.openwall.com/phpass/ and changed in includes/functions/password_funcs.php in function tep_encrypt_password($plain) and in function tep_validate_password($plain, $encrypted) { this $hasher = new PasswordHash(10, true); to $hasher = new PasswordHash(10, false); i now have a 60 char blowfish hash output. before i had a 34 char hash in the database field. Is there a reason not to change it that way? i think the passwords are encrypted with a stronger hash function that way and it should be php5.3+ compatible. account creation, change password and reset password seems to work just fine. and as someone asked about max length of password in Oscommerce Discord Chat. Is there a password length limit? i dont think so. Should there be a limit? (see https://sunnysingh.io/blog/secure-passwords ) "Passwords should never be longer than 72 characters to prevent DoS attacks". Regards, Stephan -
updating password functions in 2.3.4.1CE / 2.3.4BS?
Stephan Gebbers replied to Stephan Gebbers's topic in osCommerce Online Merchant Community Bootstrap Edition
as i wanted the best possible password encryption available. initialy i got into the password functions as someone asked about password length on oscommerce discord today and i had to look into it. -
Frozen to BSv4
Stephan Gebbers replied to burt's topic in osCommerce Online Merchant Community Bootstrap Edition
looks realy good! do you want to share what you did to make it look like that? -
Frozen to BSv4
Stephan Gebbers replied to burt's topic in osCommerce Online Merchant Community Bootstrap Edition
looks nice! but maybe the title space could line up with the other ones in a row? -
since regex and stuff is a book of seven seals to me, i would need some help to bring those two lines to php7.0 it should be transformed into preg_replace_callback because of the e modifier, but i dont understand how this preg_replace_callback works. Can someone help and transform those lines for me? Thanks alot! $text = preg_replace("#\{\{((STORE_|OWNER_|EMAIL_)[A-Z0-9_]+)\}\}#e", '$1', $text); $email_subject = preg_replace("#\{\{((STORE_|OWNER_|EMAIL_)[A-Z0-9_]+)\}\}#e", '$1', $email_subject);
- 11 replies
-
- deprecated
- preg_replace
-
(and 1 more)
Tagged with:
-
ULTIMATE Seo Urls 5 - by FWR Media
Stephan Gebbers replied to FWR Media's topic in General Add-Ons Support
i just tried to make my product_info.php urls customizable, as i dont like that the url is gonna change once you change the product name just a little Modifications are made to work with the rewrite functionality (where you need to have rewrite rules in htaccess). page module index.php still needs to be modified to have the customized category urls there as well. categories.php in admin would need a modification if you want to edit the seo url database fields from there. based on v208 https://apps.oscommerce.com/Hj4y0&ultimate-seo-urls-5-for-responsive-oscom looks good so far for product_info.php, but a) i could need some help with page module index.php to show the categories with the customized urls also. b) will that break any of the usu5 modules functionality? add fields to database ======================================= in table categories_description add field categories_seo_url (varchar 255) in table products_description add field products_seo_url (varchar 255) modify page modules ======================================= in /includes/modules/ultimate_seo_urls5/page_modules/product_info.php find this: protected $dependencies = array( 'products_id' => array( 'marker' => '-p-', 'query' => "SELECT pd.products_name, m.manufacturers_name, cd.categories_name, p.products_model, p2c.categories_id FROM products_description pd INNER JOIN products_to_categories p2c ON p2c.products_id = pd.products_id INNER JOIN products p ON pd.products_id = p.products_id LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id INNER JOIN categories_description cd ON p2c.categories_id = cd.categories_id AND cd.language_id=':languages_id' WHERE pd.products_id=':pid' AND pd.language_id=':languages_id' LIMIT 1", 'to_replace' => array( ':languages_id', ':pid' ) ) ); and replace with this: protected $dependencies = array( 'products_id' => array( 'marker' => '-p-', 'query' => "SELECT pd.products_seo_url, pd.products_name, m.manufacturers_name, cd.categories_seo_url, cd.categories_name, p.products_model, p2c.categories_id FROM products_description pd INNER JOIN products_to_categories p2c ON p2c.products_id = pd.products_id INNER JOIN products p ON pd.products_id = p.products_id LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id INNER JOIN categories_description cd ON p2c.categories_id = cd.categories_id AND cd.language_id=':languages_id' WHERE pd.products_id=':pid' AND pd.language_id=':languages_id' LIMIT 1", 'to_replace' => array( ':languages_id', ':pid' ) ) ); right after: // manufacturers_name is gained through a left join and may not exist array_key_exists( 'manufacturers_name', $details ) ? $text_types['b'] = $details['manufacturers_name'] : null; add: //if we have a products_seo_url, we use that string instead of products_name if (!empty($details['products_seo_url'])) { $text_types['p'] = $details['products_seo_url']; } //if we have a categories_seo_url, we use that string instead of categories_name if (!empty($details['categories_seo_url'])) { $text_types['c'] = $details['categories_seo_url']; } Removing .html from the rewrite URLs ======================================= in /includes/modules/ultimate_seo_urls5/uri_modules/path_rewrite.php and in /includes/modules/ultimate_seo_urls5/uri_modules/rewrite.php replace: if ( false === strpos( Usu_Main::i()->getVar( 'request_uri' ), '.html' ) ) { // path_rewrite seo url must have .html return false; } with: /* if ( false === strpos( Usu_Main::i()->getVar( 'request_uri' ), '.html' ) ) { // path_rewrite seo url must have .html return false; } */ find: return usu5_multi_language( $separator = 'right' ) . $text . $seperator . $value . '.html'; and replace it with: return usu5_multi_language( $separator = 'right' ) . $text . $seperator . $value; in /.htaccess replace: RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA] with: RewriteRule ^([a-z0-9/-]+)-p-([0-9]+)$ product_info.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+)$ index.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-m-([0-9]+)$ index.php [NC,L,QSA] -
SEO Friendly Urls - a new approach
Stephan Gebbers replied to gadlol's topic in General Add-Ons Support
another question. if i change the language on a page, the page reloads, the language changes but the url does not refresh to the language url but stays and the initial language url alias like, if you select german coming from english: www.domain.de/en/alias?language=de initial url is www.domain.de/en/alias then you switch language and get www.domain.de/en/alias?language=de (with language on the page already switched to german and canonical link (from canonical module) in page source changed to german already) where i would expect the resulting url after language switching to be www.domain.de/de/alias -
SEO Friendly Urls - a new approach
Stephan Gebbers replied to gadlol's topic in General Add-Ons Support
@gadiol thanks for the modul and help on installation. i have a 2.3.4.1 CE Shop and 2 languages. german and english. The english language links seem to work as far i can see (with /en/ in front of the alias), but the standard german category links behave different. Currently i cant get the Category link in standard language to work. it just shows www.xxxxx.de/?cPath=22 instead of the alias. i also tried to define a custom alias, but still get the ?cPath=22 for that standard language link. also, do i have to clear the cache after changing SFU settings or just when changes to aliases or products are made?