Zen Cart Logo
Forums / All Other Contributions/Addons / CSS3 Buttons [support thread]

CSS3 Buttons [support thread]

Views: 22,734

Results 101 to 120 of 149
5 Feb 2015, 3:40 PM
#101
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

CSS3 Buttons [support thread]

Thanks for the report; I'll update the readme and stage it for any future release!

18 Apr 2015, 11:51 AM
#102
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Re: CSS3 Buttons [support thread]

I am using this with v1.5.4 brilliant. If you are using Chrome you will find "cssbuttongenerator" in the app store

1 May 2015, 4:49 PM
#103
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: CSS3 Buttons [support thread]

OOOOOOOOOHHHHH Cindy.. I'm baaaaaack.. Yep adding more complexity to your life.. again.. :laugh:

Trying to figure out how to add a tooltip on hover to my buttons.. For now will use the button text defines for the tooltip just to get things going.. I will probably eventually add a complete set of separate defines just for tooltips.

I found this: http://codepen.io/cbracco/pen/qzukg

I'm thinking I need to modify the **includes/functions/html_output.php

**But not sure HOW to modify it to add the tooltip.

1 May 2015, 6:09 PM
#104
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

DivaVocals:

OOOOOOOOOHHHHH Cindy.. I'm baaaaaack.. Yep adding more complexity to your life.. again.. :laugh:

Trying to figure out how to add a tooltip on hover to my buttons.. For now will use the button text defines for the tooltip just to get things going.. I will probably eventually add a complete set of separate defines just for tooltips.

I found this: http://codepen.io/cbracco/pen/qzukg

I'm thinking I need to modify the **includes/functions/html_output.php

**But not sure HOW to modify it to add the tooltip.
Tee-hee, no complexity added! The tooltip functionality (although undocumented) is built-in.

In a language/extra_definition file, just set up a construct similar to:

define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . __FILE__);
$css_button_text = array ( 'button_add_to_cart.gif' => 'Click here to add the product to the cart',
                                   );

... and expand the array to suit. The downside is that you need to define the title text for ***all ***the buttons as any undefined button will have a title that reads something akin to:

button_back.gif: No title defined, see <whatever the extra_definition's file name is>
1 May 2015, 8:47 PM
#105
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: CSS3 Buttons [support thread]

lat9:

Tee-hee, no complexity added! The tooltip functionality (although undocumented) is built-in.

In a language/extra_definition file, just set up a construct similar to:

define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . FILE);
$css_button_text = array ( 'button_add_to_cart.gif' => 'Click here to add the product to the cart',
);

> ... and expand the array to suit.  The downside is that you need to define the title text for ***all ***the buttons as any undefined button will have a title that reads something akin to:
> ```
button_back.gif: No title defined, see <whatever the extra_definition's file name is>

Got it.. Seriously this is ALL I needed!!?? :smile: Wow this is a lot easier than what I thought!!! Thanks.. and yeah no worries about having to do this for ALL buttons.. I was planning on probably doing this for all the buttons anyway.. I shortened the buttons names in the language file (which as you know act as the title/alt for image buttons) because some were far too long and made my CSS buttons EXTRA wide.. Then I was looking at another site and saw they used tooltips with their CSS buttons.. So I thought that I could "re-purpose" the original alt titles and use them as tooltips on the CSS buttons from this module as they were more verbose and therefore more "instructive"..

Anyway.. thanks for this.. As always.. ROCK STAR!!!!

1 May 2015, 8:56 PM
#106
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

You can also do "interesting" things like:

define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . __FILE__);
$css_button_text = array ();
switch ($current_page_base) {
  case FILENAME_ACCOUNT_EDIT:
  case FILENAME_ACCOUNT_HISTORY:
  case FILENAME_ACCOUNT_NEWSLETTERS:
  case FILENAME_ACCOUNT_NOTIFICATIONS:
  case FILENAME_ACCOUNT_PASSWORD:
    $css_button_text['button_back'] = 'Return to <em>Manage Your Account</em>';
    break;
  default:
    if (strpos ($current_page_base, FILENAME_ADDRESS_BOOK_PROCESS) !== false) $css_button_text['button_back'] = 'Return to your <em>Address Book</em>';
    else $css_button_text['button_back'] = 'Return to the previous page';
    break;
}

That is, you can customize the buttons' title text based on the page context.

1 May 2015, 9:25 PM
#107
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: CSS3 Buttons [support thread]

lat9:

You can also do "interesting" things like:

define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . FILE);
$css_button_text = array ();
switch ($current_page_base) {
case FILENAME_ACCOUNT_EDIT:
case FILENAME_ACCOUNT_HISTORY:
case FILENAME_ACCOUNT_NEWSLETTERS:
case FILENAME_ACCOUNT_NOTIFICATIONS:
case FILENAME_ACCOUNT_PASSWORD:
$css_button_text['button_back'] = 'Return to <em>Manage Your Account</em>';
break;
default:
if (strpos ($current_page_base, FILENAME_ADDRESS_BOOK_PROCESS) !== false) $css_button_text['button_back'] = 'Return to your <em>Address Book</em>';
else $css_button_text['button_back'] = 'Return to the previous page';
break;
}

> That is, you can customize the buttons' title text based on the page context.

Nice.. I'm sure I'll break some ish doing this:laugh:.. One question.. this example covers the back button.. Can I do the this without blowing something up??

define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . FILE);
$css_button_text = array ();
switch ($current_page_base) {
case FILENAME_ACCOUNT_EDIT:
case FILENAME_ACCOUNT_HISTORY:
case FILENAME_ACCOUNT_NEWSLETTERS:
case FILENAME_ACCOUNT_NOTIFICATIONS:
case FILENAME_ACCOUNT_PASSWORD:
$css_button_text['button_back'] = 'Return to <em>Manage Your Account</em>';
break;
default:
if (strpos ($current_page_base, FILENAME_ADDRESS_BOOK_PROCESS) !== false) $css_button_text['button_back'] = 'Return to your <em>Address Book</em>';
else $css_button_text['button_back'] = 'Return to the previous page';
break;
switch ($current_page_base) {
case FILENAME_ACCOUNT_EDIT:
case FILENAME_ACCOUNT_HISTORY:
case FILENAME_ACCOUNT_NEWSLETTERS:
case FILENAME_ACCOUNT_NOTIFICATIONS:
case FILENAME_ACCOUNT_PASSWORD:
$css_button_text['button_forward'] = 'Return to <em>Manage Your Account</em>';
break;
default:
if (strpos ($current_page_base, FILENAME_ADDRESS_BOOK_PROCESS) !== false) $css_button_text['button_forward'] = 'Return to your <em>Address Book</em>';
else $css_button_text['button_forward'] = 'Return to the previous page';
break;
}

2 May 2015, 1:18 PM
#108
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

I've had sites where I've organized this file by alphabetical button-name (as indicated in your example, above) and other sites where it made more sense to organize the file by page, as below. It all depends on which way you (or whoever is going to maintain the list) find it easier to locate/verify that all the title-text values are supplied.

define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . __FILE__);
$css_button_text = array ();
switch ($current_page_base) {
  case FILENAME_ACCOUNT_EDIT:
  case FILENAME_ACCOUNT_HISTORY:
  case FILENAME_ACCOUNT_NEWSLETTERS:
  case FILENAME_ACCOUNT_NOTIFICATIONS:
  case FILENAME_ACCOUNT_PASSWORD:
    $css_button_text['button_back'] = 'Return to <em>Manage Your Account</em>';
    $css_button_text['button_forward'] = 'Go somewhere else';
    break;
  case FILENAME_ADDRESS_BOOK_PROCESS:
    $css_button_text['button_back'] = 'Return to your <em>Address Book</em>';
    break;
  default:
    $css_button_text['button_back'] = 'Return to the previous page';
    $css_button_text['button_forward'] = 'Go to the next page';
    break;
}
2 May 2015, 2:08 PM
#109
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: CSS3 Buttons [support thread]

lat9:

I've had sites where I've organized this file by alphabetical button-name (as indicated in your example, above) and other sites where it made more sense to organize the file by page, as below. It all depends on which way you (or whoever is going to maintain the list) find it easier to locate/verify that all the title-text values are supplied.

define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . FILE);
$css_button_text = array ();
switch ($current_page_base) {
case FILENAME_ACCOUNT_EDIT:
case FILENAME_ACCOUNT_HISTORY:
case FILENAME_ACCOUNT_NEWSLETTERS:
case FILENAME_ACCOUNT_NOTIFICATIONS:
case FILENAME_ACCOUNT_PASSWORD:
$css_button_text['button_back'] = 'Return to <em>Manage Your Account</em>';
$css_button_text['button_forward'] = 'Go somewhere else';
break;
case FILENAME_ADDRESS_BOOK_PROCESS:
$css_button_text['button_back'] = 'Return to your <em>Address Book</em>';
break;
default:
$css_button_text['button_back'] = 'Return to the previous page';
$css_button_text['button_forward'] = 'Go to the next page';
break;
}


Okay.. I'm gonna play.. :smile:

SLIGHT off topic (but kinda related) question:
Is there similar code for the admin CSS buttons???
2 May 2015, 3:47 PM
#110
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

DivaVocals:

Okay.. I'm gonna play.. :smile:

SLIGHT off topic (but kinda related) question:
Is there similar code for the admin CSS buttons???
Kinda-sorta-not-exactly-related answer: Nope

2 May 2015, 10:31 PM
#111
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: CSS3 Buttons [support thread]

lat9:

Kinda-sorta-not-exactly-related answer: Nopeokay.. will ask more details in the right support thread..:smile:

1 Jun 2015, 2:03 PM
#112
remops avatar

remops

New Zenner

Join Date:
Mar 2014
Location:
Memphis, TN
Posts:
52
Plugin Contributions:
0

Re: CSS3 Buttons [support thread]

Something has happen and now the "checkout" button and the "continued shopping" button on the shopping cart page are just links. Some of the other css buttons formatting has also changed.

The website is http://www.tissue-box-covers.com/

The Checkout and continue shopping looks to be links but I am sure that I had these set as css buttons.

I haven't checked this shopping cart page for some time and maybe I am just confused that it was a button:wacko:

Thanks

1 Jun 2015, 4:29 PM
#113
remops avatar

remops

New Zenner

Join Date:
Mar 2014
Location:
Memphis, TN
Posts:
52
Plugin Contributions:
0

Re: CSS3 Buttons [support thread]

OK I found that adding the mobile template by AlgoZone changed the css settings.

Thanks to Mike at Geekhost this has been fixed. :laugh:

29 Nov 2015, 6:57 PM
#114
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

v1.1.1 has been submitted to the plugins' area for review. This version includes the 2015-11-26 security patch required for /includes/functions/html_output.php.

30 Nov 2015, 11:09 AM
#115
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

Some parts of the patch were missed; it still needs attention.

30 Nov 2015, 4:34 PM
#116
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

swguy:

Some parts of the patch were missed; it still needs attention.
This plugin only modifies /includes/functions/html_output.php and the updated version includes that single-line change within that script.

30 Nov 2015, 4:43 PM
#117
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

These lines were also changed; there were three changes.

462c462
<   function zen_draw_hidden_field($name, $value = '~*~*#', $parameters = '') {
---
>   function zen_draw_hidden_field($name, $value = '', $parameters = '') {
465c465
<     if (zen_not_null($value) && $value != '~*~*#') {
---
>     if (zen_not_null($value)) {
30 Nov 2015, 5:15 PM
#118
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: CSS3 Buttons [support thread]

I feel like I'm flogging a dead horse, but here goes. The diff that DrByte posted in the changes necessary for the security patch for this file specified a single line (the change to the password-related function) and did not include the lines that you reference.

30 Nov 2015, 7:37 PM
#120
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: CSS3 Buttons [support thread]

I see the confusion...." as shown in this code diff: XSS fix " only shows the fix for the specific XSS problem, whereas the entire "Patched file: /includes/functions/html_output.php" contains additional updates to that file for 1.5.5/1.6.0 that are there for other reasons separate from the XSS problem