[Addon] Generic Box
#61
Posted 23 March 2011 - 05:34 PM
One prob tho (sorry)
The title on my box is: MODULE_BOXES_GENERIC_BOX_TITLE
and I can't see why.
help pleaseeeee...
Thanks
A
#62 ONLINE
Posted 23 March 2011 - 06:23 PM
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#64
Posted 04 April 2011 - 01:31 AM
I wanted to implement social links with buttons into my Generic box and was wondering where and how i imput the html coding within the php file
I notice this is an old Post im just praying you still get an alert for it
#65 ONLINE
Posted 04 April 2011 - 01:47 AM
Yes, thankfully, the forum is still sending notices on this one. It will stop doing so at some unknown future time, without notice, so PM me if I don't respond in a day or so.
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#66
Posted 05 April 2011 - 07:14 AM
First thank you for the module...works great.
The problem I'm trying to fix is related to ssl encryption. I am using this box for twitter and facebook feeds. Facebook offers the feed in encrypted format so it works perfectly at all times.
My twitter feed is not available in an https format
I have this code
<?php
if( $_SERVER['HTTPS'] != "on" )
{
?>
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'search',
search: 'Corvette',
interval: 6000,
title: 'Corvette Tweets',
subject: '',
width: 'auto',
height: 300,
theme: {
shell: {
background: '#535454',
color: '#ffffff'
},
tweets: {
background: '#050505',
color: '#f2eff2',
links: '#1985b5'
}
},
features: {
scrollbar: true,
loop: true,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
toptweets: true,
behavior: 'default'
}
}).render().start();
</script>
<?php
}
?>
It works as it is supposed to from my main page, but inserted into the generic box text box it doesn't turn off on https.
Is there somewhere else in the coding I can place this to have it show up properly? Thank you in advance.
#67 ONLINE
Posted 05 April 2011 - 03:26 PM
if (tep_not_null($content)) {
and replace it with: if (tep_not_null($content) && $_SERVER['HTTPS'] != "on" ) {
Then put your script (without the PHP code) in the module's text box for your language. Thanks for pointing this out. I'll fix it in a future release.Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#68
Posted 05 April 2011 - 04:40 PM
kymation, on 05 April 2011 - 03:26 PM, said:
if (tep_not_null($content)) {
and replace it with: if (tep_not_null($content) && $_SERVER['HTTPS'] != "on" ) {
Then put your script (without the PHP code) in the module's text box for your language. Thanks for pointing this out. I'll fix it in a future release.Regards
Jim
Great thanks, I already got it working outside of the generic box, but this change will allow me to add another whole "Generic Box" and turn it on and off with https correct? I actually had a split between encrypted and non-encrypted content in the same box, so I added the whole code line into the template_bottom.php in an infoboxcontainer div and now it latches on the bottom of the generic box.
Thanks for the great add-on!
#69 ONLINE
Posted 05 April 2011 - 06:57 PM
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#70
Posted 15 April 2011 - 09:27 AM
I double checked it to make sure I uploaded to the right file paths, uninstalled it, re-installed it, double checked again
and still got the same error message so I just uninstalled it.
#71
Posted 15 April 2011 - 04:51 PM
Fatal error: Cannot redeclare class language in /home1/sgptechc/public_html/discountegauges/includes/classes/language.php on line 16
here is the code from the language.php file:
<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
Released under the GNU General Public License
browser language detection logic Copyright phpMyAdmin (select_lang.lib.php3 v1.24 04/19/2002)
Copyright Stephane Garin <sgarin@sgarin.com> (detect_language.php v0.1 04/02/2002)
*/
class language { (this is line 16)
var $languages, $catalog_languages, $browser_languages, $language;
function language($lng = '') {
$this->languages = array('ar' => 'ar([-_][[:alpha:]]{2})?|arabic',
'bg' => 'bg|bulgarian',
'br' => 'pt[-_]br|brazilian portuguese',
'ca' => 'ca|catalan',
'cs' => 'cs|czech',
'da' => 'da|danish',
'de' => 'de([-_][[:alpha:]]{2})?|german',
'el' => 'el|greek',
'en' => 'en([-_][[:alpha:]]{2})?|english',
'es' => 'es([-_][[:alpha:]]{2})?|spanish',
'et' => 'et|estonian',
'fi' => 'fi|finnish',
'fr' => 'fr([-_][[:alpha:]]{2})?|french',
'gl' => 'gl|galician',
'he' => 'he|hebrew',
'hu' => 'hu|hungarian',
'id' => 'id|indonesian',
'it' => 'it|italian',
'ja' => 'ja|japanese',
'ko' => 'ko|korean',
'ka' => 'ka|georgian',
'lt' => 'lt|lithuanian',
'lv' => 'lv|latvian',
'nl' => 'nl([-_][[:alpha:]]{2})?|dutch',
'no' => 'no|norwegian',
'pl' => 'pl|polish',
'pt' => 'pt([-_][[:alpha:]]{2})?|portuguese',
'ro' => 'ro|romanian',
'ru' => 'ru|russian',
'sk' => 'sk|slovak',
'sr' => 'sr|serbian',
'sv' => 'sv|swedish',
'th' => 'th|thai',
'tr' => 'tr|turkish',
'uk' => 'uk|ukrainian',
'tw' => 'zh[-_]tw|chinese traditional',
'zh' => 'zh|chinese simplified');
$this->catalog_languages = array();
$languages_query = tep_db_query("select languages_id, name, code, image, directory from " . TABLE_LANGUAGES . " order by sort_order");
while ($languages = tep_db_fetch_array($languages_query)) {
$this->catalog_languages[$languages['code']] = array('id' => $languages['languages_id'],
'name' => $languages['name'],
'image' => $languages['image'],
'directory' => $languages['directory']);
}
$this->browser_languages = '';
$this->language = '';
$this->set_language($lng);
}
function set_language($language) {
if ( (tep_not_null($language)) && (isset($this->catalog_languages[$language])) ) {
$this->language = $this->catalog_languages[$language];
} else {
$this->language = $this->catalog_languages[DEFAULT_LANGUAGE];
}
}
function get_browser_language() {
$this->browser_languages = explode(',', getenv('HTTP_ACCEPT_LANGUAGE'));
for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
reset($this->languages);
while (list($key, $value) = each($this->languages)) {
if (preg_match('/^(' . $value . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {
$this->language = $this->catalog_languages[$key];
break 2;
}
}
}
}
}
?>
the languages module is set to true: sort order doesn't conflict with other boxes. tried downloading the contribution, and re-installing, but get same result. did notice if I close the browser window, wait few minutes, start a new browser, the site comes up with no error. try another site, go back to my site and the error rears it's ugly head!
any idea on what I have messed-up?
Thanks,
Timmy C
#72
Posted 15 April 2011 - 08:48 PM
kymation, on 05 April 2011 - 03:26 PM, said:
if (tep_not_null($content)) {
and replace it with: if (tep_not_null($content) && $_SERVER['HTTPS'] != "on" ) {
Then put your script (without the PHP code) in the module's text box for your language. Thanks for pointing this out. I'll fix it in a future release.Regards
Jim
if (tep_not_null($content) && $request_type != 'SSL' ) {
The other test isn't valid on all servers.If you use the global variable $request_type set in /includes/application_top.php then the contribution will work, provided of course SSL works at all in the shop.
"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#73 ONLINE
Posted 15 April 2011 - 08:49 PM
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#74 ONLINE
Posted 17 April 2011 - 02:35 AM
include(DIR_WS_CLASSES . 'language.php');and change it to
include_once(DIR_WS_CLASSES . 'language.php');Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#75
Posted 19 April 2011 - 06:14 PM
Another question however, is it possible to have more than 1 generic box?
#76 ONLINE
Posted 19 April 2011 - 07:01 PM
1. Change all instances of bm_generic to the name of your new box.
2. Change all instances (Case Sensitive!) of _GENERIC_ to match your new name.
You might also want to change the name in the language file so you can keep the new box separate from the original.
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#77
Posted 24 April 2011 - 06:19 AM
Wanna replicate it? try re-ordering all the other boxes using 2-digit numbers, instead of the default 4-digit.
I really don't know why, but when I've done this (use 2-digits order numbers) I get the error message, re-order everything using 4-digits again and the problem solves by itself...
I've done this in 2 different pages, with the same causes/results/fix; you should check it yourself.
Great add-on by the way, thank you very much for sharing it with us.
Kindest regards.
kymation, on 15 April 2011 - 08:49 PM, said:
Regards
Jim
#78 ONLINE
Posted 24 April 2011 - 05:46 PM
If using 4-digit numbers works for you, then maybe it will help others as well, so thank you very much for posting that.
Regards
Jim
Banners Box 2.3.x Support
Categories Accordion Box 2.3.x Support
Categories Images Box 2.2x 2.3.x Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.x Support
Get 1 Free 2.2x Support
jQuery Banner Rotator 2.2x 2.3.x Support
Modular Front Page 2.3.x Support
Modular SEO Header Tags 2.3.x Support
MVS 2.2x Support
PDF Datasheet 2.3.x Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.x Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.x Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x Support
#79
Posted 24 April 2011 - 08:53 PM
avtardeol, on 23 March 2011 - 05:34 PM, said:
One prob tho (sorry)
The title on my box is: MODULE_BOXES_GENERIC_BOX_TITLE
and I can't see why.
help pleaseeeee...
Thanks
A
#80
Posted 05 May 2011 - 12:14 PM
but I have the following error: Fatal error: Can not redeclare class language in C: \ wamp \ www \ 01-boutic_rc231_en_dev \ includes \ classes \ language.php on line 16.
When I install the module in admin all goes well, and on the main page when I update the browser, boxe appears, but if I click on the logo to reload the index page, I have nothing more: blank page.
Have you a fix for this, I see that I am not alone with this error.
Thank you for this job
Francois
Excuse my bad English, I'm in France and I do not speak very good English.









